Sql based Spamassassin with sieve
Chris Hilts
chilts at birdbrained.org
Tue Sep 9 09:20:42 EDT 2003
> I am using a gateway spamassassin with Mailscanner. The problem is every
> user would like his own individual preferences stored.
>
> So I was looking if there was a way I could use sieve to fork
> spamassassin per user with the user name and the prefernces stored in
> Mysql database.
I didn't do it with Sieve. I have Postfix using procmail as my LDA, which
filters the incoming mail through spamd, then delivers into Cyrus using
(Debian) cyrdeliver.
Here is my /etc/procmailrc. I'm not good at procmail, so YMMV.
DELIVERMAIL="/usr/sbin/cyrdeliver"
IMAP="$DELIVERMAIL -e -a $USER $USER"
SPAMC="/usr/bin/spamc -u $USER"
## Trim out From: since Cyrus doesn't like it one bit
:0hfw
| /usr/bin/formail -I "From "
###########################################################
### Spam Assassin
###########################################################
:0fw
| $SPAMC
###########################################################
### Deliver it to the user inbox
###########################################################
:0 w
| $IMAP
:0 w
{
EXITCODE=$?
HOST
}
More information about the Info-cyrus
mailing list