[Mailman-Users] Re: [Mailman-Developers] Looping digest - mailman bug?
Mon, 30 Jul 2001 23:33:56 +0200
On Mon, Jul 30, 2001 at 01:37:08PM -0700, alex wetmore wrote:
> On Mon, 30 Jul 2001, Thomas Wouters wrote:
> > Sorry, this is the wrong fix. "\n." isn't the pattern that breaks it; you
> > want "\r?\n.\r?\n". And the proper escape of a single dot on a line is
> > doubling it (see the SMTP standard.) Barry, do you have a clue whether
> > msgtext is guaranteed (not) to have \r's (CR) in them ? If either is
> > guaranteed, we don't even need to use that ugly 're' module :)
> RFC2822 requires CRLF to end a line, not just LF and not just CR.
> However there are many broken SMTP clients which ignore this
That's not the issue; IIRC, both the smtplib module (used by the SMTPDirect
delivery in Mailman) as the Sendmail deliverer use CRLF's, adding CR's where
necessary. (One of the very best reasons for a 'rich' standard library like
Python's is strict compliance to the standards. Like you say, the CR/LF
issue is ignored by so many mail-sending and -receiving applications, it's
just not funny. By using smtplib, the burden gets lifted off your shoulders,
and you do it 'correct' whether you want it or not :)
My question was whether the message text, at that moment, was guaranteed to
contain CR's (or guaranteed not to contain them.) I'm not sure what kind of
mangling Barry's mimelib does :)
Thomas Wouters <email@example.com>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!