1Mail::SpamAssassin::PluUgsienr::CHoansthrBiLb(u3t)ed PerMlaiDlo:c:uSmpeanmtAastsiaosnsin::Plugin::HashBL(3)
2
3
4
6 HashBL - query hashed (and unhashed) DNS blocklists
7
9 loadplugin Mail::SpamAssassin::Plugin::HashBL
10
11 # NON-WORKING usage examples below, replace xxx.example.invalid with real list
12 # See documentation below for detailed usage
13
14 header HASHBL_EMAIL eval:check_hashbl_emails('ebl.example.invalid')
15 describe HASHBL_EMAIL Message contains email address found on EBL
16 priority HASHBL_EMAIL -100 # required priority to launch async lookups early
17 tflags HASHBL_EMAIL net
18
19 hashbl_acl_freemail gmail.com
20 header HASHBL_OSENDR eval:check_hashbl_emails('rbl.example.invalid/A', 'md5/max=10/shuffle', 'X-Original-Sender', '^127\.', 'freemail')
21 describe HASHBL_OSENDR Message contains email address found on HASHBL
22 priority HASHBL_OSENDR -100 # required priority to launch async lookups early
23 tflags HASHBL_OSENDR net
24
25 body HASHBL_BTC eval:check_hashbl_bodyre('btcbl.example.invalid', 'sha1/max=10/shuffle', '\b([13][a-km-zA-HJ-NP-Z1-9]{25,34})\b')
26 describe HASHBL_BTC Message contains BTC address found on BTCBL
27 priority HASHBL_BTC -100 # required priority to launch async lookups early
28 tflags HASHBL_BTC net
29
30 header HASHBL_URI eval:check_hashbl_uris('rbl.example.invalid', 'sha1', '127.0.0.32')
31 describe HASHBL_URI Message contains uri found on rbl
32 priority HASHBL_URI -100 # required priority to launch async lookups early
33 tflags HASHBL_URI net
34
36 This plugin support multiple types of hashed or unhashed DNS
37 blocklists.
38
39 OPTS refers to multiple generic options:
40
41 raw do not hash data, query as is
42 md5 hash query with MD5
43 sha1 hash query with SHA1
44 case keep case before hashing, default is to lowercase
45 max=x maximum number of queries
46 shuffle if max exceeded, random shuffle queries before truncating to limit
47
48 Multiple options can be separated with slash or other non-word
49 character. If OPTS is empty ('') or missing, default is used.
50
51 HEADERS refers to slash separated list of Headers to process:
52
53 ALL all headers
54 ALLFROM all From headers as returned by $pms->all_from_addrs()
55 EnvelopeFrom message envelope from (Return-Path etc)
56 HeaderName any header as used with $pms->get()
57
58 if HEADERS is empty ('') or missing, default is used.
59
60 header RULE check_hashbl_emails('bl.example.invalid/A', 'OPTS',
61 'HEADERS/body', '^127\.')
62 Check email addresses from DNS list, "body" can be specified along
63 with headers to search body for emails. Optional subtest regexp to
64 match DNS answer. Note that eval rule type must always be
65 "header".
66
67 DNS query type can be appended to list with /A (default) or /TXT.
68
69 Additional supported OPTS:
70
71 nodot strip username dots from email
72 notag strip username tags from email
73 nouri ignore emails inside uris
74 noquote ignore emails inside < > or possible quotings
75
76 Default OPTS: sha1/notag/noquote/max=10/shuffle
77
78 Default HEADERS: ALLFROM/Reply-To/body
79
80 For existing public email blacklist, see: http://msbl.org/ebl.html
81
82 # Working example, see http://msbl.org/ebl.html before usage
83 header HASHBL_EMAIL eval:check_hashbl_emails('ebl.msbl.org')
84 describe HASHBL_EMAIL Message contains email address found on EBL
85 priority HASHBL_EMAIL -100 # required priority to launch async lookups early
86 tflags HASHBL_EMAIL net
87
88 header RULE check_hashbl_uris('bl.example.invalid/A', 'OPTS',
89 '^127\.')
90 Check uris from DNS list, optional subtest regexp to match DNS
91 answer.
92
93 DNS query type can be appended to list with /A (default) or
94 /TXT.
95
96 Default OPTS: sha1/max=10/shuffle
97
98 body RULE check_hashbl_bodyre('bl.example.invalid/A', 'OPTS',
99 '\b(match)\b', '^127\.')
100 Search body for matching regexp and query the string captured.
101 Regexp must have a single capture ( ) for the string ($1).
102 Optional subtest regexp to match DNS answer. Note that eval rule
103 type must be "body" or "rawbody".
104
105
106
107perl v5.34.0 2021-07-M2a3il::SpamAssassin::Plugin::HashBL(3)