Procmail & SpamAssassin

Have a problem with Procmail. I want to deliver my spam to a folder called "spam". I have made a procmail file via usermin. It looks like this:

:0

  • ^X-Spam-Status: Yes
    spam/

Spamassassin is taging the emails, so I know it works. I just can’t get those to the spam folder. I do not have a .forward file. Do I need one and if so what should it contain?

Thanks

Hey Michael,

Post your /etc/procmailrc. The user-level stuff might be getting over-ridden by something in there (I’m just guessing, but it’s a possibility).

Also, are you sure your MTA is configured to deliver via Procmail? Postfix, for example, defaults to delivering directly. If you’re using Virtualmin Professional, this is configured for you during installation.

Joe,

Thanks for the reply.

My etc/procmailrc:
ORGMAIL=$HOME/Maildir/
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
:0

  • ?/usr/bin/test "$VIRTUALMIN" != ""
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    DEFAULT=$HOME/Maildir/
    DROPPRIVS=yes
    :0
    $DEFAULT

In Postfix under "Local Delivery":
/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME


I am using IMAP server if that makes a difference. I have notciced that occasionally I get some email put in the SPAM folder, but it is only maybe 10% of those marked.

I am using VirtPro