URLBL filtering consists to extract all URLs from the body of the message and check the domain part against a blacklist.
Although it's possible to create your own blacklist of URLs, j-chkmail distributes a modified version of SURBL blacklist. SURBL is a very interesting blacklist as they don't include domain names if they appear in legitimate messages. This means a very low false positive rate.
You can integrated the blacklist of URLs in two ways :
The list distributed by j-chkmail (BerkeleyDB format) contains SURBL data augmented by some few domains inserted by j-chkmail maintainer.
j-chkmail.cf
# SPAM_URLBL # Do pattern matching # Syntax : ----- # VALUES : NO YES SPAM_URLBL YES
j-chkmail.cf
# DB_URLBL # Database Real-Time URL Blacklist (used for content checking) # Syntax : ----- DB_URLBL j-urlbl.db
j-chkmail.cf
# DNS_URLBL # DNS Real-Time URL Blacklist (used for content checking) # Syntax : RBL[/CODE[/SCORE]] - multi.surbl.org/127.0.0.1/10 DNS_URLBL multi.surbl.org
When to choose DNS format or BerkeleyDB format ?
URL blacklisted database are saved inside /var/jchkmail/cdb directory. You'll find two files there :
Don't remove the j-urlbl.txt file. This file MUST be kept there, as it's used during database update to save bandwidth. If the file is there only the differences will be transfered. Maybe network bandwidth isn't a problem to you, but it may be to the rsync server.
the content of the text file is as follow:
/var/jchkmail/cdb/j-urlbl.txt
URLBL:zzzxzaasdx.com 20:0:127.1.0.7:multi.surbl URLBL:zzzyf.com 20:0:127.1.0.7:multi.surbl URLBL:zzzzzzzzzzzzzzzzzzzz.org.uk 20:0:127.1.0.7:multi.surbl URLBL:130kg.com 20:0:127.2.0.1:j-chkmail URLBL:20fr.com 20:0:127.2.0.1:j-chkmail URLBL:2288.org 20:0:127.2.0.1:j-chkmail
Just run make in that directory when touching the text database manually
You can find a script in source directory etc/get-urlbl.org. Rename that file and put it where you like, then launch it once a day in crontab. The result file is a big text file of 1.2M lines
Syntax and Example
Syntax : cvt-urlbldb [-s newscore] [-w whitelist] [-o source] inputfile > outputfile Exemple : cvt-urlbldb -s 30 -w urlwl.txt -o multi j-urlbl.txt > j-urlbl-local.txt
Syntax and Example
Syntax : mk_dbin [-s score] [-c code] -o source Example : mk_dbin -s 25 -c 127.1.0.1 -o local localbl.txt > j-urlbl-local.txt
/var/jchkmail/cdb/Makefile and /var/jchkmail/cdb/get-urlbl files. You'll probably need to modify the Makefile you'll find inside /var/jchkmail/cdb/etc/mail/jchkmail/j-chkmail.cf file to indicate the new database file : URLBL_DB configuration option.j-urlbl.txt file used by rsync.
Look at DBURLBL which showed that this mail has been rejected
/var/log/j-chkmail
Mar 4 17:08:18 mx0 j-chkmail[7771]: [ID 000000 local5.info] 47CD73F2.001 Connect from emailer99-151.emv1.net
Mar 4 17:08:21 mx0 j-chkmail[7771]: [ID 000000 local5.info] 47CD73F2.001 Bayes filter score : 0.685
Mar 4 17:08:21 mx0 j-chkmail[7771]: [ID 000000 local5.notice] 47CD73F2.001 DBURLBL : trc1.emv2.com : 20 BLACKLISTED in DBURLBL:j-chkmail
Mar 4 17:08:21 mx0 j-chkmail[7771]: [ID 000000 local5.notice] 47CD73F2.001 SPAM CHECK - M02 NB HTML > PLAIN : 1 0
Mar 4 17:08:21 mx0 j-chkmail[7771]: [ID 000000 local5.info] 47CD73F2.001 ORACLE - M02 text/html without text/plain ( 0.2)
Mar 4 17:08:21 mx0 j-chkmail[7771]: [ID 000000 local5.notice] 47CD73F2.001 : SMQID=(NOID), Callback=(eom), Why=(Content Check : B=0.685 U=20 R=0
O=0 -> G=1.082), PeerAddr=(84.14.99.151), PeerName=(emailer99-151.emv1.net), MAIL=(<email@club-prive.emv1.net>), NbRCPT=(1/1), RCPT=(<l
XXX@univ.fr>), HeaderFrom=('Club-prive.fr' <email@club-prive.emv1.net>), Scores=(R=0 U=20 O=0 B=0.685 -> 1.082), Size=(6437), Reply
=(550 5.7.1 Sorry, this message is being rejected as it seems to be a spam !)
You can see the scores as explained here B=0.685 U=20 R=0 O=0 → G=1.082
Which means that URLBL put a score of 20