2

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

1
  • Can you post the entire maillog,generated by postfix, when the mail was sent to [email protected]? Also post your postconf -n if possible.
    – clement
    May 22, 2014 at 7:28

1 Answer 1

1

Having tested it again to provide more information I found that it did actually work (for the first time) so either the virtual file was not the latest version or there was a delay in propagation.

This configuration was designed so that customers could send emails to us where the email address itself was generated from data (ex: location and language of user), since coupled with the sender address the customer need not input anything apart from their comments.

So this does seem to be a valid way to enable customised email addresses to get through postfix while rejecting randomised email addresses / spam.

Tim

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .