Wietse Venema:
> 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$/
> /./ [email protected]
> endif
Make that:
if !/[[:<:]]example\.com$/
That is, execute the action inside if/endif only when the
sender does not match your local domain.
> Note: no whitespace before those lines.
>
> That will replace a MAIL FROM sender not in your domain by your
> own address.
>
> Wietse
>
>