Spam filtering feature enable - Procmail Error

Hi guys,

Today is a Mail Migration day hooray!

Mbox to Maildir migration Check : ).

Mailscanner to Virtualmin migration help! : (

I am trying to move away from Mailscanner and move over to the Virtualmin only spam and virus scanning.

When I try to enable the Spam Filtering feature I get the following :

Failed to save enabled features : The Procmail program needed for spam filtering does not appear to be installed on your system, or has not yet been set up properly in Webmin's Procmail Mail Filter module. If your system does not use spam filtering, it should be disabled in Virtualmin's module configuration page.

Please advise on how I should setup procmail. Currently I have postfix setup for delivery to Mailscanner via a header check : /^Received:/ HOLD I am sure this will need to be removed, but does Virtualmin expect something similar??

I tried finding an answer here :
But still need your assistance.

I can give you access to the system if need be.



Closed (fixed)


Here are my current Procmail Settings in Webmin.

That error suggests that you don't have procmail installed on your system at all.

You should be able to install it with a command like apt-get install procmail

The Virtualmin installer should have done this for you ..

It is installed on this system.

root@mars:~# apt-get install procmail Reading package lists... Done Building dependency tree
Reading state information... Done procmail is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.


OK, maybe Virtualmin is looking in the wrong place.

Use the command which procmail to find the location of the procmail command, and then go to Webmin -> Servers -> Procmail Mail Filter -> Module Config , and make sure the "Path to procmail program" is set correctly.

That did the trick, it was strange because the path to procmail was just procmail. I modified it to /usr/bin/procmail.

*** Correction, it always worked...


Perhaps /usr/bin wasn't in Webmin's search path? You can set that in the Webmin Configuration module.

I checked the webmin configuration module and verified that /usr/bin is in the Program Search Path.


Ok Now I am getting this when trying to enable Spam Filtering :

Failed to save enabled features : SpamAssassin is configured to be run from the global Procmail configuration /etc/procmailrc, which is not needed as Virtualmin will set it up on a per-domain basis.

Here is my /etc/procmailrc

:0wi VIRTUALMIN=|/etc/webmin/virtual-server/ $LOGNAME EXITCODE=$? :0 * ?/usr/bin/test "$EXITCODE" = "73" /dev/null EXITCODE=0 :0 * ?/usr/bin/test "$VIRTUALMIN" != "" { INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN } DROPPRIVS=yes :0fw | /usr/bin/spamassassin :0 * ^X-Spam-Status: Yes $DEFAULT

Please let me know what I need to change. Thx!


Howdy -- there's a few lines in your procmailrc file that are causing that error... these 5 lines at the end:

| /usr/bin/spamassassin
* ^X-Spam-Status: Yes

SpamAssassin is called elsewhere, so those particular lines in your procmailrc wouldn't be necessary (and would end up calling SpamAssassin twice).

Delete these lines :

| /usr/bin/spamassassin
* ^X-Spam-Status: Yes

What should my mailbox_command be?

I found this

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

Does the wrapper also apply to Ubuntu/debian?

If so, where can I get the procmail-wrapper?

Should /usr/bin/procmail have a mail group ownership? I chowned it to root:root.



NM, I grabbed the wrapper off my test box.

I also chmoded 6755 procmail and chowned root:home procmail.


That's the correct mailbox command.

You would indeed want procmail-wrapper on Debian/Ubuntu, you can install it by running this command:

apt-get install procmail-wrapper

Thank you all for your help, I have officially moved over to the Virtualmin Spamassasin and Clamav setup from Mailscanner. WOOT WOOT.



Great, I'm glad that's working for you, thanks for the update!

Automatically closed -- issue fixed for 2 weeks with no activity.