Postfix Bounced Emails With Google Apps

Posted by crontab on Stack Overflow See other posts from Stack Overflow or by crontab
Published on 2010-12-29T21:50:03Z Indexed on 2010/12/29 21:54 UTC
Read the original article Hit count: 204

Filed under:
|
|

So our company uses Google Apps to handle our accounts for our employees. Meaning something like [email protected] would go to Google Apps. We also use postfix on our server to send out our news letter emails to our users.

We've setup our emails to have a unique return-path which is basically [email protected] problem is that when postfix gets a bounce during the SMTP connection, it actually sends out the email to Google Apps. Is there anyway that we can setup Postfix to not send to [email protected] and instead pipe that message to a script which we can grab the original message and log the bounced address?

I realize this only partially works as some emails may send correctly from postfix and then bounce down the road somewhere, but this should help us out with a good portion of our bounces.

For a start, in main.cf we have recipient_delimiter = + and in master.cf we have

bouncehandler   unix  -       n       n       -       -       pipe
  user=nobody argv=/path/to/bounce_handler.php ${recipient}

Not really sure where to go from here though.

© Stack Overflow or respective owner

Related posts about email

Related posts about postfix