Spamassassin config per-domain..

Quonos

Verified User
Joined
Jul 30, 2009
Messages
21
My DirectAdmin User-level account has over 200 domains attached to it. 50 of them being pointers, leaves 150 domains in the list.

I decided I might need a spamfilter, so I configured Spamassassin etc, about 3 months ago. Had it append ****SPAM**** only, and it seems to work perfectly.

Luckily, this file is stored in ~/.spamassassin/ so I didn't have to alter all 150 domains for it.

I recently decided I may as well send everything to the proper spam folder. So, I clicked a random domain and opened the Spamassassin settings. Saved them, but after 2 days I still kept receiving ****SPAM**** messages to my inbox.

So, I went back to the panel, looked at the settings, and Spamassassin was still set for inbox. So, I switched it to the spamfolder again. Just to be sure I clicked Spamassassin setup again, and it was indeed checked. Then I clicked an other random domain and it wasn't checked anymore.

So, to make a long story short: The spamassassin settings seem to be half shared and half domain-dependent. Sounds like a very bad idea to me, because it can cause a lot of confusion. Oh, and it also takes a very long time to change spamassassin for 150 domains. Sure, I could simply use a small PHP script that changes it, and I will, but I would like to see an option in DirectAdmin that changes the setting for all domains..:D

Tom
 
settings with multi domain

I've got the same sort of problem. For some webhosting accounts, the settings aren't maintained. I can't seem to find the problem. Even chmod 777 does not work.

Help is needed
 
Oh, and it also takes a very long time to change spamassassin for 150 domains. Sure, I could simply use a small PHP script that changes it, and I will, but I would like to see an option in DirectAdmin that changes the setting for all domains..:D

That's an easy one. The file you want to adjust is:

Code:
/etc/mail/spamassassin/local.cf

If you want to enable SpamAssassin on all domains:

Code:
nano /etc/exim.conf

Find:

Code:
{exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \

Change it to:

Code:
#{exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \

And restart Exim:

Code:
/sbin/service exim restart
 
Back
Top