table of contents
Mail::SpamAssassin::Plugin::FreeMail(3) | User Contributed Perl Documentation | Mail::SpamAssassin::Plugin::FreeMail(3) |
NAME¶
FreeMail - check message headers/body for freemail-domains
SYNOPSIS¶
If for example From-address is freemail, and Reply-To or address found in mail body is different freemail address, return success. Good sign of Nigerian scams etc. Test idea from Marc Perkel.
Also separate functions to check various portions of message for freemails.
CONFIGURATION¶
freemail_domains domain ...
List of domains to be used in checks. Regexp is not supported, but following wildcards work: ? for single character (does not match a dot) * for multiple characters (does not match a dot) For example: freemail_domains hotmail.com hotmail.co.?? yahoo.* yahoo.*.*
freemail_welcomelist email/domain ...
Previously freemail_whitelist which will work interchangeably until 4.1. Emails or domains listed here are ignored (pretend they aren't freemail). No wildcards!
freemail_import_welcomelist_auth 1/0
Entries in welcomelist_auth will also be used to welcomelist emails or domains from being freemail. Default is 0.
freemail_import_def_welcomelist_auth 1/0
Entries in def_welcomelist_auth will also be used to welcomelist emails or domains from being freemail. Default is 0.
header FREEMAIL_REPLYTO eval:check_freemail_replyto(['option'])
Checks/compares freemail addresses found from headers and body. Possible options: replyto From: or body address is different than Reply-To (this is the default) reply as above, but if no Reply-To header is found, compares From: and body
header FREEMAIL_FROM eval:check_freemail_from(['regex'])
Checks all possible "from" headers to see if sender is freemail. Uses SA all_from_addrs() function (includes 'Resent-From', 'From', 'EnvelopeFrom' etc). Add optional regex to match the found email address(es). For example, to see if user ends in digit: check_freemail_from('\d@') If you use multiple check_freemail_from rules with regexes, remember that they might hit different emails from different heades. To match a certain header only, use check_freemail_header.
header FREEMAIL_HDRX eval:check_freemail_header('header' [, 'regex'])
Searches defined header for freemail address. Optional regex to match the found address (like in check_freemail_from).
header FREEMAIL_BODY eval:check_freemail_body(['regex'])
Searches body for freemail address. With optional regex to match.
2024-04-10 | perl v5.40.0 |