Some settings in Webmin, Virtualmin and Usermin do not appear to be functioning as (I) expected

OS type and version CentOS Linux 7.9.2009
Webmin version 2.101
Usermin version 2.001
Virtualmin version 7.7
Theme version 21.04
Package updates All installed packages are up to date

I have been playing with some of the settings it the main server level (webmin), the virtual server level (Virtualmin) and checking the impact at the user level (Usermin)

These relate to the filtering and spam setup/control in Usermin

Steps to replicate:

Ensure the SpamAssassin and Procmail Mail Filter modules in Webmin/Usermin configuration are checked.

In Webin change the default SpamAssassin required_score to 4

Save and Apply Changes
Expected behaviour is that the Server’s required_score should now be 4 therefore in Virtualmin the Default should be 4

I believe that no matter what the mainserver’s required_score is set to the default in Virtualmin is always 5

In Virtualmin set the required_score to 3

Expected behaviour is that in Usermin the default should now be 3

In Usermin the default score should display 3 but displays 4
I believe that this always shows the main server’s required_score for SpamAssasin.

In Usermin set the required_score to 2

Received messages in Usermin now display a required_score of 2

Return to the Usermin Modules in Webmin and remove the SpamAssassin Module.
Back in Usermin you will no longer have access to it but any settings made previously will still be in effect. Messages received still display a required_score of 2 which should have changed to the virtual server setting of 3.
You will either need to manually edit (or delete?) the pref file or re-enable the module to revert any changes made there.

There is also the option in Virtualmin to toggle the Allow mailbox users to create mail filters.
Since it is under Spam and Virus Scanning my assumption was that it will disable the SpamAssassin settings previously made. This however appears to be wrong. According to the help it blocks access to the local user Procmail file where all custom filters made by a user are stored. From what I can see it has no impact at all on SpamAssassin.
Maybe the idea originally was that users may use custom filters to search for Spam? Since I use these filters for organizing messages and SpamAssassin for Spam it makes little sense to me.
I personally believe that this command is in the wrong location or the Dialog Title needs to be re-thought.


  1. Default settings for the SpamAssassin ‘required_score’ do not display changes from current overriding settings
  2. Changing the accessibility of the SpamAssassin module in Usermin only hides access to the tool but does not change any previously saved configuration which could result in unexpected behaviours for users.
    User prefs file needs to be deleted or possibly renamed if it might need to be reused if access is granted later.
  3. The Spam and Virus Scanning dialog under Virtualmin contains features that do not actually pertain to Spam specifically but instead to Filtering tools which can also result in unexpected behaviours and confusion for users.

First Issue
SpamAssassin reads its configuration from many places in the following order

/etc/mail/spamassassin (which is a symlink to the previous directory)
/etc/webmin/virtual-server/spam/[vm_id] (some files are symlinks, but is editable in the UI)

Actually you set the score value in different places this is the reason you get a different behavior. My advice is to set the values for a virtual server in, for all mailboxes or per mailbox in user_prefs. Please do your own test by changing the scores in the,, user_prefs files, one by one, and after a change send an email to yourself. Check the header for score number to understand what config file was loaded by SA.

Second Issue
The option Allow mailbox users to create mail filters has nothing to do with SpamAssassin. Initially I was misled because it is in the SpamAssassin/ClamAV section. However, this option allows you to filter messages using Procmail. Basically, you create a .procmail file in the mailbox and filter the messages based on certain conditions. Unfortunately, this feature is very little addressed, although it has been in Virtualmin for a long time. There aren’t even any examples. I think the option should be changed and the word Procmail introduced, to be clearer. I know the tooltip is there for a purpose, but a word put there can solve the confusion even for an advanced user like me.

Yes, That’s why I have only made setting changes within Webmin, Virtualmin and Usermin GUIs. I specifically did that to maintain a logical workflow.
I would expect, logically, that as you move down the hierarchy from main sever, virtual server to User that the SpamAssassin configurations would have increasing preference over the level above. The most general to most specific with the last setting taking the highest precedence. I would expect this hierarchy as a standalone or shared sever could be managed by the main admin using Webmin. At the next level you would have virtual servers managed by the Domain holders who could be using Virtualmin to manage and the last level would be individual users who may manage their access using Usermin.
Generally, this does appear to be how it happens, but the Default required_score setting does not appear to be consistent. I tested by making changes and then sending emails and checking. At each change I tried to ensure that things were saved and updated and in some cases I logged out and logged back in to make sure the settings had changed to what they should be.

The 2nd issue is a problem for a user who may have had access to SpamAssassin at one point (in Usermin) but then the Domain owner decides to revoke this access by removing the SpamAssassin module. In this case the existing settings in the users account will still be used, even though they may not be visible. That particular pref file needs to be deleted or renamed so the Domain settings that are visible to the server administrator become the active ones. If this does not happen an admin could be trying to solve an issue that is caused by those preferences and not seeing them unless they check specifically for that file.

The 3rd issue is the misleading positioning (location) of the Allow Mailbox users to create mail filters under Spam and Virus settings. As you said it does not fit here.
If this is set to ‘No’, a warning is displayed in the Usermin mail filter area that explains this. However, it is a Filter setting not a Spam/Virus setting.

I considered submitting this as a Webmin/Usermin Issue but thought I should air it on this forum in case I have incorrect information.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.