I've recently got a server setup and everything working.  Virtual domains
authenticate off mySQL and life is good.  However I'm having a difficult
time deciding how procmail/spam filtering fits into the mix.  It's
working, but I think I've done a bit of a hack, and I was hoping somebody
could point me in a better direction.  Currently I would like ALL mail
coming in to be filtered with SpamAssassin.  So I setup the delivery to be
procmail and the /etc/procmailrc to be:

# Spam filter
:0fw
| /usr/bin/spamc

# Use maildir-style mailbox in user's home directory
DEFAULT=$HOME/Maildir/

But if it is a virtual user/domain I would like them seperated out into:

/home/vmail/<domain>/<account>/Maildir/

This is where the problem begins.  Currently I have a
/home/vmail/.procmailrc which is:

DOMAIN=`cat | egrep "^To:" | awk -F @ '{ print $2 }'`
ACCOUNT=`cat | egrep "^To:" | awk '{ print $2 }' | awk -F @ '{ print $1 }'`

DEFAULT=/home/vmail/${DOMAIN}/${ACCOUNT}/Maildir/

Which works, but I personally think I'm missing something that would make
it easier.  I do set the "maildir" and "homedir" specification in the
mySQL table, but as far as I can tell, it isn't passed to procmail.  No
matter what $MAILDIR defaults to /home/vmail.

So my question is:  Is there a better way to have manditory spam filtering
and still have the accounts seperated out?  Any suggestions or comments
would be most apreciated.

--
-James


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to