Mail::...eeMail(3pm)

πŸ’– NAME

FreeMail β€” bestie, this one checks message headers and body for freemail-domains. That's it, that's the whole job ✨


πŸ¦‹ SYNOPSIS

okay so picture this: if the From-address is freemail, and the Reply-To (or an address chillin' in the mail body) is a different freemail address β†’ return success. It's giving scam. It's giving Nigerian scams etc. (test idea from Marc Perkel, king behavior honestly πŸ‘‘).

Also, there's separate functions so you can check various portions of the message for freemails, one lil' slice at a time. Obsessed πŸŽ€


🌸 CONFIGURATION

πŸ’œ freemail_domains domain ...

List of domains to be used in the checks. That's the roster.

ngl, regexp is not supported here. But these 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 known as freemail_whitelist, which will work interchangeably until 4.1. So like, both names are serving the same vibe for now ✨

Emails or domains listed here are ignored (pretend they aren't freemail). No wildcards! Periodt πŸ™…β€β™€οΈ


πŸ’œ 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. Chef's kiss comparison πŸ”₯

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 the sender is freemail. Uses the SA all_from_addrs() function (includes 'Resent-From', 'From', 'EnvelopeFrom' etc). The way it scoops up every from-ish header? iconic πŸ’…

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 the defined header for a freemail address. Optional regex to match the found address (like in check_freemail_from). 🫢


πŸ’œ header FREEMAIL_BODY eval:check_freemail_body(['regex'])

Searches the body for a freemail address. With optional regex to match. Body check bestie, we love her πŸ’–


and that's the whole page, fr fr β€” written up in the User Contributed Perl Documentation corner of the man-verse, in this gorgeous Mail::...eeMail(3pm) manual, courtesy of perl v5.40.1, dated 2026-07-23 πŸŽ€βœŒοΈ

πŸ“¦ where this page comes from