Reading pipermail archives with mutt

Thomas Wouters thomas at xs4all.net
Tue Feb 1 15:15:31 CET 2000


On Mon, Jan 31, 2000 at 05:37:28PM +0100, Gregor Hoffleit wrote:

> Somehow mutt is not able to read the mail archives downloadable from
> Python.org's SIG pages. The simple /bin/mail will grok them correctly
> and list the contents, but mutt doesn't find any mails.
> 
> IIRC, that's true not only for Python.org's mailing list archives, but
> also for other archives. I'm not sure, though, if these archives perhaps
> are all written by pipermail.
> 
> Has anybody else noticed this before ? Is there any simple resolution ?

Hadn't noticed it before, but now that you mention it.... ;) It's a problem
in both mutt and pine, by the way, and it looks like it's a problem in
pipermail itself. The problem is the From line, which marks the start of a
message in a mailbox-format file. To be more specific, the problem is the
date on that line. The dates by pipermail look like this :

>From foobar Sun, 02 Jan 2000 11:52:52 +1100

Whereas those stored by procmail, pine, mutt et al look like this:

>From foobar Sun Jan  2 11:52:52 2000

Manually fixing the dates in the from-lines makes the archive perfectly
readable.

I couldn't find a specification for the From line (though it's probably
located somewhere in the sendmail source, if not the docs) but I suspect the
date on the From line does not follow the RFC822 date specification. At
least, mutt and pine refuse to read a RFC822-valid date on the From line.
And, now that I check it, so does mailbox.py; mailbox.py uses the following
regexp to check the From line:

>From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*$

So I guess pipermail should be fixed, and possibly a 'fixfromline' script
added to the distribution to convert old archives to the new From line
format ;)

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list