What is the best way to handle bounces and immediate failures with Exim? An email sent to a large mailing list will generate a large number of immediate failures as well as bounces. I'd like to capture these bounces and immediate failures and process them with a script, so that I can automatically remove them from the mailing list.
Using a third party email campaign manager is not an option. I need to specifically handle these messages with Exim, either capturing or redirecting them for later processing with a custom script. What would be the best way to implement something like this with Exim?
A similar question was asked here regarding IIS, but isn't much help in implementing something similar with Exim.
Large mailing-lists tend to be managed with Mailing List Managers, such as "mailman". One of the advantages of these is that they include bounce processors, so that they can unsubscribe recipients for you.
You're basically trying to implement more and more of the MLM functionality inside the MTA. You're going to keep hitting issues, so it's better to just accept the need to setup an MLM.
That said, the
redirect
Router which expands your mailing-list can take anerrors_to
option and you can set that to point to an address which you'll handle as anaccept
Router that passes the message to an external tool which manages the list of recipients.