[Spambayes] hammie misquote?

Neale Pickett neale at woozle.org
Wed Dec 4 05:08:38 2002


Skip Montanaro <skip@pobox.com> writes:

> Nothin' special about my directory.  It's of the usual Unix variety.
> Its contents are the one message per file thing Tim defined for
> testing.  What are "Maildirs"?  How do they differ from Tim's thing?

Maildirs are, well, here's a picture.

$HOME/Maildir/
              new/
                  1038978004.24787_1.gwydion
              cur/
                  1037168130.15835_0.gwydion,S=542:2,S
                  1037214764.7823_0.gwydion,S=1749:2,S
              tmp/

So the idea here is that when the MTA is writing a new message, it does
so in a new file in tmp/, one file per message.  When it's done, it
renames the file into the new/ directory (that's an atomic operation on
just about every FS).  Then when your client has read the message, it
puts in in the cur/ directory.  So you don't need to lock anything.
It's super-de-duper for NFS-mounted mail directories, and beats mbox
files on everything but indexing.  Google maildir for more info.

So strictly speaking, all files in a Maildir have to be named
NUMBER.STRING.STRING.  But our stuff just reads in every file in the
directory.  I made a symlink to my Set1 directory called "cur" and told
it to train on Data/Ham.  So it slurped in every file.

An MH directory, on the other hand, doesn't have the new/ cur/ and tmp/
subdirectories, all the messages are in the same directory.  And they
all have to be numbers, starting at 1.

The way mboxutils works currently, it first tries to read the directory
as a maildir (looking for a "cur" subdirectory).  Then, if "/Mail/" is
in the pathname, it reads it as an MH directory.  Otherwise, it treats
it as a directory of text files and only reads *.txt and *.lorien (what
is this?) files.

So I guess we could change that last option to read everything, but it
has to be that way for some reason.  Anyone care to elucidate this
point?

Neale



More information about the Spambayes mailing list