Logging Bounced messages to a Database (Postfix with virtual domains/users)

Posted by Gurunandan on Server Fault See other posts from Server Fault or by Gurunandan
Published on 2010-01-27T19:06:01Z Indexed on 2011/03/14 0:11 UTC
Read the original article Hit count: 474

We have a postfix installation with a couple of virtual domains each with virtual users. These domains and users are mapped using a mysql database. I have been until now tracking bounces by parsing the postfix log file. I suspect there must be better and more efficient ways of doing this. I thought of three but I am not sure what is best:

  1. Write a Postfix content filter that logs the bounce and throws away the mail
  2. Use procmail - but I am not sure how procmail would work with virtual users who have no $HOME defined
  3. Write a script that POPs mail from mailboxes; parses and logs them and deletes the bounced email

I would appreciate advise on which would be best from a maintenance point of view and efficient from conserving server resources point of view. Thanks

© Server Fault or respective owner

Related posts about postfix

Related posts about filtering