Groups | Blog | Home
all groups > iis smtp nntp > march 2005 >

iis smtp nntp : How to detect Bounced Mails programatically.


Rohan Reddy
3/2/2005 7:59:43 PM
Hi,
i am a VB programmer developing a newsletter kind of application.
i am using winsock control for checking the mails in my mailbox.
can any one let me know how to detect a bounced mail in my mailbox using?
is there any special header for recognise the bounced mail?

thanx in advance.

Regards
Rohan Reddy

Dennis Black
3/4/2005 5:35:27 PM
Rohan,

I assume you are either using POP3 or IMAP to check your inbox.
Unfortunately, POP3/IMAP comes into picture "after" message comes into
the INBOX and there is no reliable way to finding out if an email was an
NDR at that point. The only way is to parse for certain phrases like
"Failure", "Undeliverable", etc.


You need to work at SMTP level. When emails are sent from one server to
another SMTP is used and undeliverable messages don't have a sender in
the MAIL from command. Check the DevNull SMTP server at
http://aboutmydns.com

Follow the steps below to see what happens when an NDR is generated

1. Load DevNull SMTP (either applet or download the application)
2. Start the SMTP server on port 25
3. Send an email to your Exchange server with following values using Outlook

To: invalidUser@yourcompany.com
From: yourname@192.168.1.200 (This must be your IP address)

4. When Exchange gets an email for "invaliduser" it will generate an NDR
and send it to your machine since you put your IP address in the domain
name.

5. Check the SMTP log in DevNull. The MAIL FROM line will say:
MAIL FROM:<>

This is how an SMTP server figures out if the message is an NDR.


Hope this helps.




[quoted text, click to view]
AddThis Social Bookmark Button