275895Re: example showing how to track bad/bounce emails
- Mar 31, 2011marshall:
> Hello;Postfix delivers mail; it does not parse bounce messages.
> I've been searching around for a while, but I've not found any documentation or
> examples that show how you can configure Postfix to log bad/bounce/failed emails
> to MySQL or how to read a log file and parse the bad/bounce/failed emails out of
> The application I'm working on needs to detect emails that bounce
> and ideally remove them from the database. If Postfix can insert
> the bounced emails into a db table (or a log file that just contains
> the bad email addres, one per line), that would make it pretty
> easy to run a cron job to remove these bad emails from the
> application's user database.
You could use the documented Postfix hooks to deliver the returned
mail to a command that parses out the failed recipient.
- "|command" in local alias or .forward file:
- Pipe-to-command daemon; this requires a per-user transprort map entry.
Bounce message parsing is not trivial because a lot of systems use
a non-standard notification format. Using VERP solves some but
not all of these problems (some mail systems ignore the envelope
sender address). http://www.postfix.org/VERP_README.html
- << Previous post in topic Next post in topic >>