My Local URIBL Installation
[Back]
I am told that this is not the best way to do this.
( Here are a few links to get you started...
http://www.corpit.ru/mjt/rbldnsd.html
http://www.surbl.org/setup-local-rbl-mirror
http://www.surbl.org/surbl-nameserver-setup
)
But,It works for me and I don't fix what ain't broke!
I looked all over the Internet for this and only found how to make a local copy of an
existing Blacklist server.
My Postfix/Amavisd/Spamassassin/ClamAV Servers (mainly FCx and Ubuntu)
run their own caching DNS server that they query first.
(/etc/resolv.conf points to 127.0.0.1 first)
I added a master zone file in /var/named/chroot/var/named/zonename.example.com.hosts
(my example on Ubuntu 11.04: /etc/bind/firewall.my-webz.net.hosts)
containing something like this:
$ttl 38400
zonename.example.com. IN SOA hostname.example.com. hostmaster.example.com. (
1208053634
10800
3600
604800
38400 )
zonename.example.com. IN NS hostname.example.com.
zonename.example.com. IN A 192.168.1.1
webspammerdomain.com.zonename.example.com. IN TXT "Bad com"
... hundreds more...
I add a zone record in /var/named/chroot/var/named/named.conf
(or /etc/bind/named.conf -chg file root)
zone "zonename.example.com" {
type master;
file "/var/named/zonename.example.com.hosts";
};
I stopped and started named/bind
I add to /etc/mail/spamassassin/local.cf (/etc/spamassassin/local.cf)
# run local uribl
ifplugin Mail::SpamAasassin::Plugin::URIDNSBL
urirhsbl URIBL_MW_SURBL zonename.example.com. TXT
body URIBL_MW_SURBL eval:check_uridnsbl('URIBL_MW_SURBL')
describe URIBL_MW_SURBL Contains an URL listed in the MW_SURBL blocklist
score URIBL_MW_SURBL 7
endif
I reloaded amavisd and it worked!
(Adjust DNS SOA to fit and change zonename and example.com to something you control.)
Actually, I commented out the ifplugin and endif lines above because I thought they weren't working
correctly when I first installed it. Since I knew the plugin was there, it didn't matter in my situation.
I keep my URI's in an Access Database. I have written asp pages to display and maintain these entries.
I have a perl script that extracts this table into a bind zone file.
I also, have a perl script that will add to this table from a list of domains in a batch file.
I automate the updating of my servers by posting my changes to an internal ftp site where
my servers periodically looks for and process any change files.
MyPostgreyInstall.html