?
Solved

Logging soft/hard bounces for database removal

Posted on 2006-06-02
8
Medium Priority
?
1,149 Views
Last Modified: 2012-05-05
We are running an Exchange 2003 mailserver with Message Tracking enabled, but I cannot seem to glean the information from it that I want.  Simply put, we send out renewal/informational emails to our membership, and some of these bounce due to ISP changes, etc.  We would like to create a list of all of the emails that were rejected, and whether it was a soft or a hard bounce.  One way to do this would be to place all of the Undeliverable emails in a folder, and use a seperate program to parse these (the application side is easily done for us), however it appears that the Badmail folder seems to be more for incoming mail addresses that do not exist, and not for external.  Am I incorrect in this, or is it a setting that I need to adjust?

Another method would be to use Message Tracking (already enabled) and parse the logfile to look for NDR results.  However, I tried a few hard/soft bounces to see what it logged, and on each of them it showed "0" (delivered) in the 12th log field.  Even if this were to work properly,   I don't believe that it would give me the information that I really want, which is the NDR reason (mailbox no longer exists, mailbox full, etc).

I'm certain that this has been done before, but my google results are taking me nowhere just yet.
0
Comment
Question by:nstephens
  • 3
  • 3
  • 2
8 Comments
 
LVL 104

Expert Comment

by:Sembee
ID: 16821363
You need something to process the message tracking logs for you.
They aren't designed to be read manually - they are supposed to be read in the Message Tracking Center - but this isn't very flexible.

There are a number of options for getting the data in to a format that you can work with, see my web site at http://www.amset.info/exchange/message-tracking for some of them.

Your best option though would be to use some kind of bulk mail package that can manage the bouncing messages and report on them. Exchange isn't very good at that. Something like Lyris might be worth looking at. Via the customisation options available it might work to combine with any processes you have in place to allow the recipients to update their email addresses themselves.

Simon.
0
 
LVL 4

Expert Comment

by:GreenfieldIT
ID: 16829680
BoogiePop is the best. i use it to monitor 15 or 20 mailboxes. it accesses them via POP and can dump data to local logs or write customized info to SQL database. for instance we grab timestamp, bounce email, bouncetype (soft, hard, etc)

http://www.boogietools.com

0
 

Author Comment

by:nstephens
ID: 16834641
Our general intent is to create a process on our own that does these same functions.  Granted, keeping your own code updated with all of the latest error messages might be a bit intensive, but we feel that we have a good base prepared already for the sorting of the messages.  Mostly what I need is a good way to pass that information to our application.

Our application is setup to search a directory (though this could be modified to a different function easily) and parse the files for the appropriate bounced email messages.  What I need is a way to either send every bounced email to a directory written out as 1 file per email (which I think is not possible with exchange directly), or a way to read the logfile to parse which emails bounced and what the NDR message was.

Is this not a viable function in Exchange?  Our dba worked for a large company where he says they did something very similar to this, so I think there is a way to do it that I'm just not thinking of.  Assuming that it is not possible, I would need to access a pop3 account and pull the NDR's to the program that way, but that still leaves me with the problem of getting the soft-bounce NDR's that are sent directly back to the account that initiated the email.  Is there a way in Exchange to have ALL NDR's CC:ed to a certain user?
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 4

Expert Comment

by:GreenfieldIT
ID: 16834672
you may need to write an event sync to do what you need

not sure about CCing from NDR
0
 
LVL 104

Expert Comment

by:Sembee
ID: 16837430
Once the message hits Exchange, it ceases to be a message in the regular way. Exchange processes NDRs in particular in a slight different format, so that the users are presented with a different type of message. I think you would be hard pressed to work with those NDR messages.

Exchange can COPY NDR messages to another mailbox, but this is an all or nothing affair - so would copy all NDRs generated by the Exchange server. It is also hit and miss, relying on Exchange detecting the NDR message.

