Whitelist or blacklist user/domain at user level?

Hello,

If you host several domains under one account and want to use SpamAssassin rules only for one particular domain then it's hardly can be achieved. You will need to move domains to separate accounts in such a case.
 
No one domain under one account. When I add a domain or email to blacklist, SA blocks is for all users. But I need to exlcude some mail accounts. How to achieve this?
 
SA rules are applied to all email boxes on all domains under one directadmin account.

Let's say user bob has two domains under his directadmin account:

domain1.com
domain2.com

and he has got emails:

[email protected]
[email protected]
[email protected]
[email protected]

Spamassassin enabled for user bob's account effects all the listed email accounts and even more if he creates more mailboxes. There is no way to tell to SA to skip this or that local domain or this or that email box while you hold them under one directadmin account.

If you need it can be achieved only through modification of /etc/exim.conf or /etc/exim.spamassassin.conf (depending on your version of exim.conf).

So you will need to modify this block:
http://files.directadmin.com/services/exim.spamassassin.conf and add something like this:

Code:
{!exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin-skip/{$domain}/{$local_part}}} [COLOR=#000000] \[/COLOR]

before

Code:
[COLOR=#000000]{<{$message_size}{500k}} \[/COLOR]



With this if you create a file /home/user
/.spamassassin-skip/domain.com/mailbox SpamAssassin would skip to check emails for [email protected]

replace user, domain.com, mailbox with your actual data.

P.S. That's up to you to test it and confirm it's working or not and protect your files from being rewritten by custombuild.
 
Thank you for great post. İ will try and post results.. But with this method, user will not be able to add any rule for that skipped mail.
 
Back
Top