Having issues setting Office 365 as relay in postfix

yum install cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5


[smtp.office365.com]:587 user@xompany.com:password


relayhost = [smtp.office365.com]:587
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_auth_enable = yes
smtp_generic_maps = hash:/etc/postfix/generic

smtp_tls_security_level = may
smtp_sasl_security_options = noanonymous

cat /etc/sasl2/smtpd.conf

pwcheck_method: saslauthd

mech_list: plain login


localhost postfix/smtp[6073]: 60B1E400E9F9: SASL authentication failed; server smtp.office365.com[] said: 535 5.7.3 Authentication unsuccessful [VI1PR07CA0165.eurprd07.prod.outlook.com]

what am i missing ? I see in some guides SSL certificates are used, if it's a must, what's procedure to obtain them ?


Got it working, i missed one letter in username, once corrected it ran postmap hash:/etc/postfix/sasl_passwd,restarted postfix and messages started to flow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.