I would like to make a sender transport map into the postfix like this:
To tell a local Postfix instance that anything from yourusername@FreeBSD.org should be forwarded to the FreeBSD.org servers, add this to your main.cf:
sender_dependent_relayhost_maps = hash:/usr/local/etc/postfix/relayhost_maps
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/usr/local/etc/postfix/sasl_passwd
smtp_use_tls = yes
Create /usr/local/etc/postfix/relayhost_maps with the following content:
yourusername@FreeBSD.org [smtp.freebsd.org]:587
Create /usr/local/etc/postfix/sasl_passwd with the following content:
[smtp.freebsd.org]:587 yourusername:yourpassword
If the email server is used by other people, you may want to prevent them from sending e-mails from your address. To achieve this, add this to your main.cf:
smtpd_sender_login_maps = hash:/usr/local/etc/postfix/sender_login_maps
smtpd_sender_restrictions = reject_known_sender_login_mismatch
Create /usr/local/etc/postfix/sender_login_maps with the following content:
yourusername@FreeBSD.org yourlocalusername
Where yourlocalusername is the SASL username used to connect to the local instance of Postfix.
Is this possible ?
Kind regards
Xavier