Kaydet (Commit) e1c9e10c authored tarafından Raymond Hettinger's avatar Raymond Hettinger

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.
üst 6b7a7d24
......@@ -241,9 +241,6 @@ class SMTPChannel(asynchat.async_chat):
if not address:
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
self.push('250 Ok')
......@@ -348,7 +345,7 @@ class PureProxy(SMTPServer):
data = NEWLINE.join(lines)
refused = self._deliver(mailfrom, rcpttos, data)
# TBD: what to do with refused addresses?
print >> DEBUGSTREAM, 'we got some refusals'
print >> DEBUGSTREAM, 'we got some refusals:', refused
def _deliver(self, mailfrom, rcpttos, data):
import smtplib
......@@ -417,7 +414,7 @@ class MailmanProxy(PureProxy):
if rcpttos:
refused = self._deliver(mailfrom, rcpttos, data)
# TBD: what to do with refused addresses?
print >> DEBUGSTREAM, 'we got refusals'
print >> DEBUGSTREAM, 'we got refusals:', refused
# Now deliver directly to the list commands
mlists = {}
s = StringIO(data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment