12 Apr 2021 12:39:17 UTC
- Distribution: Mail-SpamAssassin
- Source (raw)
- Browse (raw)
- How to Contribute
- Clone svn repository
- Issues (1)
- KwaliteeBus factor: 2
- License: apache_2_0
- Activity24 month
- Download (6.27MB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userSIDNEY Sidney Markowitzand 1 contributors
- The Apache SpamAssassin Project
URIDetail - test URIs using detailed URI information
This plugin creates a new rule test type, known as "uri_detail". These rules apply to all URIs found in the message.
The format for defining a rule is as follows:
uri_detail SYMBOLIC_TEST_NAME key1 =~ /value1/ key2 !~ /value2/ ...
Supported keys are:
rawis the raw URI prior to any cleaning (e.g. "http://spamassassin.apache%2Eorg/").
typeis the tag(s) which referenced the raw_uri. parsed is a faked type which specifies that the raw_uri was parsed from the rendered text.
cleanedis a list including the raw URI and various cleaned versions of the raw URI (http://spamassassin.apache%2Eorg/, https://spamassassin.apache.org/).
textis the anchor text(s) (text between <a> and </a>) that linked to the raw URI.
domainis the domain(s) found in the cleaned URIs, as trimmed to registrar boundary by Mail::SpamAssassin::Util::RegistrarBoundaries(3).
hostis the full host(s) in the cleaned URIs. (Supported since SA 3.4.5)
Example rule for matching a URI where the raw URI matches "%2Ebar", the domain "bar.com" is found, and the type is "a" (an anchor tag).
uri_detail TEST1 raw =~ /%2Ebar/ domain =~ /^bar\.com$/ type =~ /^a$/
Example rule to look for suspicious "https" links:
uri_detail FAKE_HTTPS text =~ /\bhttps:/ cleaned !~ /\bhttps:/
Regular expressions should be delimited by slashes.
Module Install Instructions
To install Mail::SpamAssassin, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Mail::SpamAssassin
For more information on module installation, please visit the detailed CPAN module installation guide.