1Mail::SpamAssassin::PluUgsienr::CUoRnItLroicbaultBeLdM(a3Pi)elr:l:SDpoacmuAmsesnatsastiino:n:Plugin::URILocalBL(3)
2
3
4
6 URILocalBL - blocklist URIs using local information (ISP names, address
7 lists, and country codes)
8
10 This plugin creates some new rule test types, such as "uri_block_cc",
11 "uri_block_cidr", and "uri_block_isp". These rules apply to the URIs
12 found in the HTML portion of a message, i.e. <a href=...> markup.
13
14 loadplugin Mail::SpamAssassin::Plugin::URILocalBL
15
16 Why local blocklisting? There are a few excellent, effective, and well-
17 maintained DNSBL's out there. But they have several drawbacks:
18
19 • blocklists can cover tens of thousands of entries, and you can't
20 select which ones you use;
21
22 • verifying that it's correctly configured can be non-trivial;
23
24 • new blocklisting entries may take a while to be detected and entered,
25 so it's not instantaneous.
26
27 Sometimes all you want is a quick, easy, and very surgical blocklisting
28 of a particular site or a particular ISP. This plugin is defined for
29 that exact usage case.
30
32 The format for defining a rule is as follows:
33
34 uri_block_cc SYMBOLIC_TEST_NAME cc1 cc2 cc3 cc4 ..
35 uri_block_cc SYMBOLIC_TEST_NAME !cc1 !cc2 ..
36
37 or:
38
39 uri_block_cont SYMBOLIC_TEST_NAME co1 co2 co3 co4 ..
40 uri_block_cont SYMBOLIC_TEST_NAME !co1 !co2 ..
41
42 or:
43
44 uri_block_cidr SYMBOLIC_TEST_NAME a.a.a.a b.b.b.b/cc
45
46 or:
47
48 uri_block_isp SYMBOLIC_TEST_NAME "Data Rancid" McCarrier Phishers-r-Us
49
50 Example rule for matching a URI in China:
51
52 uri_block_cc TEST1 cn
53
54 If you specify list of negations, such rule will match ANY country
55 except the listed ones (Finland, Sweden):
56
57 uri_block_cc TEST1 !fi !se
58
59 Continents uri_block_cont works exactly the same as uri_block_cc.
60
61 This would block the URL http://www.baidu.com/index.htm. Similarly, to
62 match a Spam-haven netblock:
63
64 uri_block_cidr TEST2 65.181.64.0/18
65
66 would match a netblock where several phishing sites were recently
67 hosted.
68
69 And to block all CIDR blocks registered to an ISP, one might use:
70
71 uri_block_isp TEST3 "Data Rancid" ColoCrossing
72
73 Quote ISP names containing spaces.
74
75 Lastly, if there's a country that you want to block but there's an
76 explicit host you wish to exempt from that blocklist, you can use:
77
78 uri_block_exclude TEST1 www.baidu.com
79
80 if you wish to exempt URL's referring to this host. The same syntax is
81 applicable to CIDR and ISP blocks as well.
82
84 The Country-Code based filtering can use any Mail::SpamAssassin::GeoDB
85 supported module like MaxMind::DB::Reader (GeoIP2) or Geo::IP. ISP
86 based filtering might require a paid subscription database like
87 GeoIPISP.
88
89
90
91perl v5.38.0 2023M-a0i7l-:2:2SpamAssassin::Plugin::URILocalBL(3)