[Connection from: 127.0.0.1:44704] S: 220 ESMTP Service ready C: PROXY TCP4 [Redacted] [Redacted] 55180 60025 S: 500 Syntax error, command unrecognized C: ehlo [Redacted] S: 250-OK 250-SIZE 157286400 250-8BITMIME 250 SMTPUTF8 C: helo [Redacted] S: 503 Bad sequence of commands C: mail FROM: S: 250 OK C: rset S: 250 OK [Disconnected] --- [Connection from: 127.0.0.1:48824] S: 220 ESMTP Service ready C: PROXY TCP4 [Redacted] [Redacted] 38814 60025 S: 500 Syntax error, command unrecognized C: ehlo [Redacted] S: 250-OK 250-SIZE 157286400 250-8BITMIME 250 SMTPUTF8 C: helo [Redacted] S: 250 OK C: mail FROM: S: 250 OK C: rcpt TO: S: 250 recipient OK C: data S: 354 Start mail input; end with . [Disconnected] --- (mailtest.py is just the example from with the e-mail server/addresses changed) [Redacted]% python3 mailtest.py send: 'ehlo localhost.my.domain\r\n' reply: b'500 Syntax error, command unrecognized\r\n' reply: retcode (500); Msg: b'Syntax error, command unrecognized' send: 'helo localhost.my.domain\r\n' reply: b'250-localhost.my.domain\r\n' reply: b'250-SIZE 157286400\r\n' reply: b'250-8BITMIME\r\n' reply: b'250 SMTPUTF8\r\n' reply: retcode (250); Msg: b'localhost.my.domain\nSIZE 157286400\n8BITMIME\nSMTPUTF8' send: 'mail FROM:\r\n' reply: b'250 Ok\r\n' reply: retcode (250); Msg: b'Ok' send: 'rcpt TO:\r\n' reply: b'250 Ok\r\n' reply: retcode (250); Msg: b'Ok' send: 'data\r\n' reply: b'250 Ok\r\n' reply: retcode (250); Msg: b'Ok' data: (250, b'Ok') send: 'quit\r\n' reply: b'354 End data with .\r\n' reply: retcode (354); Msg: b'End data with .' Traceback (most recent call last): File "mailtest.py", line 18, in msg.as_string()) File "/usr/local/lib/python3.7/smtplib.py", line 882, in sendmail (code, resp) = self.data(msg) File "/usr/local/lib/python3.7/smtplib.py", line 560, in data raise SMTPDataError(code, repl) smtplib.SMTPDataError: (250, b'Ok')