Bowie Bailey said the following on 01/15/2003 04:36 PM:
Hello Bowie,
I am working on installing SpamAssassin on my Courier mail server.  The
problem is that many of the accounts are forwarded to another mail server
via .courier files rather than being delivered locally.  If I deliver
locally, I can do "| spamassassin | maildrop", but how do I do this if the
mail should be forwarded?

I searched the list archives, and found another reference to this problem,
but no solutions.  Is there a way to do it?
I suggest running spamassasin as a daemon and using spamc for checking the mail against spam as this will get you better performance.

In the .courier-files I only have:
| maildrop

Now I have a file /etc/courier/maildroprc like:
--- snip ---
# /etc/courier/maildroprc
include "/etc/courier/maildroprcs/default"
--- snap ---

Note that you may get around with stuffing the content of /etc/courier/maildroprcs/default directly into /etc/courier/maildroprc however for virtual accounts you have to use the maildroprcs-construct.

In /etc/courier/maildroprcs/default I have:
--- snip ---
# /etc/courier/maildroprcs/default
PATH=/bin:/usr/bin:/usr/local/bin:/usr/lib/courier/bin/
INBOX="Maildir/"
DEFAULT="$INBOX"
SPAMFLD="$INBOX.Trash/"
SHELL=/bin/ash

# create the trash directory if it does not exist
`test -d "$SPAMFLD"`
if( $RETURNCODE == 1 )
{
`maildirmake "$SPAMFLD"`
}

# filter message
xfilter "/usr/bin/spamc -f"
if ( /^X-Spam-Status: Yes,/)
{
DEFAULT="$SPAMFLD"
}
--- snap ---

Now if you do not have an individual .maildroprc, mail will go to $DEFAULT, for Spam this is set to $SPAMFLD.

You may override this behaviour by specifying the following in .maildropc:
to "[EMAIL PROTECTED]"

If a user wants his/her Spam she may say:
to $INBOX

I first had a seperate spam folder instead of $INBOX.Trash but using Mozilla as a mail client I may now just empty the trash to get rid of the spam ;-).

Best Regards
Mirko





-------------------------------------------------------
This SF.NET email is sponsored by: A Thawte Code Signing Certificate is essential in establishing user confidence by providing assurance of authenticity and code integrity. Download our Free Code Signing guide:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to