Good evening,
this is a gr8 little container.
I've had to hack the postfix configs as I'm relaying through my email address' SMTP server and so emails have to come from my address.
I used this: (taken from: https://serverfault.com/questions/147921/forcing-the-from-address-when-postfix-relays-over-smtp)
This is how to really do it in postfix.
This config changes sender addresses from both local originated, and relayed SMTP mail traffic:
/etc/postfix/main.cf:
sender_canonical_classes = envelope_sender, header_sender sender_canonical_maps = regexp:/etc/postfix/sender_canonical_maps smtp_header_checks = regexp:/etc/postfix/header_check
Rewrite envelope address from email originating from the server itself
/etc/postfix/sender_canonical_maps:
/.+/
[email protected]
Rewrite from address in SMTP relayed e-mail
/etc/postfix/header_check:
/From:.*/ REPLACE From:
[email protected]
Would it be possible to build this into the template, please?
The current MYORIGIN is expecting a domain......if the user enters an email address then apply the above?
thanks,
Andy.