My postfix configuration allows mail via several local_recipient_maps. However, delivery to "proxy:unix:passwd.byname" is specifically disabled. This normally prevents delivery to local unix users:
$ getent passwd | grep www-data www-data:x:33:33:www-data:/var/www:/bin/sh $ nc localhost 25 220 my.mail.host ESMTP Postfix helo localhost 250 my.mail.host mail from:firstname.lastname@example.org 250 2.1.0 Ok rcpt to:email@example.com 550 5.1.1 <firstname.lastname@example.org>: Recipient address rejected: User unknown in local recipient table rcpt to:www-data 550 5.1.1 <www-data>: Recipient address rejected: User unknown in local recipient table
However this morning I noticed an email delivered to the local www-data mail spool file. Looking within, I see that:
- it was a message from email@example.com, sent by a different host within our network, using my.mail.host as the smarthost
- it remained within my.mail.host queue for several days while attempting retries
- it then bounced
- the bounce was delivered to a "www-data" mail spool file on my.mail.host
So my question is: why did this happen, and how do I prevent it from happening in the future?