[thelist] Handling bounced mail

Liam Delahunty ldelahunty at britstream.com
Wed Oct 23 07:03:01 CDT 2002

Steve Cook wrote:

>we have offered a client a system for sending a mail newsletter to their
>customer club members. They have said that we get the job if we can help
>clean up their database after we send the first mail. They expect that as
>many as 5000 of the addresses they have will bounce when we send the first
>mail and they want us to be able to assemble a list of customer numbers
>the bounced mails so they can clean up their database.

Move all the bounced mail into various folders for an IMAP account, I was on
Linux so I then grepped the files for @. (I used IMAP so there would be one
big file containing all the email for each folder. I'm sure there are other
solutions.) There must be something similar to grep for MS, at the very
least you could sort the file and perhaps do a regex on each line of output
to grab the email address? Anyway, then I sorted the results and removed the
duplicates with a simple loop.

Then I went through the data against the original database (where I presume
you would get the customer numbers) and updated the contact records with a
"results" field.

0 okay
1 bounced
2 other reject
3 full mail box
4 holiday
5 please remove
6 other response

Then it was just a matter of pulling various reports from the contacts
database for the client.

I suppose really one should have a separate table for reach mail out, and
associate each customer id with a result for that mailing so you could track
response over time so, for instance, multiple rejects for a full mail boxes
could be removed.


Kind regards,
Liam Delahunty
http://www.liamdelahunty.com/ web/ design/ database/ programming
http://www.britstream.com/ Hosting/ Domain Names From UKP 7.50 p.a.

More information about the thelist mailing list