Bug 1575424 - smtp.office365.com won't talk XOAUTH2 to postfix
Summary: smtp.office365.com won't talk XOAUTH2 to postfix
Alias: None
Product: Fedora
Classification: Fedora
Component: cyrus-sasl
Version: 28
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-05-06 19:28 UTC by Tom Horsley
Modified: 2019-05-28 23:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-28 23:04:54 UTC
Type: Bug

Attachments (Terms of Use)

Description Tom Horsley 2018-05-06 19:28:53 UTC
Description of problem:

I copied everything I was doing in fedora 27 to fedora 28, including my postfix relayhost setup to send everything to smtp.office365.com. In fedora 27 this all worked. In fedora 28, the mail queued up with errors when attempting to authenticate on the relay. With extra debug turned on, the errors looked like:

May  6 14:29:05 tomh postfix/smtp[406521]: starting new SASL client
May  6 14:29:05 tomh postfix/smtp[406521]: name_mask: noanonymous
May  6 14:29:05 tomh postfix/smtp[406521]: smtp_sasl_authenticate: smtp.office365.com[]:587: SASL mechanisms LOGIN XOAUTH2
May  6 14:29:05 tomh postfix/smtp[406521]: xsasl_cyrus_client_get_user: Tom.Horsley@concurrent-rt.com
May  6 14:29:05 tomh postfix/qmgr[406467]: warning: private/smtp socket: malformed response

After much poking around, I found the postfix setting:

smtp_sasl_mechanism_filter = login

That forced postfix to use LOGIN, not XOAUTH2, and all the mail sending started working again.

Version-Release number of selected component (if applicable):

How reproducible:
100% (at least with office365)

Steps to Reproduce:
1.configure relayhost to smtp.office365.com
2.watch postqueue -p as the queue fills up

Actual results:
failure to send mail

Expected results:
sending mail

Additional info:

Since oauth2 was invented by google, I have a major tendency to suspect microsoft's implementation isn't compatible with whatever standard might exist, but I know nothing for sure.

Comment 1 Jakub Jelen 2018-05-07 08:01:47 UTC
Thank you for filling a bug report and testing with a new version. There were many changes in the recent cyrus-sasl update (not sure if something changed in postfix -- it would be great if you could reproduce the same issue with the old postfix to isolate the issue to cyrus-sasl), but I don't know details about XOAUTH2 mechanism in sasl so filling also upstream issue might get you some more feedback, ideas if this can be fixed somehow from more knowledgeable developers:


Comment 2 Tom Horsley 2018-05-07 13:10:26 UTC
I submitted this new issue pointing to this bugzilla:

(so now they point to each other).

Comment 3 Ben Cotton 2019-05-02 20:32:17 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2019-05-28 23:04:54 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.