Spam Filtering and Procmail Problem

Hmm, that doesn’t look like saslauthd is running… what happens if you start it up:

/etc/init.d/saslauthd start

Wahoo, finally can send email :))))

When I reboot the server saslauthd won’t automatically start, how do I get it to start at boot?

Thanks for helping me solve this, been a real pain in the … trying to get email working on this server.

David Law

If you have this error:

“Failed to save enabled features : The procmail command /usr/bin/procmail is owned by group mail, when it should be owned by root. Email may not be properly delivered or checked for spam.”

In main.cf of postfix you have this line:
mailbox_command = /usr/bin/procmail -wrapper -o -a $DOMAIN -d $LOGNAME

This line should look like:
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

I’m just curious, why does this bug still exist, after 3 years?

On a new CentOS 5.7 + VirtualMin installation, I still get the same error.

Hmm, there’s a bunch of errors in the above thread – which one is it that you’re seeing?

Note though that a typical install works great out of the box, so something unusual is happening if you’re running into an error.

If you give us some details about the error, and the Linux distro you’re using, we can try and figure out what’s going on! And if it’s a reproducible problem, the fix is always incorporated into the installation process.

-Eric

Hi Eric,

As I said, it’s on CentOS 5.7

The error is:

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.

And I had to follow all 3 pieces of advice:

Try adding the following to /etc/procmailrc:

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

chmod 6755 /usr/bin/procmail

chown root /usr/bin/procmail

Howdy,

Can you clarify how your Virtualmin installation was done? Was that with the install.sh script?

Also, are you using a VPS, or some other type of server where an ISP-provided image was used?

Or did you install CentOS yourself?

The issue here is that, if I perform a fresh install of CentOS, and then run the install.sh script, the above steps wouldn’t be necessary – the permissions would be correct, and the procmailrc file would be there.

If that’s not the case, that suggests that either something may be non-standard about the Linux distro, and/or a problem may have come up during the install that prevented Virtualmin from correctly configuring that.

One thing you could do is attach your /root/virtualmin-install.log file, maybe something will show up in there that explains the problems you’re seeing.

-Eric

I have an upgrade (simply yum upgrade) CentOS Template with a few small mods (mainly a nice looking PS1, securely mounted /tmp and a few additional applications installed.

Then I simply installed Virtualmin via CloudMin

This is the simple and effective solution for a fresh Virtualmin install on a Ubuntu 18.04 LTS machine, thanks for sharing!

@Virtualmin team: why this command is missing by default in the main.cf on a fresh install? :slight_smile:

MY OS is: Centos 7

I recently ran into this issue myself after trying to add the SSL plugin that was disabled in the Feature and Plugins tab in Virtualmin > System Settings > Features and Plugins, but luckily I was able to figure it out an easier solution after trying out some suggestions I read in this thread. In my case to fix this issue.

Step # 1

Go to the main.cf file in the postfix directory

In the terminal type:

nano /etc/postfix/main.cf

OR

vi /etc/postfix/main.cf

In Webmin:

Navigate to the Postfix Mail Server, you can find this in Webmin > Servers OR Webmin > Un-used Modules

Then open “Edit Config Files” and notice at the top drown menu, you must be in the main.cf, (Edit config file: /etc/postfix/main.cf)

Step # 2

In my case I’ve added the mail_box command attribute as is below, maybe the attribute will be different in your case. This was commented out in my main.cf file, I think this happens when you do not enable spam filtering in your Virtualmin configuration process.

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

Please don’t forget to save changes after the mail_command attribute is added.

Step #3

Navigate to Virtualmin Tab

Virtialmin > Systems Settings > Virtualmin Configuration > Spam filtering options

In the "Default delivery for Spam” textbox I’ve added:

$HOME/Maildir/.spam/

then I click saved

Step # 4

Restart Postfix and Dovecot

service dovecot restart

service postfix restart

OR

systemctl restart dovecot

systemctl restart postfix

Step # 5

Navigate to Virtualmin > Edit Virtual Server > Enabled Features

You should now see the options “Apache SSL Website enabled” and "Spam Filtering enabled”

check whichever one you want to enable and save

Then I navigate to Virtualmin > Server Configuration > SSL Certificate

and was able to add my certificate.