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

arb@anand.org arb@anand.org
Thu, 27 Jul 2000 13:28:45 -0400 (EDT)

On Wed, Jul 26, 2000 at 05:31:29PM -0500, Guido van Rossum wrote:

> > 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.

Hello Guido,

Thanks for looking at my bug report.

Well, I can try to make the patches. I'm fairly new to python, so I don't
know how long it will take me, but I need to use the module, so I'll
certainly have to modify it. I'll come back to you when I've produced
something presentable.