@@ -90,15 +90,15 @@ def flush(self): pass
9090EMPTYSTRING = ''
9191
9292
93-
93+
9494def usage (code , msg = '' ):
9595 print >> sys .stderr , __doc__ % globals ()
9696 if msg :
9797 print >> sys .stderr , msg
9898 sys .exit (code )
9999
100100
101-
101+
102102class SMTPChannel (asynchat .async_chat ):
103103 COMMAND = 0
104104 DATA = 1
@@ -263,7 +263,7 @@ def smtp_DATA(self, arg):
263263 self .push ('354 End data with <CR><LF>.<CR><LF>' )
264264
265265
266-
266+
267267class SMTPServer (asyncore .dispatcher ):
268268 def __init__ (self , localaddr , remoteaddr ):
269269 self ._localaddr = localaddr
@@ -310,7 +310,7 @@ def process_message(self, peer, mailfrom, rcpttos, data):
310310 """
311311 raise UnimplementedError
312312
313-
313+
314314class DebuggingServer (SMTPServer ):
315315 # Do something with the gathered message
316316 def process_message (self , peer , mailfrom , rcpttos , data ):
@@ -326,7 +326,7 @@ def process_message(self, peer, mailfrom, rcpttos, data):
326326 print '------------ END MESSAGE ------------'
327327
328328
329-
329+
330330class PureProxy (SMTPServer ):
331331 def process_message (self , peer , mailfrom , rcpttos , data ):
332332 lines = data .split ('\n ' )
@@ -367,7 +367,7 @@ def _deliver(self, mailfrom, rcpttos, data):
367367 return refused
368368
369369
370-
370+
371371class MailmanProxy (PureProxy ):
372372 def process_message (self , peer , mailfrom , rcpttos , data ):
373373 from cStringIO import StringIO
@@ -405,7 +405,7 @@ def process_message(self, peer, mailfrom, rcpttos, data):
405405 # since we don't expect a large number of recipients.
406406 for rcpt , listname , command in listnames :
407407 rcpttos .remove (rcpt )
408- # If there's any non-list destined recipients left,
408+ # If there's any non-list destined recipients left,
409409 print >> DEBUGSTREAM , 'forwarding recips:' , ' ' .join (rcpttos )
410410 if rcpttos :
411411 refused = self ._deliver (mailfrom , rcpttos , data )
@@ -447,7 +447,7 @@ def process_message(self, peer, mailfrom, rcpttos, data):
447447 msg .Enqueue (mlist , torequest = 1 )
448448
449449
450-
450+
451451class Options :
452452 setuid = 1
453453 classname = 'PureProxy'
@@ -502,7 +502,7 @@ def parseargs():
502502 return options
503503
504504
505-
505+
506506if __name__ == '__main__' :
507507 options = parseargs ()
508508 # Become nobody
0 commit comments