Email Filters do not appear to be working

I have entered some email filters in Usermin and I can see the .procmailrc in the corresponding user home directory.

However when email is received for the particular user the user specific procmail rules do not appear to be working.

Do they need to be enabled somewhere? If so where?

I am running Virtualmin 3.66.gpl on Hardy. I am not running SpamAssassin or VirusScanning if that maybe the problem?

Any help would be appreciated.

Paul

Hi Paul,

Yeah, you should be able to process procmail goodies with or without SpamAssassin and ClamAV.

Do you think you could post the contents of your .procmailrc file? That might help us figure out where the issue lies.

Thanks!
-Eric

You’re exactly right. This bit shouldn’t be there:

:0
$DEFAULT

That pretty much says, “No matter what happens, always drop the mail into $DEFAULT”. Which…isn’t quite what we want. I see this quite often, but I still have no idea where it comes from (I’m guessing it’s some option in the Procmail module that adds it, and we probably ought to figure out which one and make the label more clear).

OK, that seems to have solved it. I was actually looking for an option in Virtualmin to turn this on or off. But atleast I got there in the end.

Thank you so much for your quick replies!

Paul

I’m sure there is such an option (because folks seem to turn it on pretty frequently), but I don’t actually know what it is. :wink:

OK, my /etc/procmailrc is as follows:

[code:1]
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
    }
    DEFAULT=$HOME/Maildir/
    ORGMAIL=$HOME/Maildir/
    DROPPRIVS=yes
    :0
    $DEFAULT
    [/code:1]

I think it is something to do with the last 2 lines

[code:1]
:0
$DEFAULT
[/code:1]

I think this disables looking at the user configuration.

The user .procmailrc is as follows:-

[code:1]
:0

I added the last rule as a catch-all to prove if the filter is working, however all mail is delivered to the inbox!

Paul

OK, my /etc/procmailrc is as follows:

[code:1]
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
    }
    DEFAULT=$HOME/Maildir/
    ORGMAIL=$HOME/Maildir/
    DROPPRIVS=yes
    :0
    $DEFAULT
    [/code:1]

I think it is something to do with the last 2 lines

[code:1]
:0
$DEFAULT
[/code:1]

I think this disables looking at the user configuration.

The user .procmailrc is as follows:-

[code:1]
:0

I added the last rule as a catch-all to prove if the filter is working, however all mail is delivered to the inbox!

Paul