I have a hmail log parser for you to use if you are concerned with removing dead email addresses from your user base.
This was created because people like yahoo and hotmail require you to stop sending email on a 554/550 (Actually they would like you to stop sending email on any 5xx code) else risk being taken off their whitelist, which you worked so hard to get onto in the first place, or even worse put on their blacklists.
What this parser does is scan hmailservers log files and outputs a log file like so (removed usernames).
First row is the connection ID in the log file
Code: Select all
92116,firstname.lastname@example.org,550 92133,email@example.com,550 92136,firstname.lastname@example.org,550 92150,email@example.com,451 92152,firstname.lastname@example.org,554 92154,email@example.com,451 92159,firstname.lastname@example.org,550
Second row is the email address
Third row is the error code returned
This parser only pumps out 4xx and 5xx codes with email addresses.
Sometimes when a server you are connecting to just drops the connection the parser is unable to gain an email address for this and the row in the log will look like so:
These are left in the log on purpose so you can easily lookup what happened from the connection ID in hmails log (Nine times out of ten the server just drops the connection with a 450 (or similar) after the initial HELO command)
Code: Select all
Note: You need .Net2.0 Framework installed on your machine to use this parser.
Once extracted and ran, add hmail log files to the parser. (Can span multiple log files)
Note: The log files MUST be in chronological order (Oldest first) when spanning multiple log files.
Once your log files are added to the parser click on process.
Two log files will be produced and saved in the same directory the parser runs from.
ParseResults.txt which will contain the above log formatted code
ParseFailure.txt which contains the connection ID and email address if one existed.
The failure log file basically contains anything that wasn't parsed correctly due to mail servers not behaving properly either by dropping the connection and not giving hmail any warning or are just generally broken.
This log format that has been produced can be easily parsed in php or whatever language you are proficient in to help remove or disable dead email address from your database.
Just remember that mailservers are different and the error codes they return as I found out mean different things. For instance yahoo does not use 550 to denote a dead account, they use 554 but not only that yahoo also use 554 to show a full mailbox as well.
I hope it helps some of you out and also helps to cut down the wasted bandwidth used sending out mass newsletters etc to dead email addresses.
This parser has been tested on 4.3 Build 248 log files. If the log format ever changes this parser will no longer work.