"=?ISO-8859-1?Q?Gjermund S=8F8rseth?=" <gjermund(_at_)nextel(_dot_)no> writes:
Just a few things:
1) Procmail delivers mail to maildirs using filesnames like
_WSB,5RtO4.hostname. How is the first part derived - and why is
it different from time.pid.hostname as described in the qmail
The format is
the pid, base64 encoded left to right
one of the set .,+:%@
the time, base64 encoded left to right
the hostname, or at least the beginning of it
The final filename will be at least 14 characters long, unless that
would put the total path be written to over the system limits in which
case procmail will keep chopping off characters until it fits.
It differs because a) it generates shorter filenames, and b) fits better
into the procmail code base that way. However, the exact format of
the filenames is to be considered an implementation detail, so don't
I'll note that the qmail maildir manpage suffers from the defect of
either being descriptive and not prescriptive, or over specifying: it
describes how that original qmail implementation works, but does not
make on what matters _all_ implementations must match. According to the
"HOW A MESSAGE IS READ" section, programs which read messages in maildir
folders treat the actual filename as an opaque blob, so the above method
of picking a unique filename should work fine.
2) A minor annoyance - procmail still creates /var/mail/user before
reading the procmailrc files, so even if you deliver mail in
maildirs in the users home directories you still get a directory
full of files which is searched on every delivery. No big deal for
a small server, but if you have a few hundred thousand or more
users it will render your mail server unusable, so it doesn't
scale well. I circumvent it by saying:
#define MAILSPOOLDIR "/no/such/dir/"
but the behavior is counter-intuitive.
Why don't you just compile the correct mailbox path into procmail? Put
#define MAILSPOOLHOME "/.mail/"
at the top of src/authenticate.c to have procmail deliver to $HOME/.mail/
(i.e., $HOME/.mail as a maildir folder) by default. It'll even create
it as a directory for you then.