Can anyone suggest an easy method using procmail to deliver mail to
subdirectories of /var/mail based on the first two characters of $LOGNAME. For
username ($LOGNAME) = abc
$MAILDIR = /var/mail/a/b
I have tried setting SHELL=/usr/bin/ksh and executing the korn shell "typeset"
command from within the /etc/procmailrc file to extract the first two
of $LOGNAME. However, procmail skips these lines for some reason. I get the
following messages when processing /etc/procmailrc:
procmail: Skipped "| typeset -L2 first2alphas=$LOGNAME"
procmail: Skipped "| typeset -L1 alpha1=$first2alphas"
procmail: Skipped "| typeset -R1 alpha2=$first2alphas"
Since this setup will be used by an ISP with a very heavy e-mail load, I am
looking for the most reliable and efficient method of doing this.
Any suggestions will be appreciated.