Koozali.org: home of the SME Server

WhiteList/BlackList... Add/Remove...

Offline Snoopyski

  • *
  • 141
  • +0/-0
    • http://www.serviceinfosg.com
WhiteList/BlackList... Add/Remove...
« 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

Offline bosco555

  • *****
  • 152
  • +0/-0
WhiteList/BlackList... Add/Remove...
« Reply #1 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

penguinzrool

WhiteList/BlackList... Add/Remove...
« Reply #2 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

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
WhiteList/BlackList... Add/Remove...
« Reply #3 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 for details.
Regards,
William

IF I give advise.. It's only if it was me....

Offline raem

  • *
  • 3,972
  • +4/-0
Re: WhiteList/BlackList... Add/Remove...
« Reply #4 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
...

Offline bosco555

  • *****
  • 152
  • +0/-0
WhiteList/BlackList... Add/Remove...
« Reply #5 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

Offline raem

  • *
  • 3,972
  • +4/-0
WhiteList/BlackList... Add/Remove...
« Reply #6 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
...

Offline bosco555

  • *****
  • 152
  • +0/-0
WhiteList/BlackList... Add/Remove...
« Reply #7 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