From: Guido van Rossum Date: Mon, 22 Oct 2007 16:27:19 +0000 (+0000) Subject: Issue #1307, patch by Derek Shockey. X-Git-Tag: v2.6a1~1141 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e81270b22ee6cfe6d7ead43ccbc258964cf14a7;p=thirdparty%2FPython%2Fcpython.git Issue #1307, patch by Derek Shockey. When "MAIL" is received without args, an exception happens instead of sending a 501 syntax error response. --- diff --git a/Lib/smtpd.py b/Lib/smtpd.py index c656ec76396a..4aa34763ecff 100755 --- a/Lib/smtpd.py +++ b/Lib/smtpd.py @@ -221,7 +221,7 @@ class SMTPChannel(asynchat.async_chat): def smtp_MAIL(self, arg): print >> DEBUGSTREAM, '===> MAIL', arg - address = self.__getaddr('FROM:', arg) + address = self.__getaddr('FROM:', arg) if arg else None if not address: self.push('501 Syntax: MAIL FROM:
') return