--- test_smtpd-orig.py 2012-03-19 16:09:19.251542425 -0400 +++ test_smtpd.py 2012-03-19 16:15:05.363542305 -0400 @@ -166,6 +166,11 @@ self.assertEqual(self.channel.socket.last, b'503 Error: nested MAIL command\r\n') + def test_HELO_EHLO_before_mail_transaction(self): + self.write_line(b'MAIL from:') + self.assertEqual(self.channel.socket.last, + b'503 Error: send HELO first\r\n') + def test_need_RCPT(self): self.write_line(b'MAIL From:eggs@example') self.write_line(b'DATA')