Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I collect bounced mails with Postfix?

I followed Integrating Amazon SES with Postfix (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html) and it works most of cases, but sometimes not e.g. Trac notice mails get stuck.

Posfix send mail log:

postfix/smtpd[25596]: connect from 91.82.x.y.static.invitel.hu[91.82.x.y]
postfix/smtpd[25596]: CE30F2258F: client=91.82.x.y.static.invitel.hu[91.82.x.y]
postfix/cleanup[24713]: CE30F2258F: message-id=<062.8782978c8b1fd6b772f87fa1a3d0b71b@mail.example.com>
postfix/smtpd[25596]: disconnect from 91.82.x.y.static.invitel.hu[91.82.x.y]
postfix/qmgr[11980]: CE30F2258F: from=<trac@example.com>, size=2246, nrcpt=1 (queue active)
postfix/smtp[24715]: CE30F2258F: to=<oliver@example2.com>, relay=email-smtp.us-east-1.amazonaws.com[]:25, delay=2.1, delays=0.01/0/1.5/0.53, dsn=5.0.0, status=bounced (host email-smtp.us-east-1.amazonaws.com[] said: 554 Transaction failed: Invalid email address undisclosed-recipients:;. (in reply to end of DATA command))
postfix/bounce[25613]: CE30F2258F: sender non-delivery notification: DB6432263E
postfix/qmgr[11980]: CE30F2258F: removed

Posfix non-delivery notification log:

postfix/cleanup[24713]: DB6432263E: message-id=<20130603064915.DB6432263E@mail.example.com>
postfix/qmgr[11980]: DB6432263E: from=<>, size=4322, nrcpt=1 (queue active)
postfix/smtp[25482]: DB6432263E: to=<trac@example.com>, relay=email-smtp.us-east-1.amazonaws.com[]:25, delay=2.1, delays=0/0/1.4/0.68, dsn=2.0.0, status=sent (250 Ok)
postfix/qmgr[11980]: DB6432263E: removed

As I think the Posfix tries to send a deliver notification about failure to sender, but instead of that I want ot Postfix somehow collect these whole mails (headers and the content).

Please don't say verify the domain or email address.

Thanks, oliver

share|improve this question
I think you are misreading your log. There are at least four different messages represented in that snippet, and not all of the log messages are present for any of them. You can distinguish them by the PID in brackets. –  Michael Hampton Jun 3 '13 at 6:18
Thanks @MichaelHampton for correction. I just replaced the log, I hope it is ok now –  oliver.nadj Jun 3 '13 at 7:05
Each of the hexadecimal numbers at the start of each log line (after the process ID) identifies an individual mail. –  Falcon Momot Jun 15 '13 at 7:49
Hi @FalconMomot I just split the log. But I think these logs are coherent somehow. –  oliver.nadj Jun 15 '13 at 8:10
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.