R. David Murray <rdmur...@bitdance.com> added the comment: Thanks for the patch.
I think this is fine. An alternate approach would be to introduce the concept of a state (like imaplib has), have a list of which commands are allowed in which state, and implement the check in the command processing function, but that may not be worth it at smtpd's current level of complexity. One change I'd like to see in the patch (and test): postfix in this case responds: 503 Error: send HELO/EHLO first And I think that is more useful than the text 'Bad sequence of commands'. ---------- nosy: +r.david.murray stage: -> patch review _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14269> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com