From: David Levine Date: Sun, 27 Mar 2016 16:00:16 +0000 (-0400) Subject: Don't call sm_auth_sasl() for XAUTH2 with -sasl. Instead, X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/2ca6b6161c8db6d26e4f1c5147f54984c6b6cc0e?ds=inline;hp=--cc Don't call sm_auth_sasl() for XAUTH2 with -sasl. Instead, call only sm_auth_xoauth2(). --- 2ca6b6161c8db6d26e4f1c5147f54984c6b6cc0e diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index 39cb713a..1403102b 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -375,7 +375,10 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose, saslmech, server_mechs); } - if (sm_auth_sasl(user, saslssf, saslmech ? saslmech : server_mechs, + /* Don't call sm_auth_sasl() for XAUTH2 with -sasl. Instead, call + sm_auth_xoauth2() below. */ + if (xoauth_client_res == NULL && + sm_auth_sasl(user, saslssf, saslmech ? saslmech : server_mechs, server) != RP_OK) { sm_end(NOTOK); return NOTOK;