I have postfix setup using virtual domains which call a remote mysql server. I'm also using PostfixAdmin to administer the virtual domains on the remote mysql server. In postfixadmin I have setup a real mailbox for devn...@example.com I have also setup aliases - mai...@example.com - for the devn...@example.com mailbox. I would like MX server to DISCARD any mail sent to devn...@example.com before it attempts to deliver it via LMTP to my remote mail store. Mail is being DISCARDed fine when email is addressed directly to devn...@example.com But when the mail is sent to the alias - mai...@example.com - and includes orig_to (see below) the mail is not being DISCARDed. Can anyone tell me the correct way to do this? The regex below is "supposed" to catch ANY email accepted by this MX server addressed to any valid mailbox - devnull@validdomain Thanks!
# cat /etc/postfix/devnull-discard /^devnull@.*$/ DISCARD # main.cf smtpd_data_restrictions = check_recipient_access regexp:/etc/postfix/devnull-discard, reject_unauth_pipelining, reject_multi_recipient_bounce, permit Any mail sent to - devn...@example.com - is successfully discarded: Oct 1 20:50:26 mta-0 postfix/smtpd[27903]: DEB4FC096: discard: DATA from mail-pd0-f173.google.com[209.85.192.173]: <devn...@example.com>: Recipient address triggers DISCARD action; from=<exam...@gmail.com> to=<devn...@example.com> proto=ESMTP helo=<mail-pd0-f173.google.com> But any email message that has had its address modified as an alias is not caught: Oct 1 20:50:35 mta-0 postfix/lmtp[27909]: F3CDDC096: to=<devn...@example.com>, orig_to=<mai...@example.com>, relay=X.X.X.X[X.X.X.X]:2424, delay=1.1, delays=0.69/0.01/0.04/0.33, dsn=2.6.0, status=sent (250 2.6.0 <devn...@example.com> Message accepted for delivery)