yum install postfix
You must install SASL.
yum install cyrus-sasl cyrus-sasl-lib cyrus-sasl-plain cyrus-sasl-ntlm
In the /etc/postfix/main.cf
For having your mail relayed, add the line:
relayhost = [myexchangeserver.mycompany.com]:587
smtp_sasl_mechanism_filter = login ntlm
smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
In the sasl_password put your password
[myexchangeserver.mycompany.com]:587 myuser:mypassword
Then build the hash for it to be used by postfix.
postmap /etc/postfix/sasl_passwd
For rewriting the mail address:
sender_canonical_classes = envelope_sender, header_sender
sender_canonical_maps = regexp:/etc/postfix/sender_canonical_maps
header_checks = regexp:/etc/postfix/header_checks
in /etc/postfix/header_checks
/From:.*>/ REPLACE From: My Name
Aucun commentaire:
Enregistrer un commentaire