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 [email protected]
I have also setup aliases - [email protected] - for the [email protected] 
mailbox.
I would like MX server to DISCARD any mail sent to [email protected] before 
it attempts to deliver it via LMTP to my remote mail store.
Mail is being DISCARDed fine when email is addressed directly to 
[email protected]
But when the mail is sent to the alias - [email protected] - 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 - [email protected] - 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]: <[email protected]>: Recipient 
address triggers DISCARD action; from=<[email protected]> 
to=<[email protected]> 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=<[email protected]>, 
orig_to=<[email protected]>, 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 
<[email protected]> Message accepted for delivery)




Reply via email to