Automatically removing invalid email addresses from newsletter?
July 6, 2005 9:13 AM   Subscribe

I have a mailing list consisting of about 6,500 addresses for the company I work for. However, there are 500 or so invalid addresses that I'd like to remove automatically.

Is there some software out there that can validate existing email addresses without sending an email to them? This could possibly be done with a simple PHP script, no?

All of the addresses I have are valid in syntax, but for one reason or another, emails sent to them get bounced back. I'm assuming this happens for a couple reasons: user enters bogus, but syntax-valid email address, users mailbox is full, user no longer uses address, etc.

All of the addresses are currently sitting in a mySQL database, but I can export them to text if necessary.

Or, alternatively, if there is some freeware newsletter sending software (PHP/mySQL preferably) that automatically does this, that would work too.

Any leads?
posted by nitsuj to Computers & Internet (8 answers total)
 
I doubt it's possible to validate a correctly formatted address without mailing it but I could be wrong.

I use Dreamhost's Announcement feature for mailing lists and it removes anyone from the list who's caused a bounce X number of times (I have it set to 5). So, it's definitely possible to have it automated, but how/what to use I can't say. Does your web host not offer something similar?
posted by dobbs at 9:17 AM on July 6, 2005


Most current versions of mailing list software will automatically manage this. Perhaps you need to switch or upgrade to the latest version. For example, I use Mailman and it unsubscribes users after a certain number of bounces (you can change the number).
posted by winston at 9:23 AM on July 6, 2005


checkdnsrr is a PHP function that will check to see if the domain is legit. (Look at the comments there for some email checking scripts.) That would weed out some of the bad addresses.
posted by teg at 9:32 AM on July 6, 2005


You can check the DNS and try SMTP VRFY/EXPN to check the address, but the only way to be sure email can be delivered to an address is to try sending some.
posted by fvw at 9:51 AM on July 6, 2005


How do you know there are 500 or so that are invalid? Did they bounce previously? If you know what they are can't you just remove them?

Given that an email address is syntactically legal (RFC 822-compliant), and that all the DNS and mail servers exist for it, the only way to test that it can accept mail is to, well, send it mail. Even this is no guarantee, since further downstream there may be spam filters, black lists, and who knows what that might eat your message before it gets to its intended user. This is one reason folks put graphics ("bugs") in HTML email -- if you encode the URLS for them in a special way you can tell that an email was "read" (I hate this practice BTW).

Don't bother to send a "test" email; it's no less work than just sending the email you really want to send. Each time you send an email, check for bounces if possible and cull from there.

The global email infrastructure is duct-tape and baling wire. There are no master lists of active addresses anywhere, or services that can quickly query whether an email address is alive. It isn't even techincally possible. Imagine what the spammers would do with that.
posted by ldenneau at 10:02 AM on July 6, 2005


There have been a few suggestions to determine if an address looks legitimate, but overall it is impossible to verify if an address is deliverable.

Checking the domain doesn't tell you if the user exists at that domain; EXPN and VRFY are very, very, very rarely enabled; mailing list software removes undeliverable addresses after it sends those addresses mail.

Just use the list as-is, and clean up automatically or manually after the first mailing. Any information you gather about which addresses are and aren't deliverable is immediately out of date, anyhow (and by broken policy or broken software a particular mail server might even accept mail from you today, not tomorrow, and again the day after, so you may even wish to only remove someone after some number of bounces >1).
posted by mendel at 10:06 AM on July 6, 2005


When I ran a large list, we just used boogietools to handle all the returned email. It won't catch stuff before you send it, but it sure can help with dealing with the wide variety of bounce messages...
posted by ph00dz at 10:39 AM on July 6, 2005


You might want to try this, I've never used it, but it sounds like what you're looking for - http://www.analogx.com/contents/download/network/lmpro.htm
posted by TuxHeDoh at 10:51 AM on July 6, 2005


« Older Flat panel issues with Windows and VGA   |   Birthday Gift Ideas for 9 Year Old Gifted (Boy)... Newer »
This thread is closed to new comments.