Bounced Address Filtering
Bounced email address filtering will allow you to remove old, outdated addresses that are no longer valid. This will help with the server overhead associated with very large lists. However, before you dive head first into this feature, it must be said that this feature can be rather advanced. It requires manual editing, it is not entirely web-driven. This feature requires the ability to forward incoming email to a script. This is accomplished by a filtering program. One popular filter is Procmail.
These steps are to be done after the full Subscriber PRO script has been set up and configured. Also, just as with the normal installation instructions, the boldface instructions are for the impatient. ;)
- Upload bounced.cgi.
Open bounced.cgi in a text editor and edit the path to Perl as well as the $doc_root variable. Upload the file when done, and CHMOD it if necessary.
- Decide on email address which mail will be bounced back to, and make sure Return-path is that address.
Why is there a "decide" step? Because this is a major issue. ALL incoming mail (in the next step) for this address will be routed to the script. Also, the Return-path in outgoing emails from your list must be this address. You may be thinking "Well, wouldn't that just me my admin addresss?" In some cases yes, in others no. The only way to see is to check the mail headers of your most recent message (or, send a test message to yourself). The Return-path should be the first line in the mail header. It is NOT the same thing as the "From:" address.
If the address is not the same as the address which you would like the mail to bounce to, then you will need to force your mail program to change the Return-path on its outgoing mail. The easiest way to do this is to add an extra mail command line option through the NP Subscriber PRO Admin script (top level admin). This is done by adding the following, depending on your mail program:
Sendmail: -f firstname.lastname@example.org
Blat: -returnpath email@example.com
- Forward incoming email to bounced.cgi.
This may require some consulting with your host. ALL incoming mail going the address you decided on needs to be forwarded to the bounced.cgi script. This can be accomplished by email forwarding. Again, you may wish to consult your host on this one. On most Unix hosts, you will most likely have access to a .forward or .procmailrc file, probably in the same directory that holds your mail. In this file, you will need to point to your bounced.cgi script. The following is an example of code in a .procmailrc file:
The important thing here is the | given before the path. This will tell the filtering program to execute the script. Also, the usage of $HOME may be required so that the path on the server (if you're using shared hosting) will go to your directory.
* $RECIP ?? ^^test$
Also, if you would still like to receive a copy of the bounced email message, and perhaps any other mail that is getting sent to that address, you can always add the path to the directory where mail is stored (for example: webmaster/).
This step is extremely crucial, and you really should consult your host if you're unsure about any part of it.
It should work now. You proceed on with testing it.
Testing should be rather simple. There are two things to test. The first method below will simply test whether the email forwarding is working and whether the script is executing and logging bounces correctly. The second method involves testing through Subscriber PRO by sending a test message.
First, to test the email forwarding, you are going to need to send an email to your bounce address. Just send an email to the address with the following in the body:
As you can probably tell, this is the mail header that bounced.cgi looks for whenever it receives mail. This header is sent out in every mail sent by NP Subscriber PRO. It contains the "To:" address (firstname.lastname@example.org), a seperator (-++-), and the current list (my_list). The fact that you send this is the body of a test email does not matter. The script simply looks for that string of text anywhere in the email it receives. It is a header only so that subscribers can't see it without viewing the mail headers in their reader.
Now, log in under the top level admin script. Go to Bounced Emails. The first time you use this function, you will need to put in a number to display the bounced addresses. This is explained on the page. If you do not see the address, you will need to check your email forwarding again.
If it does appear, you can go ahead and delete it if you wish. Now, you will need to send a test list message to address you know is dead. If this address appears in the bounce list, then you know the Return-path as well as the mail forwarding is working.
Congratulations, the system works! :)
Back to Index