VOOZH about

URL: https://manpages.org/uridnsbl/3

⇱ man URIDNSBL (3): look up URLs against DNS blocklists


URIDNSBL(3) look up URLs against DNS blocklists

SYNOPSIS


loadplugin Mail::SpamAssassin::Plugin::URIDNSBL
uridnsbl URIBL_SBLXBL sbl-xbl.spamhaus.org. TXT

DESCRIPTION

This works by analysing message text and for URLs, extracting host names from those, then querying various blocklists for either: addresses of these hosts (uridnsbl,a) or their nameservers (uridnsbl,ns), or domain names of these hosts (urirhsbl), or domain names of their nameservers (urinsrhsbl, urifullnsrhsbl).

USER SETTINGS

skip_uribl_checks ( 0 | 1 ) (default: 0)
Turning on the skip_uribl_checks setting will disable the plugin.

By default, SpamAssassin will run checks. Individual blocklists may be disabled selectively by setting a score of a corresponding rule to 0 or through the uridnsbl_skip_domain parameter.

See also a related configuration parameter skip_rbl_checks, which controls the DNSEval plugin (documented in the Conf man page).

uridnsbl_skip_domain domain1 domain2 ...
Specify a domain, or a number of domains, which should be skipped for the checks. This is very useful to specify very common domains which are not going to be listed in URIBLs.
clear_uridnsbl_skip_domain [domain1 domain2 ...]
If no argument is given, then clears the entire list of domains declared by uridnsbl_skip_domain configuration directives so far. Any subsequent uridnsbl_skip_domain directives will start creating a new list of skip domains.

When given a list of domains as arguments, only the specified domains are removed from the list of skipped domains.

RULE DEFINITIONS AND PRIVILEGED SETTINGS

uridnsbl dnsbl_zone lookuptype
Specify a lookup. is the name of the rule to be used, is the zone to look up IPs in, and is the type of lookup ( or A). Note that you must also define a body-eval rule calling to use this.

This works by collecting domain names from URLs and querying blocklists with an address of host names found in URLs or with addresses of their name servers, according to tflags as follows.

If the corresponding body rule has a tflag 'a', the blocklist will be queried with an address of a host found in URLs.

If the corresponding body rule has a tflag 'ns', will be queried for name servers ( records) of a domain name found in URLs, then these name server names will be resolved to their addresses, which in turn will be sent to blocklist.

Tflags directive may specify either 'a' or 'ns' or both flags. In absence of any of these two flags, a default is a 'ns', which is compatible with pre-3.4 versions of SpamAssassin.

