FreeMail - check message headers/body for freemail-domains
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.
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_whitelist email/domain ...
Emails or domains listed here are ignored (pretend they aren't freemail). No wildcards!
Entries in whitelist_auth will also be used to whitelist emails or domains from being freemail. Default is 0.
Entries in def_whitelist_auth will also be used to whitelist 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.
1.996 - fix freemail_skip_bulk_envfrom 1.997 - set freemail_skip_when_over_max to 1 by default 1.998 - don't warn about missing freemail_domains when linting 1.999 - default whitelist email@example.com etc 2.000 - some cleaning up 2.001 - fix freemail_whitelist 2.002 - _add_desc -> _got_hit, fix description email append bug 2.003 - freemail_import_(def_)whitelist_auth