I've had quite an extensive grovel around gmane.org and still can't quite find a posting answering the following:
I'm using maildrop's xfilter command to invoke spamc for a group of both virtual and non-virtual mail accounts.
In each case, I want a local .spamassassin/user_prefs to prevail.
However, if I use spamc -u $USER, spamd doesn't find the virtual user because these are found using authdaemond which isn't available to spamd. At this point, spamd just hands the mail back for further delivery without performing any spam checks.
If I don't specify -u $USER, spamd uses the .spamassassin/user_prefs from the single physical account associated with all the virtual mailboxes.
The -u option appears unwanted anyway, as spamd then does it's best to get the user's HOME directory, ignoring what was passed in.
Hello Alan,
here I use spamassassin-2.60-1 with the startup-parameters for spamd:
[EMAIL PROTECTED] mirko]$ cat /etc/sysconfig/spamassassin
# Options to spamd
SPAMDOPTIONS="-d -c -a -x -u vmail --virtual-config-dir=/home/vmail/domains/%d/%l --socketpath=/var/run/spamassassin.sock"
Here I use a unix-socket as I do not need to communicate over the network.
This is my /etc/courier/maildroprc: ---- import SENDER import RECIPIENT import HOME import USER PATH=/bin:/usr/bin:/usr/local/bin:/usr/lib/courier/bin/ INBOX="Maildir/" DEFAULT="$INBOX" SPAMFLD="$INBOX.Trash/" SHELL=/bin/ash
# create needed directory
`test -d "$SPAMFLD"`
if( $RETURNCODE == 1 )
{
`maildirmake "$SPAMFLD"`
}# filter message
if ( $SIZE < 512000 )
{
xfilter "/usr/bin/spamc -U /var/run/spamassassin.sock -u $USER"
}
if ( /^X-Spam-Status: Yes,/)
{
DEFAULT="$SPAMFLD"
}
----$USER will be set to sth. like [EMAIL PROTECTED], using the spamdoptions from above this will translate into /home/vmail/domains/example.com/foo/user_prefs
The autowhitelist will go to:
/home/vmail/domains/example.com/foo/.spamassassin/auto-whitelist
Regards Mirko
------------------------------------------------------- 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
