SpamAssasin - on the road to per-domains basis

diradmin

Verified User
Joined
Feb 5, 2005
Messages
25
Location
Finland
It was good idea
http://www.directadmin.com/forum/showthread.php?s=&threadid=4928

There was talk about per-domain basis ( also here http://www.directadmin.com/forum/showthread.php?s=&threadid=1594 )

Want to suggest solution for per-domain SA.

1. Add to spamassassin.html (skin)

Code:
<tr><td class=list align=center><input type=radio name=where value="spamoff" |WHERE_OFF|></td>
<td class=list>Off SpamAssasin for |DOMAIN|</td></tr>

2. Create empty file /usr/local/directadmin/data/templates/filter_off

3. When value="spamoff" DA must paste to /etc/virtual/user_domain/filter.conf two
lines:

where=spamoff - this for skin
spamoff: spamoff - this for exim's condition

4. Modify exim.conf

Add to spamcheck_director
Code:
{eq {}{${lookup{spamoff}lsearch{/etc/virtual/${domain}/filter.conf}}}} \
It could be added after {!eq {$received_protocol}{local}} \
 
Last edited:
what's the difference between per domain and per user for all practical purposes?
 
Today DA enable SA for all domains (with option "Inbox") even if go to
enable it only for one domain (set for this domain option "Send the spam to appropriate user's
spam folder"). Global enabling (especially with option "Inbox") is not correct.

One user (not reseller) have 100 domains (for ex. different web
studio's clients). One studio's client want SA, another one - don't
want. It's only one real example, we have more, but I cant explain
because my English... :(
 
John updated the spamassassin_edit_post.sh to dump the contents of the filter.conf into the tokens in 1.264
So, you can use per domain SA.
But another way that was explained before.
New solution here

1. Edit spamassassin.html (skin)

<tr><td class=list2 align=center><input type=radio name=where value="spamoff" |WHERE_SPAMOFF|></td><td class=list2>Disable</td></tr>


2. Create /usr/local/directadmin/data/scripts/custom/spamassassin_edit_post.sh

#!/bin/sh
PATH=/usr/sbin:$PATH
if [ "$where" = "spamoff" ]
then
touch /etc/virtual/${domain}/spamoff
chown mail:mail /etc/virtual/${domain}/spamoff
else
rm -f /etc/virtual/${domain}/spamoff
fi
exit 0;

3. Modify exim.conf

Add to spamcheck_director

{!exists{/etc/virtual/${domain}/spamoff}} \
 
New solution here

1. Edit spamassassin.html (skin)

<tr><td class=list2 align=center><input type=radio name=where value="spamoff" |WHERE_SPAMOFF|></td><td class=list2>Disable</td></tr>


2. Create /usr/local/directadmin/data/scripts/custom/spamassassin_edit_post.sh

#!/bin/sh
PATH=/usr/sbin:$PATH
if [ "$where" = "spamoff" ]
then
touch /etc/virtual/${domain}/spamoff
chown mail:mail /etc/virtual/${domain}/spamoff
else
rm -f /etc/virtual/${domain}/spamoff
fi
exit 0;

3. Modify exim.conf

Add to spamcheck_director

{!exists{/etc/virtual/${domain}/spamoff}} \ [/B]

None of this works...
I want SA per domain! Please
 
Back
Top