The choice of tflags must correspond to the policy and expected use of each blocklist and is normally not a local decision. As an example, a blocklist expecting queries resulting from an 'a' tflag is a ``black_a.txt'' ( http://www.uribl.com/datasets.shtml ).

Example:

 uridnsbl URIBL_SBLXBL sbl-xbl.spamhaus.org. TXT
 body URIBL_SBLXBL eval:check_uridnsbl('URIBL_SBLXBL')
 describe URIBL_SBLXBL Contains a URL listed in the SBL/XBL blocklist
 tflags URIBL_SBLXBL net ns
uridnssub dnsbl_zone lookuptype subtest
Specify a DNSBL-style domain lookup with a sub-test. is the name of the rule to be used, is the zone to look up IPs in, and is the type of lookup ( or A).

Tflags 'ns' and 'a' on a corresponding body rule are recognized and have the same meaning as in the uridnsbl directive.

is a sub-test to run against the returned data. The sub-test may be in one of the following forms: m, n1-n2, or n/m, where n,n1,n2,m can be any of: decimal digits, 0x followed by up to 8 hexadecimal digits, or an IPv4 address in quad-dot form. The 'A' records (IPv4 dotted address) as returned by DNSBLs lookups are converted into a numerical form (r) and checked against the specified sub-test as follows: for a range n1-n2 the following must be true: (r >= n1 && r <= n2); for a n/m form the following must be true: (r & m) == (n & m); for a single value in quad-dot form the following must be true: r == n; for a single decimal or hex form the following must be true:
  ((r & n) != 0) && ((r & 0xff000000) == 0x7f000000), i.e. within 127.0.0.0/8

Some typical examples of a sub-test are: 127.0.1.2, 127.0.1.20-127.0.1.39, 127.0.1.0/255.255.255.0, 0.0.0.16/0.0.0.16, 0x10/0x10, 16, 0x10 .

Note that, as with , you must also define a body-eval rule calling to use this.

Example:

 uridnssub URIBL_DNSBL_4 dnsbl.example.org. A 127.0.0.4
 uridnssub URIBL_DNSBL_8 dnsbl.example.org. A 8
urirhsbl rhsbl_zone lookuptype
Specify a RHSBL-style domain lookup. is the name of the rule to be used, is the zone to look up domain names in, and is the type of lookup ( or A). Note that you must also define a body-eval rule calling to use this.

An zone is one where the domain name is looked up, as a string; e.g. a using the domain will cause a lookup of . Note that hostnames are stripped from the domain used in the lookup, so the domain will look up , and will look up .

If an consists of an address instead of a hostname, the address is looked up (using the standard reversed quads method) in each .

Example:

 urirhsbl URIBL_RHSBL rhsbl.example.org. TXT
urirhssub rhsbl_zone lookuptype subtest
Specify a RHSBL-style domain lookup with a sub-test. is the name of the rule to be used, is the zone to look up domain names in, and is the type of lookup ( or A).

is a sub-test to run against the returned data. The sub-test may be in one of the following forms: m, n1-n2, or n/m, where n,n1,n2,m can be any of: decimal digits, 0x followed by up to 8 hexadecimal digits, or an IPv4 address in quad-dot form. The 'A' records (IPv4 dotted address) as returned by DNSBLs lookups are converted into a numerical form (r) and checked against the specified sub-test as follows: for a range n1-n2 the following must be true: (r >= n1 && r <= n2); for a n/m form the following must be true: (r & m) == (n & m); for a single value in quad-dot form the following must be true: r == n; for a single decimal or hex form the following must be true:
  ((r & n) != 0) && ((r & 0xff000000) == 0x7f000000), i.e. within 127.0.0.0/8

Some typical examples of a sub-test are: 127.0.1.2, 127.0.1.20-127.0.1.39, 127.2.3.0/255.255.255.0, 0.0.0.16/0.0.0.16, 0x10/0x10, 16, 0x10 .

Note that, as with , you must also define a body-eval rule calling to use this.

Example:

 urirhssub URIBL_RHSBL_4 rhsbl.example.org. A 127.0.0.4
 urirhssub URIBL_RHSBL_8 rhsbl.example.org. A 8
urinsrhsbl rhsbl_zone lookuptype
Perform a RHSBL-style domain lookup against the contents of the records for each In other words, a using the domain will cause an lookup to take place; assuming that domain has an of , that will cause a lookup of . Note that hostnames are stripped from both the domain used in the and the domain in the lookup.

is the name of the rule to be used, is the zone to look up domain names in, and is the type of lookup ( or A).

Note that, as with , you must also define a body-eval rule calling to use this.

urinsrhssub rhsbl_zone lookuptype subtest
Specify a RHSBL-style domain-NS lookup, as above, with a sub-test. is the name of the rule to be used, is the zone to look up domain names in, and is the type of lookup ( or A). is the sub-test to run against the returned data; see <urirhssub>.

Note that, as with , you must also define a body-eval rule calling to use this.

urifullnsrhsbl rhsbl_zone lookuptype
Perform a RHSBL-style domain lookup against the contents of the records for each In other words, a using the domain will cause an lookup to take place; assuming that domain has an of , that will cause a lookup of . Note that hostnames are stripped from the domain used in the

is the name of the rule to be used, is the zone to look up domain names in, and is the type of lookup ( or A).

Note that, as with , you must also define a body-eval rule calling to use this.

urifullnsrhssub rhsbl_zone lookuptype subtest
Specify a RHSBL-style domain-NS lookup, as above, with a sub-test. is the name of the rule to be used, is the zone to look up domain names in, and is the type of lookup ( or A). is the sub-test to run against the returned data; see <urirhssub>.

Note that, as with , you must also define a body-eval rule calling to use this.

tflags ips_only
Only URIs containing addresses as the ``host'' component will be matched against the named ``urirhsbl''/``urirhssub'' rule.
tflags domains_only
Only URIs containing a non-IP-address ``host'' component will be matched against the named ``urirhsbl''/``urirhssub'' rule.
tflags ns
The 'ns' flag may be applied to rules corresponding to uridnsbl and uridnssub directives. Host names from URLs will be mapped to their name server addresses (a lookup followed by an A lookup), which in turn will be sent to blocklists. This is a default when neither 'a' nor 'ns' flags are specified.
tflags a
The 'a' flag may be applied to rules corresponding to uridnsbl and uridnssub directives. Host names from URLs will be mapped to their addresses, which will be sent to blocklists. When both 'ns' and 'a' flags are specified, both queries will be performed.

ADMINISTRATOR SETTINGS

uridnsbl_max_domains N(default: 20)

The maximum number of domains to look up.

NOTES

The option has been obsoleted by the option. See the for details on .