[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mailbox path formatting feature



Matti and guys,

what do you think about the following feature.  If you specify a
special new variable in zmailer.conf, it overrides MAILBOX variable
and allows to specify the format of the path to the user's mailbox,
that may include userid, homedir, PJW hash, domain etc.  Like this:

# int fmtmbox(char *buf, int size, const char *format,
#             const char *address, const struct passwd *pwd);
#
# format specifiers:
#
# %% - '%' alone
# %u - userid
# %U - long user name (userid if not supported)
# %d - first element of domain name
# %D - full domain name
# %x - one-character derivate of PJW hash of userid
# %X - two-character derivate of PJW hash of userid
# %h - userid's home directory
# %d - least number guaranteening unique filename (for MH style boxes)
# %D - the same padded by leading zeroes to fixed length
# %(any other character) - substitute with "__" (two underscores)
#
# Examples:
# "/var/mail/%u"               - standard mail directory
# "/var/mail/%X/%u             - hashed directory
# "%h/Mail/INBOX"              - mailbox in user's home
# "/var/virtual/%D/mail/%X/%u" - hashed spool with virtual domain

I think that I could work out such a thing...

Eugene