Re-enabling spamassassin breaks procmail

13 posts / 0 new
Last post
#1 Wed, 04/01/2009 - 02:41
nickorr

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

Wed, 04/01/2009 - 05:11
andreychek

Hi Nick,

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

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

Sun, 06/07/2009 - 07:49
nickorr

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

Sun, 06/07/2009 - 07:49
nickorr

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

Wed, 04/01/2009 - 17:48
andreychek

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

Wed, 04/01/2009 - 23:44
nickorr

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

Wed, 04/01/2009 - 23:46 (Reply to #6)
nickorr

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

Thu, 04/02/2009 - 06:31 (Reply to #7)
andreychek

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 :-)
-Eric

Thu, 04/02/2009 - 20:10
nickorr

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

Fri, 04/03/2009 - 05:21 (Reply to #9)
andreychek

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

Fri, 04/03/2009 - 13:45
nickorr

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

Fri, 04/03/2009 - 16:18 (Reply to #11)
andreychek

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

Sun, 04/05/2009 - 20:38
nickorr

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

Topic locked