From Stu2
Jump to navigation Jump to search

Office 365

Culled from many sources. office365 uses TLS and the 'login' filter. BUT, it will only accept messages from the user, so you have replace the user in the mail header with [email protected], where [email protected] is the user account name. So all messages will appear to originate from [email protected] postfix amazes me.
relayhost =
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwordfile
smtp_sasl_mechanism_filter = plain, login
smtp_sasl_security_options = noanonymous
sender_canonical_classes = envelope_sender, header_sender
sender_canonical_maps = regexp:/etc/postfix/sender_canonical_maps
smtp_header_checks = regexp:/etc/postfix/header_check

sasl_passwordfile [email protected]:password

followed by:
postmap sasl_passwordfile

In sender_canonical_maps (same user as above):

/.+/     [email protected]

In header_check (same user as above):

/From:.*/ REPLACE From: [email protected]