When sending mail from a host behind NAT, you will run into trouble when the “From” says “firstname.lastname@example.org”, because receiving servers will refuse that domain.
I’m not quite sure why, but setting myorigin used to be enough. Now I need to do this in main.cf:
# For when you have a host behind NAT that is refusing to # use hostname.realdomain.net as specified as origin. # You can test with: # postmap -q "email@example.com" regexp:/etc/postfix/sender_canonical sender_canonical_maps = regexp:/etc/postfix/sender_canonical
And in sender_canonical:
Or more generic:
And as usual, I use a relay host.