in reply to Email Parsing of mail files for e-mail errors

Your post interested me. A few thoughts, if i may, that I hope will repay the interest by at least giving you a place to bounce from.

First of all, if you have to code this yourself, take a look at the Mail::* modules, which should help somewhat in reducing the amount of custom code you have to write.

Next, if you are not already doing so, I would, if possible, create a user that the mailing list was sent as, or if possible, set a custom header in the message (several mailing lists I am on set a Return-Path header, or something similar, with a value related to my subscription to the list). Using this, you could use one of the filtering/sorting mechanisms available as part of several of the Mail::* modules (mentioned above) to act based on seeing that header in a message to either the user the mailing list sent as (root or another).

Hope that helps, and hope others will also contribute useful ideas to you as well.

  • Comment on Re: Email Parsing of mail files for e-mail errors

Replies are listed 'Best First'.
Re: Re: Email Parsing of mail files for e-mail errors
by Louis_Wu (Chaplain) on Dec 03, 2002 at 17:33 UTC
    FYI, "Reply-To" Munging Considered Harmful. I don't administer a mail server, and I haven't read widely on this, but this article makes sense to me.

    . . .

    Maybe I should have started this node like Rod Serling, 'Submitted for your consideration, a mail list adminstrator who munges his headers. But this is no ordinary tale, these headers are being sent from ... The Twilight Zone.' Nah, guess not.

      I read it as you suggested and we don't really want to start munging, I'd like a more universal solution if possible to catch all system errors.
Re: Re: Email Parsing of mail files for e-mail errors
by notbob (Initiate) on Dec 03, 2002 at 17:05 UTC
    The problem is, we want to do a more global system, as we have tons of utilities sending out mail and all the bounced mail is landing in root, they have tons of old mail backed up. I'd like to build both a retroactive and a proactive solution but having problems doing so as nobodys mail server seems to be returning consistently formatted errors. I'm looking into the idea of seeing if sendmail can remote connect and validate but not having much luck. Someone suggested:
    /usr/lib/sendmail -oeq -bv the@email.com; echo $status
    but not returning much of anything useful :(