Wietse:
> Why do you believe that it complains about the "From" address in
> the email header, instead of the SMTP "MAIL FROM" address?

Michael Way:
> Sorry Wietse, my bad you are correct. It is the MAIL FROM:  I
> should have included the full line:  550 5.7.1 Client does not
> have permissions to send as this sender (in reply to MAIL FROM
> command))

sender_canonical_maps should take care of this.

In /etc/postfix/main.cf:

    sender_canonical_maps = pcre:/etc/postfix/sender_canonical
    sender_canonical_classes = envelope_sender

Note: no whitespace before those lines.

In /etc/postfix/sender_canonical:

    if /[[:<:]]example\.com$/
    /./ y...@example.com
    endif

Note: no whitespace before those lines.

That will replace a MAIL FROM sender not in your domain by your
own address.

        Wietse

Reply via email to