in reply to Dealing with returned mail

I've written a plugin for Qpsmtpd which does something like this in a perl application. It parses the email, and if it's a bounce takes an action based on the email address.

It may not work on shared hosting though, and for that you may want to create an email gateway which triggers a perl script. Take a look at Request Tracker's gateway interface as an example. Have your perl script filter the email for bounces, and take action if a bounce is identified, otherwise send the email on it's way.

Replies are listed 'Best First'.
Re^2: Dealing with returned mail
by tirwhan (Abbot) on Jun 21, 2005 at 08:26 UTC
    If you're using exim as your MTA you can set up a system filter to identify bounce messages for you. For example:
    if error_message then pipe "/usr/local/bin/handlescript" finish endif

    will pipe all bounce messages to your script and then discard them. That way your perl script only gets called for true bounce messages, which reduces the overhead.

    If you want the bounced email to be delivered to the script but also to the original sender, just omit the "finish" keyword.