STARTTLS Server SMTP with cleartext and STARTTLS client support
Problem this snippet solves: We were looking at our O365 security score and our SMTP scores were pretty sad, so I looked at how I could create a STARTTLS connection up to O365 regardless of the clie...
Published May 02, 2019
Version 1.0Sam_Novak
Altostratus
Joined May 20, 2019
Sam_Novak
Altostratus
Joined May 20, 2019
Sam_Novak
May 02, 2019Altostratus
So just FYI, while this did work on a test client (I was using Nessus SMTP testing) other clients may not work because of the way they seem to handle sending commands. For example: Elastalert seems to send EHLO and that immediately after send the mail from: address, but a cleartext client needs to re-EHLO; while O365 does appear to accept this slight mis-ordering, when the client gets the command for data (354) it doesn't return any. So, you milage may vary.