Mail::...aceTags(3pm)

πŸ’… NAME πŸ’…

Okay bestie, gather round, because this is Mail::SpamAssassin::Plugin::ReplaceTags β€” it's the SpamAssassin plugin that gives your rules tags, hun. Regular-expression tags, specifically, that you can sprinkle into your regular expression rules. The whole point? It makes complicated rules so much easier to maintain. It's giving "my regex is a mess but make it fashion." ✨

Warning, bestie, real talk: this plugin leans on data structures that are specific to this version of SpamAssassin. It is not guaranteed to work with other versions of SpamAssassin. Like, she's committed, okay? She's not seeing other versions. πŸ’€

✨ SYNOPSIS ✨

  loadplugin    Mail::SpamAssassin::Plugin::ReplaceTags

  replace_start <
  replace_end   >

  replace_tag   A       [a@]
  replace_tag   G       [gk]
  replace_tag   I       [il|!1y\?\xcc\xcd\xce\xcf\xec\xed\xee\xef]
  replace_tag   R       [r3]
  replace_tag   V       (?:[vu]|\\\/)
  replace_tag   SP      [\s~_-]

  body          VIAGRA_OBFU     /(?!viagra)<V>+<SP>*<I>+<SP>*<A>+<SP>*<G>+<SP>*<R>+<SP>*<A>+/i
  describe      VIAGRA_OBFU     Attempt to obfuscate "viagra"

  replace_rules VIAGRA_OBFU

πŸ‘‘ RULE DEFINITIONS AND PRIVILEGED SETTINGS πŸ‘‘

πŸŽ€ The tag-defining settings

  • replace_tag tagname expression β€” assigns a valid regular expression to tagname. That's it, that's the whole job. Slay.
Note: it is not recommended to put quantifiers inside the tag. Bestie, put them inside the rule itself for greater flexibility. Trust. πŸ™ˆ
  • replace_pre tagname expression β€” assigns a valid regular expression to tagname. This expression gets placed before each tag that is replaced. Like a little pregame before the main event. πŸ’«
  • replace_inter tagname expression β€” assigns a valid regular expression to tagname. This expression gets placed between each two immediately adjacent tags that are replaced. She's the middle child, she goes in-between. 🫢
  • replace_post tagname expression β€” assigns a valid regular expression to tagname. This expression gets placed after each tag that is replaced. Afterparty energy. 🌸

🌈 The rule-shaping settings

  • replace_rules list_of_tests β€” specify a list of symbolic test names (separated by whitespace, so spaces, bestie, not commas) of tests that should be modified using replacement tags.
Heads up: only simple regular expression body, header, uri, full, rawbody tests are supported. Don't come at her with anything fancier. πŸ’…

πŸ¦‹ The delimiter settings

  • replace_start string β€” the string that indicates the start of a tag inside a rule.
  • replace_end string β€” the string that indicates the end of a tag inside a rule.

Together? Only tags enclosed by the start and end strings are found and replaced. It's literally a vibe check for tags: if you're not wrapped up in the right delimiters, you're not getting replaced, periodt. ✨


And that's the whole page, my love β€” perl v5.40.1, dated 2026-07-23, and it's the Mail::...aceTags(3pm) page from your friendly neighborhood User Contributed Perl Documentation. Go forth and obfuscate responsibly. πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from