I'm using Debian stretch (9.4).
I have an office365 account.
Using Evolution, I can successfully download mail via POP3, and also send mail using the Evolution "Sending E-mail" preferences:
Server: smtp.office365.com Port: 587 Server requires authentication TICKED Encryption method: STARTTLS after connecting Authentication: Login Username: <myid@mydomain>
and Evolution prompted me for my office365 password the first time I used it, and it's been fine since.
So that's great. However:
I also have some crontab scripts which occasionally send email programmatically via
sendmail -t as described here. The
exim4-config package was configured for "mail sent by smarthost; no local mail" and the outgoing smarthost to
smtp.office365.com::587. I also have
/etc/exim4/passwd.client containing a
Until around a month ago (I think they stopped working sometime in the first week of June), those scripts were sending email via
smtp.office365.com absolutely fine. However, since then, for each email attempted to be sent
/var/log/exim4/mainlog now shows a bunch of error messages along the lines of:
2018-06-12 22:04:37 XXXXXX-XXXXXX-XX <= <> R=XXXXXX-XXXXXX-XX U=Debian-exim P=local S=2270 2018-06-12 22:04:42 XXXXXX-XXXXXX-XX H=outlook.ms-acdc.office.com [184.108.40.206] TLS error on connection (recv): The TLS connection was non-properly terminated. 2018-06-12 22:04:42 XXXXXX-XXXXXX-XX H=outlook.ms-acdc.office.com [220.127.116.11] TLS error on connection (send): The specified session has been invalidated for some reason. 2018-06-12 22:04:42 XXXXXX-XXXXXX-XX ** <myid@mydomain> R=hub_user_smarthost T=remote_smtp_smarthost H=outlook.ms-acdc.office.com [18.104.22.168] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="C=US,ST=Washington,L=Redmond,O=Microsoft Corporation,CN=outlook.com": SMTP error from remote mail server after pipelined MAIL FROM:<> SIZE=3347: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [LO2P265CA0067.GBRP265.PROD.OUTLOOK.COM] 2018-06-12 22:04:42 XXXXXX-XXXXXX-XX Frozen (delivery error message)
It's not clear to me whether something has changed at microsoft's end or my end (my machine is vanilla Debian stable amd64; I can't remember if there were any relevant security updates might have been applied around the time things stopped working). I suspect Microsoft might have tightened up authentication in some way, and I need to change something in the exim4 configuration to deal with it (I'll reiterate that Evolution has been sending mail through the same
smtp.office365.com:587 channel without issue the whole time). I'm puzzled and grateful for any suggestions how to get the
sendmail -t method working again.