In my postfix main.cf I have:
smtpd_recipient_restrictions = reject_unauth_destination, check_recipient_access regexp:/etc/postfix/access.me
...
virtual_alias_maps = hash:/etc/postfix/virtual
...
In my virtual file I have:
[email protected] [email protected]
[email protected] [email protected]
@mydomain.com [email protected]
In my access.me file I have:
/^abc/ OK
/[email protected]/ OK
/[email protected]/ REJECT failed test
/@mydomain.com/ REJECT failed test contact [email protected]
With this I have successfully failed (!) to send to [email protected] so I know access.me is being read correctly by postfix. If I send to [email protected] it fails (correctly) rejected by Line 4 of access.me
However if I try to mail [email protected] it fails with "User unknown in virtual alias table" which shows that it is accepted by line 1 of access.me, but I need this email to succeed and get through.
So nearly there but I must be misunderstanding postfix logic... Tim
[email protected]
? Also post yourpostconf -n
if possible.