However my original response still stands. You would be much better off with a product designed to do list management.
Send an email with large number of messages in the CC or BCC line, you will be flagged as spam.
Send an email without automatic unsubscription text, you will be flagged as spam.

The bottom line is can you afford to be blacklisted? Blacklists operate in a shoot first, ask questions later format and getting off them can be very difficult.

Simon.
0
 

Author Comment

by:nstephens
ID: 16856170
I'm not certain that my point is coming across very clearly, so I have tried to reword it below.  We are not looking for a 3rd party to handle our bulk email, nor are we looking for an email processing program that will stand alone and pull information from a pop3 box.


1a) We send an outgoing mail FROM us@company.com TO user1@them.com (an old, invalid account)
   - It bounces because that account no longer exists at them.com, sending a report back to our user that sent
     the mail
      - It is returned to us@company.com with a 5XX message

1b) We send an outgoing mail FROM us@company.com TO user1@them.com (them.com is an old, expired domain)
   - It bounces because no mailserver can be found for them.com, sending a report back to our user that sent
     the mail, and optionally CC'ing whomever I have setup as a recipient for NDR's in exchange.
      - It is returned to us@company.com with a 5XX message
      - the NDR copy recipient receives this message as well

2) We generate a list of all of the invalid email addresses per section 1.  A few acceptable methods would be the following:
    - Send all NDR emails from 1a and 1b to a specified accountname, pull the email from there via pop3 for processing
    - Setup a system folder that will receive the emails (one per file), sort that directory using a homemade application
    - Read from a logfile that will tell us not only that the email bounced, but what error message was generated for proper processing of a soft/hard bounce

3) Use the generated list to remove the email addresses from our database using a homemade application


The part that I am questioning is the best way to get the information from section 2.  What system settings would have to be made to do one of those options?  Step 3 will be handled by our web developers, but I need to be able to give them the information in a way that they can process.  In unix (my forte) this wouldn't be terribly difficult, so I have to assume that there is a comparable method to do it with Exchange.

We are not looking for an email processing program that will do this for us.

As a bonus, if we have to do the method where we pull the NDR's from an inbox via pop3, do you know of an email client that allows you to write the incoming mails out 1 per file?
0
 
LVL 104

Accepted Solution

by:
Sembee earned 2000 total points
ID: 16857427
Unfortunately Exchange isn't really suited for this task. Exchange is not a bulk mail tool - when it does bulk mailing it doesn't do it very well. I believe that basic list management is one of the areas that Exchange is lacking, but Microsoft don't seem to agree as it isn't in the next version of Exchange.

You can get Exchange to send SOME NDRs to another address. However this is not 100% successful. It will typically only send its own NDR messages - ie server not found, timeout or when the message has been rejected at the handshake stage. If the message has been successfully delivered, and the NDR is generated by the remote server, Exchange will not always pick it up.

That setting is on the SMTP VS, on the Messages tab - "send a copy of the non delivery report to:" and you enter the full SMTP address of the account that you want the message to go to. You should probably place measures on that account to ensure that no-one can email the account from outside, otherwise it will start collecting spam. You may have to exclude the account from any spam filtering application as NDRs often get caught by those tools.

As for email client - you are probably looking for a really ancient POP3 client. A unix client might be a better option. I have also seen POP3 interfaces in C# and dotnet, so if you are writing something to process the messages it shouldn't be too difficult to bolt in the POP3 client component.

Simon.
0
 

Author Comment

by:nstephens
ID: 16857830
I believe you are right, Sembee.  I had hoped for better luck in Exchange, but it seems to not be a good solution.  I am now taking a different approach where I forward the email from the account that we expect to receive bounces to a unix mailserver where things can be sorted more easily.

Thanks for taking the time to work through this with me!

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
Exchange administrators are always vigilant about Exchange crashes and disasters that are possible any time. It is quite essential to identify the symptoms of a possible Exchange issue and be prepared with a proper recovery plan. There are multiple…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question