Mail::...etadata(3pm)

πŸ’– NAME πŸ’–

Mail::SpamAssassin::Message::Metadata β€” extract metadata from a message ✨

okay so bestie, this is the little icon that goes and snoops out metadata from your messages πŸ•΅οΈβ™€οΈπŸ’…


🌸 DESCRIPTION 🌸

This class is literally tasked with extracting "metadata" from messages β€” for use as Bayes tokens, as fodder for eval tests, or for whatever other rules you're cooking up πŸ“. Metadata is supplemental data inferred from the message, like the examples below.

It's held in two forms, and yes, both of them matter:

  1. as name-value pairs of strings, presented in mail header format πŸ’Œ. For example, "X-Languages" => "en". This is the general form for simple metadata that's useful as Bayes tokens, can be added to marked-up messages using add_header, etc., such as the trusted-relay inference and language detection. iconic, simple, slay.
  2. as more complex data structures on the $msg->{metadata} object 🧚. This is the form used for metadata like the HTML parse data, which is stored there for access by eval rule code. Because it's not simple strings, it's not added as a Bayes token by default (Bayes needs simple strings). no cap, Bayes is picky like that 😭

πŸ‘‘ PUBLIC METHODS πŸ‘‘

✨ new() ✨

that's it. that's the method. the main character 🫢


so anyway, this page is from the User Contributed Perl Documentation collection, running on perl v5.40.1, dated 2026-07-23 β€” and that's the whole vibe check, bestie πŸ’œπŸ¦‹ go forth and extract that metadata 🌈⭐

πŸ“¦ where this page comes from