Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: Snoopyski on September 25, 2006, 02:53:25 PM

Title: WhiteList/BlackList... Add/Remove...
Post by: Snoopyski on September 25, 2006, 02:53:25 PM
Hello Everyone,

I need to know how to create a White/Black List for SpamAssassin... Because I have some GOOD email was block and move to the junkmail folder... So I need to change some setting...

Thanks,

Snoopyski
Title: WhiteList/BlackList... Add/Remove...
Post by: bosco555 on September 26, 2006, 04:15:48 AM
HI there,

create a text file called whitelist.txt and type in it all the domains from which you want to receive mail eg:

*@contribs.org
*@*.mycompany.com etc.

then, copy or better, create an executable file called whiteadd or whatever you want with the following code:

======== Cut ================

for line in `cat whitelist.txt`

   do

setprop wbl.global $line White

   done

expand-template /etc/mail/spamassassin/local.cf

svc -t /service/spamd

======= Cut ======================

place both files anywhere (/home/e-smith/files/users/admin/home)

obviously chmod +x whiteadd

and ./whiteadd

That should do it

regards and hope this helps

gb
Title: WhiteList/BlackList... Add/Remove...
Post by: penguinzrool on September 28, 2006, 12:27:40 AM
i'd love to get this script working, as i've got a couple of senders who always get marked as spam, but am having issues with it.

executing the script seems to have no effect, but it also doesn't terminate, so i'm just left with a 'waiting' cursor. i notice there's no interpreter name at the top - does this need to be run through bash, perl, or anything like that?

also, trying to break it down a bit, running the command 'setprop wbl.global <myentry> White' returns 'setprop: command not found'. any ideas?

thanks for the info so far!

chris
Title: WhiteList/BlackList... Add/Remove...
Post by: william_syd on September 28, 2006, 01:21:20 AM
I think the script is good if you have a dozen or so addresses to whitelist.

For a couple try just

At the root prompt..

db spamassassin setprop wbl.global name@domain name2@domain2 name3@domain3 White
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd

I'm not 100% sure on the format of the setprop line. It could require White after each address.

EDIT: See this post (http://forums.contribs.org/index.php?topic=32248.msg136237#msg136237) for details.
Title: Re: WhiteList/BlackList... Add/Remove...
Post by: raem on September 28, 2006, 02:31:41 AM
Snoopyski

See this thread
http://forums.contribs.org/index.php?topic=31227.0

the script appears to need this line
db spamassassin setprop wbl.global $line White

alternatively do (for white and/or black entries)

db spamassassin setprop wbl.global *@*vonage.com White *domain2.com White *domain3.com Black
(all on one line)

edited - of course followed by
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
Title: WhiteList/BlackList... Add/Remove...
Post by: bosco555 on September 28, 2006, 10:50:32 AM
Sorry all when I copied/pasted the code, I must have left that bit out...apologies to all and thanks for pointing it out

best regards

gianni
Title: WhiteList/BlackList... Add/Remove...
Post by: raem on September 28, 2006, 11:02:51 AM
gianni

It might be good, for future reference, if you edit your post above and correct it.
Thanks
Ray
Title: WhiteList/BlackList... Add/Remove...
Post by: bosco555 on September 28, 2006, 11:09:40 AM
Hi Ray,

greetings from WA, indeed, will check that everything is 100%, I am usually pedantic with things like that...that one didn't go through quality control..

best to all

gb