Re-enabling spamassassin breaks procmail

I originally had switched off the built in spam and virus filtering for my templates and was going to use ASSP instead. Long story short, I couldn’t get it going, so I’ve removed it and gone back to the original settings.

I also enabled the spam and virus options in the “features and options” section and enabled them all in the existing domains. As far as I can tell, this is all working fine, except now the rules I’d added via “Filter and Forward Mail” are no longer being applied.

The admin for mail rules in usermin shows :

Always Perform spam classification
Email is spam Save in folder Spam

followed by all of my rules which were working half an hour ago. Is there something in the process of enabling this after the original domain creation which would break the setup? Where is the best place to look?

One other possible complication is that I also added postgrey via apt-get. The only postfix change I made was to the main.cf file where it now reads :

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_policy_service inet:127.0.0.1:60000

This appears to be correct as the service is running, so I’m not sure if that’s related.

Thanks,
Nick

Hi Nick,

In your /etc/postfix/main.cf, what is "mailbox_command" set to?

Also, what does your /etc/procmailrc file look like?
-Eric

Okay, so that all looks good.

So, the original problem was that you were saying that the filters you created weren’t having any affect.

When you send an email to a user with a filter setup, look in /var/log/procmail.log – are there any errors in there? A procmail error would cause the symptoms you described.
-Eric

This is the last message in the log :

From FMPRO-L@LISTSERV.DARTMOUTH.EDU Thu Apr 2 03:59:34 2009
Subject: locking records
Folder: /home/goya/homes/nick/Maildir/new/1238659217.18923_0.ubuntu 4783
Time:1238659217 From:cruisingsolutions@BIGPOND.COM To:FMPRO-L@LISTSERV.DARTMOUTH.EDU User:nick-goya.com.au Size:4845 Dest:/home/goya/homes/nick/Maildir/new/1238659217.18923_0.ubuntu Mode:None

which I can see should match a rule in the rules list of :

Headers match Reply-To.*FMPRO-L@LISTSERV.DARTMOUTH.EDU	Save in folder Lists.FMOther

I had a look in the actual .procmailrc file and found :

:0

  • Reply-To.*FMPRO-L@LISTSERV.DARTMOUTH.EDU
    $HOME/Maildir/.Lists.FMOther/

Thanks,
Nick

Also to explain. After the virtualmin install I modified the templates to turn virus and spam scanning off. Then created the domain and some users. Then turned virus and spam back on, first in the templates, and then in the domain.

Rules that were working before turning virus/spam on are no longer working.

One other thing : The incoming mail for this account is via a fetchmail process, also setup in usermin.

Thanks,
Nick

Hi Nick,

Before we get too deep in debugging the innards of Virtualmin and Postfix, I just want to make sure it’s not an issue with the email or the rule itself.

Can you post the full “Reply-To” and “From” line of one of the emails that’s not working as expected, so I can compare it to the procmail rule you mentioned above?

I just want to verify that the filter would indeed match it :slight_smile:
-Eric

To make sure I didn’t break anything in the update, I moved bmy .procmailrc file to a backup and started fresh. So my complete procmail file is now just :

:0

  • List-Id.*ctw.freelists.org
    $HOME/Maildir/.Other/
    :0
  • Reply-To.*FMPRO-L@LISTSERV.DARTMOUTH.EDU
    $HOME/Maildir/.Lists.FMOther/

And one of the headers on the email is :

Reply-To: FileMaker Pro Discussions <FMPRO-L@LISTSERV.DARTMOUTH.EDU>

Just to check, could this be related to the fact that this mail is coming in via fetchmail, or should it not matter?

Thanks,
Nick

Hey Nick,

Well, I saw you mention procmail earlier – I originally didn’t think that was related, since I thought I saw a mention of the email being processed by procmail at some point.

However, maybe we should explore that farther – fetchmail has to be explicitly told to use procmail with the "mda" parameter.

Is that set in your case?
-Eric

I’m not sure about the mda parameter, again this is setup only within usermin.
Just to test, I’ve deleted the fetchmail rule and added it back in.

I looked into the .fetchmailrc file in my individual home folder and it’s just :

poll server.goya.com.au
user "email@goya.com.au"
pass "password"
is email@goya.com.au

There also isn’t anything in the webmin configuration for fetchmail that mentions mda - should there be?

But the same issue applies, this was working before I enabled virus and spam filtering.

Thanks,
Nick

The “mda” parameter tells fetchmail what program to deliver to. It may or may not already end up going through procmail, depending on how exactly it’s doing things now… but simply because we’re not sure, it can’t hurt to explicitly set the mda to something like:

mda "/usr/bin/procmail -d %T"

Put that at the bottom of what you have in there now.
-Eric

Thanks for your help, in the end I decided it was going to be easier to host this one domain on a different server. So I’ve been able to move it all to a new instance of a new server and get it all going.

Which means I can remove the old one and not worry about why it wasn’t working.

Thanks,
Nick

Eric,

Thanks. Mailbox command is :

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

The procmailrc is :

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
:0

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

Thanks,
Nick

Eric,

Thanks. Mailbox command is :

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

The procmailrc is :

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
:0

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

Thanks,
Nick