.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::SpamAssassin::Plugin::HashBL 3pm" .TH Mail::SpamAssassin::Plugin::HashBL 3pm "2021-05-30" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HashBL \- query hashed (and unhashed) DNS blocklists .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& loadplugin Mail::SpamAssassin::Plugin::HashBL \& \& # NON\-WORKING usage examples below, replace xxx.example.invalid with real list \& # See documentation below for detailed usage \& \& header HASHBL_EMAIL eval:check_hashbl_emails(\*(Aqebl.example.invalid\*(Aq) \& describe HASHBL_EMAIL Message contains email address found on EBL \& priority HASHBL_EMAIL \-100 # required priority to launch async lookups early \& tflags HASHBL_EMAIL net \& \& hashbl_acl_freemail gmail.com \& header HASHBL_OSENDR eval:check_hashbl_emails(\*(Aqrbl.example.invalid/A\*(Aq, \*(Aqmd5/max=10/shuffle\*(Aq, \*(AqX\-Original\-Sender\*(Aq, \*(Aq^127\e.\*(Aq, \*(Aqfreemail\*(Aq) \& describe HASHBL_OSENDR Message contains email address found on HASHBL \& priority HASHBL_OSENDR \-100 # required priority to launch async lookups early \& tflags HASHBL_OSENDR net \& \& body HASHBL_BTC eval:check_hashbl_bodyre(\*(Aqbtcbl.example.invalid\*(Aq, \*(Aqsha1/max=10/shuffle\*(Aq, \*(Aq\eb([13][a\-km\-zA\-HJ\-NP\-Z1\-9]{25,34})\eb\*(Aq) \& describe HASHBL_BTC Message contains BTC address found on BTCBL \& priority HASHBL_BTC \-100 # required priority to launch async lookups early \& tflags HASHBL_BTC net \& \& header HASHBL_URI eval:check_hashbl_uris(\*(Aqrbl.example.invalid\*(Aq, \*(Aqsha1\*(Aq, \*(Aq127.0.0.32\*(Aq) \& describe HASHBL_URI Message contains uri found on rbl \& priority HASHBL_URI \-100 # required priority to launch async lookups early \& tflags HASHBL_URI net .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This plugin support multiple types of hashed or unhashed \s-1DNS\s0 blocklists. .PP \&\s-1OPTS\s0 refers to multiple generic options: .PP .Vb 6 \& raw do not hash data, query as is \& md5 hash query with MD5 \& sha1 hash query with SHA1 \& case keep case before hashing, default is to lowercase \& max=x maximum number of queries \& shuffle if max exceeded, random shuffle queries before truncating to limit .Ve .PP Multiple options can be separated with slash or other non-word character. If \s-1OPTS\s0 is empty ('') or missing, default is used. .PP \&\s-1HEADERS\s0 refers to slash separated list of Headers to process: .PP .Vb 4 \& ALL all headers \& ALLFROM all From headers as returned by $pms\->all_from_addrs() \& EnvelopeFrom message envelope from (Return\-Path etc) \& HeaderName any header as used with $pms\->get() .Ve .PP if \s-1HEADERS\s0 is empty ('') or missing, default is used. .IP "header \s-1RULE\s0 check_hashbl_emails('bl.example.invalid/A', '\s-1OPTS\s0', 'HEADERS/body', '^127\e.')" 4 .IX Item "header RULE check_hashbl_emails('bl.example.invalid/A', 'OPTS', 'HEADERS/body', '^127.')" Check email addresses from \s-1DNS\s0 list, \*(L"body\*(R" can be specified along with headers to search body for emails. Optional subtest regexp to match \s-1DNS\s0 answer. Note that eval rule type must always be \*(L"header\*(R". .Sp \&\s-1DNS\s0 query type can be appended to list with /A (default) or /TXT. .Sp Additional supported \s-1OPTS:\s0 .Sp .Vb 4 \& nodot strip username dots from email \& notag strip username tags from email \& nouri ignore emails inside uris \& noquote ignore emails inside < > or possible quotings .Ve .Sp Default \s-1OPTS:\s0 sha1/notag/noquote/max=10/shuffle .Sp Default \s-1HEADERS:\s0 ALLFROM/Reply\-To/body .Sp For existing public email blacklist, see: http://msbl.org/ebl.html .Sp .Vb 5 \& # Working example, see http://msbl.org/ebl.html before usage \& header HASHBL_EMAIL eval:check_hashbl_emails(\*(Aqebl.msbl.org\*(Aq) \& describe HASHBL_EMAIL Message contains email address found on EBL \& priority HASHBL_EMAIL \-100 # required priority to launch async lookups early \& tflags HASHBL_EMAIL net .Ve .RS 4 .IP "header \s-1RULE\s0 check_hashbl_uris('bl.example.invalid/A', '\s-1OPTS\s0', '^127\e.')" 4 .IX Item "header RULE check_hashbl_uris('bl.example.invalid/A', 'OPTS', '^127.')" Check uris from \s-1DNS\s0 list, optional subtest regexp to match \s-1DNS\s0 answer. .Sp \&\s-1DNS\s0 query type can be appended to list with /A (default) or /TXT. .Sp Default \s-1OPTS:\s0 sha1/max=10/shuffle .RE .RS 4 .RE .IP "body \s-1RULE\s0 check_hashbl_bodyre('bl.example.invalid/A', '\s-1OPTS\s0', '\eb(match)\eb', '^127\e.')" 4 .IX Item "body RULE check_hashbl_bodyre('bl.example.invalid/A', 'OPTS', 'b(match)b', '^127.')" Search body for matching regexp and query the string captured. Regexp must have a single capture ( ) for the string ($1). Optional subtest regexp to match \s-1DNS\s0 answer. Note that eval rule type must be \*(L"body\*(R" or \*(L"rawbody\*(R".