[Python-bugs-list] [Bug #110687] mailbox module's maildir class broken? (PR#414)

noreply@sourceforge.net noreply@sourceforge.net
Fri, 22 Sep 2000 11:42:40 -0700


Bug #110687, was updated on 2000-Jul-31 14:14
Here is a current snapshot of the bug.

Project: Python
Category: Library
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 3
Summary: mailbox module's maildir class broken? (PR#414)

Details: Jitterbug-Id: 414
Submitted-By: arb@anand.org
Date: Wed, 26 Jul 2000 12:23:32 -0400 (EDT)
Version: 1.5.2
OS: i386-Redhat-linux 6.2


I'm using the "mailbox" module that comes with python. I'm trying to use the
maildir class in there, but I think it's not following the maildir protocol
properly. The maildir protocol specifies that in a Maildir, a message file
can have any name that is unique, as long as it doesn't begin with a period.
However, the maildir class looks for valid message filenames, by checking to
see if the filename has more than 1 period in it, ie. consists of 3 or more
sections separated by periods. Typically, this is the sort of name one finds
in a Maildir, because the Maildir protocol page describes one simple way of
creating a unique filename, ie. by using the timestamp, pid of the writer, and
the hostname. However, when I insert messages into a maildir which don't follow
that system of generating unique filenames,  the maildir class
of the module doesn't see them. Additioanlly, it _does_ see message files which
begin with a period, eg. .12345678.1234.hostname. This is also a violation of
the
maildir protocol. I believe that a maildir reader should simply look at all
files in a maildir, no matter what the name, except for those that begin with a
period.



====================================================================
Audit trail:
Wed Jul 26 18:15:33 2000	guido	moved from incoming to open

Follow-Ups:

Date: 2000-Aug-01 14:02
By: none

Comment:
From: Guido van Rossum <guido@beopen.com>
Subject: Re: [Python-bugs-list] mailbox module's maildir class broken? (PR#414)
Date: Wed, 26 Jul 2000 17:31:29 -0500

> I'm using the "mailbox" module that comes with python. I'm trying to
> use the maildir class in there, but I think it's not following the
> maildir protocol properly. The maildir protocol specifies that in a
> Maildir, a message file can have any name that is unique, as long as
> it doesn't begin with a period.  However, the maildir class looks
> for valid message filenames, by checking to see if the filename has
> more than 1 period in it, ie. consists of 3 or more sections
> separated by periods. Typically, this is the sort of name one finds
> in a Maildir, because the Maildir protocol page describes one simple
> way of creating a unique filename, ie. by using the timestamp, pid
> of the writer, and the hostname. However, when I insert messages
> into a maildir which don't follow that system of generating unique
> filenames, the maildir class of the module doesn't see
> them. Additioanlly, it _does_ see message files which begin with a
> period, eg. .12345678.1234.hostname. This is also a violation of the
> maildir protocol. I believe that a maildir reader should simply look
> at all files in a maildir, no matter what the name, except for those
> that begin with a period.

You're probably right.  I've never used that code, and according to
the logs it was contributed to Mike Meyer (no email known).  Perhaps
you would be willing to create a patch?  See
http://www.python.org/patches/ for submission guidelines.

--Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)


-------------------------------------------------------

Date: 2000-Aug-05 11:45
By: twouters

Comment:
This bug is still present. Fred is/was working on the 'mailbox' module, but I do not know whether he'll fix this, too. If not, I'll do it, it's not that big a chance.
-------------------------------------------------------

Date: 2000-Sep-07 15:01
By: jhylton

Comment:
Please do triage on this bug.
-------------------------------------------------------

Date: 2000-Sep-22 11:42
By: fdrake

Comment:
Fixed in Lib/mailbox.py revision 1.24.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110687&group_id=5470