Copy link to clipboard
Copied
Hi
I have a client that sends out mail to 25000+ people per day.
HE gets a large amount of bounces.
I need to delete hard bounces and capture soft bounces in a table.
I have got so far as to check the body of all bounce backs for all email addresses within the body.
How do i know detect if it is a hard or a soft bounce.
Please can someone assist me as my server is taking sever strain!
Best regards
Delon
<!-------------HERE IS MY CODE SO FAR------>
<cfpop
server = "x"
username = "failto@x.co.za"
password = "x"
action="getall"
name = "somequery" timeout="90000">
Failed mail:<Br><Br>
<cfoutput query="somequery">
#Currentrow#. From: #From# -- Subject: #Subject#<Br>
<CFSET text = "#body#">
<CFSET emaillist = "">
<CFSET start = 1>
<CFSET regex = "[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z]{2,3})|(aero|coop|info|museum|name))">
<CFLOOP condition="start lt LEN(text)">
<CFSET findemail = REFindNoCase(regex,text,start,"TRUE")>
<CFIF findemail.len[1] AND findemail.pos[1]>
<CFSET emaillist = LISTAPPEND(emaillist,MID(text,findemail.pos[1],findemail.len[1]))>
<CFSET start = findemail.pos[1] + findemail.len[1]>
<CFELSE>
<CFBREAK>
</cfif>
</cfloop>
<font face="Arial, Helvetica, sans-serif" size="1" color="##666666">#paragraphformat(body)#</font>
<font face="Arial, Helvetica, sans-serif" size="1" color="##FF0000">Emails Found: #emaillist#<br><Br><Br></font></cfoutput>
Copy link to clipboard
Copied
Detecting the hard and soft bounce is actually really hard to do accurately. Unless you have ALOT of time, I wouldn't even bother trying to do this yourself.
The problem is Email NDR standards vs reality. The NDR messages that email servers send back can be very different from one another.
If you really really have to tell the difference then I would look at some third party products. EG http://www.listnanny.net
Even then I have found that some email servers even lie in the NDR message. Like returning, no such email address, mailbox full, when it thinks your mail is spam even though it delivers the email successfully.
Hope this helps and good luck, email addy cleaning and NDR parsing is annoying.
Copy link to clipboard
Copied
Hi
Thanks for the post.
Ok my client needs me to filter through his email account (using CFPOP) and delete all hard bounces.
Do you know of any decent CF solutions?
Thanks a mil
Delon
Copy link to clipboard
Copied
Hi
No sadly I dont know of any Coldfusion based NDR parsing solutions. Anyone else? Don't forget though you can use .net libs in CF.
There are a few email delivery solutions out there though, which can help take care of bounce management. I looked at these a while a go, one that I can still remember is http://www.zrinity.com/xms/
I ended up going with the .NET solution because it was more of what I was after.
One tip though, set up a seperate email address for bounces, and use the failto address attribute. You can then collect all your bounces in one place.
Another good tatic is the sender address. Generate a UUID for every email you send, and use this as the sender email address name, or hide it in the message somewhere. Then you can identify these UUID's in emails that get bounced back, and know exactly which email it was.
Cheers
Copy link to clipboard
Copied
For starters, read RFC 2822 for the meaning of SMTP error codes. Then build on top of that to capture some string like "out of office" and treat them specifically.
Copy link to clipboard
Copied
Thats the wrong RFC, http://www.ietf.org/rfc/rfc1893.txt
Sadly this will be really unreliable though,a nd this is what I meant between NDR standards (from the RFC doc) and reality.
Not every writes "out of office" in their auto reply, and not every one uses english. Then the SMTP return codes in the NDR are not always formatted the same, and sometimes they are wrong.
I have even seen NDR's were the sysadmins have had some fun, and written very amusing message to accompany the return codes.
Copy link to clipboard
Copied
I have a PDF which i found on the net with most SMTP Hard bounce error codes.
If i used all the error codes in my expression and searched for instances of them in my string, would that not be a good start?
If i created a decent list with all SMTP "hard bounce" error codes.
Thanks
Delon
Copy link to clipboard
Copied
Yep that will be a good start, but you also might have a hard time corectly classifying all bounces correctly that way.
I started down the same path, but switched to list nanny (its doesn't just rely on error codes) becuase of the amount of false positives i was getting. To be honest I still get wrong matches just not as many.
Your experience however may be different however, for example we send newsletter emails out all over europe. So we get NDR's in english, french, german, italian etc.....
Copy link to clipboard
Copied
FYI: Just came across this, while looking for something else:
http://bouncedetector.riaforge.org/
Copy link to clipboard
Copied
Great.
Will take a look shortly.
Thank you!
Copy link to clipboard
Copied
Im going to ask a really feeble question.
I've never really downloaded any framework before.
So please bare with me...
The riaforge bounce detector uses the ColdSpring framework.
Is the framework installed on a server level or on an application level?
What I am asking is basically... if I install the app, will it affect my server on a global level or just on the web application on which I am working?
Do I install the files inside the root of the application ie: wwwroot/someapplication/ OR inside wwwroot?
Thanks for your patience.
Regards
Delon
Copy link to clipboard
Copied
Sorry I know next to nothing about coldspring. I would imagine though that it should be possible to install the framework at an app level.
However the author mentions it should be trivial to make the code coldspring independent. I would tend to take a look at that, before bringing in a whole new dependency into your app.
Cheers
Copy link to clipboard
Copied
As this is separate section of my application, what I think I will do is create a subdirectory inside my app ie: wwwroot/appname/maildetector/
And install ColdSpring and the Detector files from there.
I cant see why that would hamper anything?
Then I'll run a scheduled task to filter through the pop account on a daily basis to flush and filter the account.
Any thoughts?
Best regards
Delon
PS: do you have a website portfolio? I'd like to take a look.
Mine is www.fusebox.co.za