I have setup postfix and dovecot. Postfix is set to accept connections from my webserver to send out system generated mail. These are being sent out successfully. Sent out emails to some non-existent addresses and expected the sender address (news@bookingwire.co.uk) to receive the bounce notifications when I connect to the mailbox using the following PHP snippet.
$imap_host = '{mail.bookingwire.co.uk:995/pop3/ssl/novalidate-cert}INBOX';
$imap_uname = 'news';
$imap_pwd = '';
$imap_stream = imap_open($imap_host, $imap_uname, $imap_pwd);
But the mailbox is empty. I checked the /var/log/maillog and I see that the qmgr is removing the bounce notification and not delivering them to the sender.
Mar 8 13:23:08 mail postfix/smtp[5464]: 21F5A828CC: to=<kbalajijan1@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.136.26]:25, delay=0.59, delays=0.05/0/0.13/0.4, dsn=2.0.0, status=sent (250 2.0.0 OK 1394284990 v2si2168033eel.37 - gsmtp)
Mar 8 13:23:10 mail postfix/smtp[5465]: 21F5A828CC: to=<balaji.kfake@sastratechnologies.in>, relay=mail.sastratechnologies.in[216.245.220.130]:25, delay=2.1, delays=0.05/0/1.3/0.8, dsn=5.1.1, status=**bounced** (host mail.sastratechnologies.in[216.245.220.130] said: 550 5.1.1 User unknown: balaji.kfake@sastratechnologies.in (in reply to RCPT TO command))
Mar 8 13:23:10 mail postfix/smtp[5465]: 21F5A828CC: to=<balaji.k@sastratechnologies.in>, relay=mail.sastratechnologies.in[216.245.220.130]:25, delay=2.5, delays=0.05/0/1.3/1.2, dsn=2.0.0, status=sent (250 OK id=1WMHDb-0001Hq-T2)
Mar 8 13:23:11 mail postfix/smtp[5466]: 21F5A828CC: to=<kbalajijan1@yahoo.com>, relay=mta6.am0.yahoodns.net[98.136.217.203]:25, delay=3, delays=0.05/0/0.54/2.4, dsn=2.0.0, status=sent (250 ok dirdel)
Mar 8 13:23:11 mail postfix/cleanup[5463]: 23781828D4: message-id=<20140308132311.23781828D4@mail.bookingwire.co.uk>
Mar 8 13:23:11 mail postfix/qmgr[5402]: 23781828D4: from=<>, size=2989, nrcpt=1 (queue active)
Mar 8 13:23:11 mail postfix/bounce[5467]: 21F5A828CC: sender non-delivery notification: 23781828D4
Mar 8 13:23:11 mail postfix/qmgr[5402]: 21F5A828CC: removed
Mar 8 13:23:11 mail postfix/local[5468]: 23781828D4: to=<root@bookingwire.co.uk>, orig_to=<news@bookingwire.co.uk>, relay=local, delay=0, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Mar 8 13:23:11 mail postfix/qmgr[5402]: 23781828D4: removed
Should I setup anything else to have postfix bounce messages to the senders mailbox.
Best Answer
Your log clearly shows that the bounce message, intended for
news
, was delivered toroot
instead.Check for a mail alias which may be redirecting mail for
news
toroot
. You'll find such a redirection in/etc/aliases
by default.