Hi,

Thanks Randy and Gordon for your help with this :) Gordon, I agree, the dot-courier file setup might be overly complicated. There's really only a few mail accounts that I care about and I like the flexibility so it hasn't been too tough to manage, but someday I will probably take the next step and database these entries, leaving the dot-courier files for special cases.

On to my problem, and it's eventual solution. Long story short is that I ended up using a maildrop filter file which is invoked from each .courier file as: | '/usr/lib/courier/bin/maildrop /var/mail/vhosts/spam_filter /path/to/maildir/for/this/user

The file 'spam_filter' has:
xfilter "/usr/bin/spamc"
if (/^X-Spam-Status: Yes/:h)
{
       EXITCODE=64
}
else
{
       to "$1"
       EXITCODE=0
}

This will bounce spam and deliver ham to the mailbox specified by $1 with the SpamAssassin headers added. The trickiest part was to figure out what the error message from maildrop 'unable to write to filter' was trying to tell me. I am running courier and spamassassin as user 'mail', group 'mail' and this user had '/sbin/nologin set as its shell. I changed this to '/bin/bash' and that fixed it.

Thanks again for the help and to the Courier team for this really fine software!

Cheers,
Joe Meadows


Randy Smith wrote:
Joe Meadows wrote:
Hi,
[snip]

Seems like this ought to be easy to setup and I just need to know the
magic line or two that will do it :)


It is easy to do. I have some docs up at
http://perlstalker.vuser.org/tiki/tiki-index.php?page=CourierSpamAssassin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to