procmail
[Top] [All Lists]

Custom mail directories

1996-09-23 09:23:44
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 
example:

        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 
characters 
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.

g.e.

<Prev in Thread] Current Thread [Next in Thread>