Deana Bomestar wrote:
Is there a shortcut to getting procmail to do a hashed mail
directory? I wrote a little c program to spit out a nice
path depending on the user's name, and I stuck this into
/etc/procmailrc like this:
MAILDIR=/var/spool/mail/`hashusername $LOGNAME`
DEFAULT=$LOGNAME
and this seems to work. It is a bit ugly.
What we do is to put the hashed directories in the password file as the
users home directory, and then just make
procmail deliver mail to the home directories. This makes procmail
unaware of the hashing algorithm used. If I remember correctly, procmail
has one or two hashing algorithms built in that you can choose from,
but those aren't the best (we use our own).
The goal of this is to reduce the number of files in /var/spool/mail,
of course, but everytime procmail runs, it creates the ORGMAIL
file /var/spool/mail/username. This of course creates thousands
of empty files in the directory, which is exactly what I want to
avoid.
How can I get it to stop creating these files? Is there a better
way to get a hashed spool directory structure?
In my central /etc/procmailrc I put something like
ORGMAIL = /no/such/directory
...which never exists. This seems to work.
--
Gjermund Sørseth