[Mailman-Developers] smtplib buglet in 1.0b4
Scott
scott@chronis.pobox.com
Thu, 11 Jun 1998 19:35:25 -0400
the smtplib module in mailman 1.0b4 doesn't quite use strict rfc
complient smtp syntax. Vmailer is strict about it, and other mailers
may be as well. I changed smtplib.py so it sends "MAIL FROM:
<address>" and "RCPT TO: <address>" instead of "MAIL FROM: address"
and "RCPT TO: address".
scott
here's a patch:
chronis 7:32pm $ diff -c /home/mm/Mailman/smtplib.py /home/scott/mailman-1.0b4/modules/smtplib.py
*** /home/mm/Mailman/smtplib.py Thu Jun 11 19:30:06 1998
--- /home/scott/mailman-1.0b4/modules/smtplib.py Fri May 29 23:09:21 1998
***************
*** 64,77 ****
if headers:
hlines = string.split(headers, '\n')
lines = string.split(text, '\n')
! self._sock.send('MAIL FROM: <%s>\r\n' % frm)
self.getresp()
if type(to) == types.StringType:
! self._sock.send('RCPT TO: <%s>\r\n' % to)
self.getresp()
else:
for item in to:
! self._sock.send('RCPT TO: <%s>\r\n' % item)
self.getresp()
self._sock.send('DATA\r\n')
self.getresp()
--- 64,77 ----
if headers:
hlines = string.split(headers, '\n')
lines = string.split(text, '\n')
! self._sock.send('MAIL FROM: %s\r\n' % frm)
self.getresp()
if type(to) == types.StringType:
! self._sock.send('RCPT TO: %s\r\n' % to)
self.getresp()
else:
for item in to:
! self._sock.send('RCPT TO: %s\r\n' % item)
self.getresp()
self._sock.send('DATA\r\n')
self.getresp()