I use this for procmail invoked by postfix as

proccyrus   unix        -       n       n       -       -       pipe  flags=R user=cyrus argv=/usr/bin/procmail -p /etc/procmailrc.cyrus CYRUSER=${user} EXTENSION=${extension}


In otherwords, procmail is invoked running as the cyrus user, with the addressee user passed in as CYRUSER:


#################################################
# procmailrc
# you must explicitly set a path if you're gong to be spawing programs
PATH=/usr/cyrus/bin:/bin:/usr/bin:/usr/local/bin
SHELL=/bin/bash
LOGFILE=/tmp/cyrus.$CYRUSER.log
DELIVERMAIL=/usr/cyrus/bin/deliver
HOME=/home/$CYRUSER

###############################
# If users want to be able to define their own private recipes
# and put them in their home .procmailrc files, comment out
# the next definition.
#
# These recipes will be processed BEFORE the user-specific
# recipes that are kept in the /home/cyrus directory
#
#INCLUDERC=/home/$CYRUSER/.procmailrc

EXITCODE=

# First apply spam assassin
:0fw
| /usr/bin/spamc -f -u $CYRUSER

# spamc inserts a 'From ' line
:0af
| /usr/bin/tail +2

:0w
| $DELIVERMAIL -e -q $CYRUSER

# If at first you don't succeed...
:0 ew
| $DELIVERMAIL -e -q $CYRUSER

:0 e
{
        EXITCODE=$?
}


The double-delivery attempt was because for some reason cyrus wasn't spawning enough delivery-acceptor processes and deliver was failing.  I couldn't track down why that was happening, so I just switched to trying delivery twice from procmail.

The "tail +2" can be eliminated in the newly released 2.0 version by using jm's -F0 flag to spamd.

C

On Wed, 2002-01-23 at 14:50, Mike Coughlan wrote:
Can someone please send a sample .procmailrc for courier.

This seems to work, I made it up, but I'd like a sanity check before I go
live.

Thanks


=========================

# This added for Maildir support (Courier-IMAP)
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR


:0fw
| spamassassin -P

:0e
{
   EXITCODE=$?
}

:0:
* ^Subject:.*\*\*\*\*SPAM\*\*\*\*
.caughtspam/new


_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk


Reply via email to