Overiding server-wide spam assassin with per domain scanning?

Hi I'm on ubuntu 16.04 and have the spam assassin modules installed and setup.

The problem is I've noticed when I check a mail in the header and I've set the spam score setting to 10, it will say that only 5 is required for it to judge it as spam.

I think the server-wide scanning is doing this and ignoring the per-domain setting.

How do I set the serverwide to say spam score 10 and then have per domain scanning to whatever required, so if a user reports they're still getting lots of spam I can put them to 8 or 5 etc. Thus they get less spam but everyone else is still on 10?

Is this possible, or do I somehow have to remove Spamassassin from Webmin and only have it in Virtuamin? If this is the case how to I uninstall it serverwide so it works just per-domain?

Thanks for any help with this :)



Howdy -- hmm, if it's setting the "required_score" in the user's home directory... yeah that unfortunately won't work when SpamAssassin is in server mode. That may actually be a bug that it still shows that option when server mode is active.

Does it work using the client mode? And is using SpamAssassin's client mode an option? I suspect that would resolve the issue. It's less efficient, but client mode would be required to have per-domain settings.

Hi thanks...

I'm not sure which mode I'd need really. Ideally I wanted to server-wide spam filter on number 10 and then the option to set individual virtual servers to user requirements on lower scores or even turn off if needed...

Is it client mode I need for that and if so how do I switch modes?

You can switch the mode in System Settings -> Spam and Virus Scanning.

You could then use Virtual Server SpamAssassin settings.

It should still use the local.cf file in /etc for SpamAssassin defaults.

Hi thanks - I've checked this and currently it is set in 'spamassassin (Standalone Program)' mode under Virtualmin.

Although when I click on tooltip / documentation for that option it says:

"Using spamc is typically faster and consumes less CPU. However, it will take away the ability to have a different SpamAssassin configuration for each virtual server, as the spamd server can only read a single set of configuration files. Using spamc/spamd also consumes more memory."


So would that mean I can't set spam settings/scores for different domains/users. I'd hoped as mentioned previously I could set an overall higher spam score for the server, and then each Virtual Server could have its own spam setting as needed depending on the user requirements?

Thanks again for any clarification and help on this.

You should be able to accomplish what you're describing, for the most part, using the "spamassassin (Standalone program)" setting.

Using spamc would not allow you to do what you're asking.

Using the Standalone program option, you should be able to set domains to use individual SpamAssassin settings.

For example, if you look in /home/USERNAME/.spamassassin, there's a user_prefs file. You could try setting "required_score" to your preferred value.