Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sa-blacklist: update spamassassin and privoxy urls to block
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tecknojunky
Veteran
Veteran


Joined: 19 Oct 2002
Posts: 1937
Location: Montréal

PostPosted: Sun May 02, 2004 7:01 am    Post subject: sa-blacklist: update spamassassin and privoxy urls to block Reply with quote

Intro

Some time ago, I cam accross the sa-blacklist which regularly maintains a list of spammers url for SpamAssassin and other softwares that have blocking mechanism.

I personaly use it for SpamAssassin and Privoxy. Put in a weekly cron job, a script retreives automaticaly the blacklist for Privoxy and SpamAssassin.

The website is here: http://www.stearns.org/sa-blacklist/

I use fcron, so I made scripts for it and are put in /etc/cron.weekly. Here are the scripts and instructions I made...

For SpamAssassin:

Quote:
#!/bin/sh
BL=/etc/mail/spamassassin/50blacklist.cf
sleep $[ $RANDOM / 1024 ]
rsync -aqL zaphod.stearns.org::wstearns/sa-blacklist/sa-blacklist.current $BL && chown root:root $BL && /etc/init.d/spamd restart
(the rsync line is a one-liner until the end of file).

I named this file sa-blacklist.cron, but you can name it as you see fit.

Now run the script, which will fetch the file and restart SpamAssassin:
Quote:
/etc/cron.weekly/sa-blacklist.cron


For Privoxy:

Quote:
#!/bin/sh
BL=/etc/privoxy/sa-blacklist.current.action
sleep $[ $RANDOM / 1024 ]
rsync -aqL zaphod.stearns.org::wstearns/sa-blacklist/sa-blacklist.current.action $BL && chown privoxy:privoxy $BL
(the rsync line is a one-liner until the end of file).

I named this file p-blacklist.cron, but you can name it as you see fit.

Modify /etc/privoxy/config and go to the actionlist section and add "actionlist sa-blacklist.current, so it should look like this:
Quote:
actionsfile standard # Internal purpose, recommended
actionsfile default # Main actions file
actionsfile user # User customizations
actionsfile sa-blacklist.current # spamassassin domain blacklist

Then, do...
Quote:

# /etc/init.d/privoxy restart
# /etc/cron.weekly/p-blacklist.cron

Check if you can access any of the URLs listed in /etc/privoxy/sa-blacklist.current.action

That all folks

If, like me, you have fcron, don't forget to make it read the new cron jobs with crontab -e. For the other cron flavours, I think you can figure it out.

There are instructions for other apps like Squid, Qmail, Exim and a few others.

I hope I did not miss anysteps as I did this a few weeks ago, kinda in a hurry.
_________________
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum