[Python-checkins] python/dist/src/Lib smtpd.py,1.11,1.11.8.1
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Sat, 05 Oct 2002 20:45:42 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv26305
Modified Files:
Tag: release22-maint
smtpd.py
Log Message:
Backport 1.12 and 1.13 and normalize whitespace (remove formfeeds):
SF #515021, print the refused list to the DEBUGSTREAM, so the parameter is used
Note: There is a TBD (aka FIXME) for how best to handle the refused addresses.
smtp_RCPT(): Removed a somewhat embarrassing debugging line, found by
Scot Stevenson. Could be a bug fix candidate, but probably doesn't
matter much unless a certain blue-nosed cat suddenly becomes corporeal
and starts emailing some stmp.py (sic) fronted mailer.
Index: smtpd.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtpd.py,v
retrieving revision 1.11
retrieving revision 1.11.8.1
diff -C2 -d -r1.11 -r1.11.8.1
*** smtpd.py 4 Nov 2001 03:04:25 -0000 1.11
--- smtpd.py 6 Oct 2002 03:45:40 -0000 1.11.8.1
***************
*** 36,40 ****
"""
!
# Overview:
#
--- 36,40 ----
"""
!
# Overview:
#
***************
*** 97,101 ****
!
def usage(code, msg=''):
print >> sys.stderr, __doc__ % globals()
--- 97,101 ----
!
def usage(code, msg=''):
print >> sys.stderr, __doc__ % globals()
***************
*** 105,109 ****
!
class SMTPChannel(asynchat.async_chat):
COMMAND = 0
--- 105,109 ----
!
class SMTPChannel(asynchat.async_chat):
COMMAND = 0
***************
*** 242,248 ****
self.push('501 Syntax: RCPT TO: <address>')
return
- if address.lower().startswith('stimpy'):
- self.push('503 You suck %s' % address)
- return
self.__rcpttos.append(address)
print >> DEBUGSTREAM, 'recips:', self.__rcpttos
--- 242,245 ----
***************
*** 272,276 ****
!
class SMTPServer(asyncore.dispatcher):
def __init__(self, localaddr, remoteaddr):
--- 269,273 ----
!
class SMTPServer(asyncore.dispatcher):
def __init__(self, localaddr, remoteaddr):
***************
*** 319,323 ****
!
class DebuggingServer(SMTPServer):
# Do something with the gathered message
--- 316,320 ----
!
class DebuggingServer(SMTPServer):
# Do something with the gathered message
***************
*** 335,339 ****
!
class PureProxy(SMTPServer):
def process_message(self, peer, mailfrom, rcpttos, data):
--- 332,336 ----
!
class PureProxy(SMTPServer):
def process_message(self, peer, mailfrom, rcpttos, data):
***************
*** 349,353 ****
refused = self._deliver(mailfrom, rcpttos, data)
# TBD: what to do with refused addresses?
! print >> DEBUGSTREAM, 'we got some refusals'
def _deliver(self, mailfrom, rcpttos, data):
--- 346,350 ----
refused = self._deliver(mailfrom, rcpttos, data)
# TBD: what to do with refused addresses?
! print >> DEBUGSTREAM, 'we got some refusals:', refused
def _deliver(self, mailfrom, rcpttos, data):
***************
*** 376,380 ****
!
class MailmanProxy(PureProxy):
def process_message(self, peer, mailfrom, rcpttos, data):
--- 373,377 ----
!
class MailmanProxy(PureProxy):
def process_message(self, peer, mailfrom, rcpttos, data):
***************
*** 418,422 ****
refused = self._deliver(mailfrom, rcpttos, data)
# TBD: what to do with refused addresses?
! print >> DEBUGSTREAM, 'we got refusals'
# Now deliver directly to the list commands
mlists = {}
--- 415,419 ----
refused = self._deliver(mailfrom, rcpttos, data)
# TBD: what to do with refused addresses?
! print >> DEBUGSTREAM, 'we got refusals:', refused
# Now deliver directly to the list commands
mlists = {}
***************
*** 455,459 ****
!
class Options:
setuid = 1
--- 452,456 ----
!
class Options:
setuid = 1
***************
*** 461,465 ****
!
def parseargs():
global DEBUGSTREAM
--- 458,462 ----
!
def parseargs():
global DEBUGSTREAM
***************
*** 518,522 ****
!
if __name__ == '__main__':
options = parseargs()
--- 515,519 ----
!
if __name__ == '__main__':
options = parseargs()