PublicI...stMirror(3)

✨ NAME ✨

PublicInbox::SaPlugin::ListMirror β€” a SpamAssassin plugin for mailing list mirrors πŸͺžπŸ’Œ

(Also hi bestie, this is a section 3 Perl manual page from the User Contributed Perl Documentation, so you're in exactly the right place πŸ’…)


🌸 SYNOPSIS 🌸

loadplugin PublicInbox::SaPlugin::ListMirror

Then you declare some mailing lists based on the expected List-ID value, the expected servers, and the mailing list address:

list_mirror List-ID <foo.example.com> *.example.com foo@example.com
list_mirror List-ID <bar.example.com> *.example.com bar@example.com

Bump the score for messages which come from unexpected servers:

header LIST_MIRROR_RECEIVED eval:check_list_mirror_received()
describe LIST_MIRROR_RECEIVED Received does not match expected
score LIST_MIRROR_RECEIVED 10

And bump the score for messages which Bcc the list πŸ‘€:

header LIST_MIRROR_BCC eval:check_list_mirror_bcc()
describe LIST_MIRROR_BCC Mailing list was Bcc-ed
score LIST_MIRROR_BCC 5

πŸ¦‹ DESCRIPTION πŸ¦‹

This plugin is packing common functions that let you run accurate, ongoing mirrors of existing mailing lists ✨ It's lowkey independent β€” it may be used independently of the rest of public-inbox, and it does not depend on any public-inbox code at all, only SpamAssassin. No cap, that's the whole vibe. 🫢


πŸ‘‘ ADMINISTRATOR SETTINGS πŸ‘‘

This plugin has no administrator settings, aside from:

  • the need to load it via loadplugin
  • enabling user rules with allow_user_rules 1

That's it, that's the list πŸ’…


πŸŽ€ USER SETTINGS πŸŽ€

  • list_mirror HEADER HEADER_VALUE HOSTNAME_GLOB [LIST_ADDRESS] β€” declare a list based on an expected HEADER matching HEADER_VALUE coming from HOSTNAME_GLOB. LIST_ADDRESS is optional, but it may specify the address of the mailing list being mirrored.

List-ID is the recommended value of HEADER since most mailing lists support it πŸ’–

An example of HEADER_VALUE is <foo.example.org> if HEADER is List-ID.

As of public-inbox 2.0, when you use List-ID as the HEADER and a HEADER_VALUE contained by angle brackets (<list-id>), matching is done in accordance with RFC 2919 (https://tools.ietf.org/html/rfc2919). Which means: HEADER_VALUE will be a case-insensitive substring match and it ignores the optional description phrase as documented in RFC 2919. It's giving very "we read the spec, actually" πŸ“šβœ¨

All other HEADER values use exact matches for backwards-compatibility.

HOSTNAME_GLOB may be a wildcard match for machines where mail can come from, or an exact match 🎯

LIST_ADDRESS is only required if you're using the check_list_mirror_bcc eval rule.

And yes bestie, list_mirror may be specified multiple times. Stack 'em up 🧚


πŸ”₯ EVAL FUNCTIONS πŸ”₯

header LIST_MIRROR_RECEIVED eval:check_list_mirror_received()

The check_list_mirror_received function implements Received: header checking based on list_mirror configuration values πŸ•΅οΈβ™€οΈ

This rule can be used to score and prevent messages from being injected directly into your mirror without going through the expected mailing list servers. Iconic protective behavior honestly πŸ›‘οΈ

ifplugin PublicInbox::SaPlugin::ListMirror
  header LIST_MIRROR_RECEIVED eval:check_list_mirror_received()
  describe LIST_MIRROR_RECEIVED Received does not match expected
endif

header LIST_MIRROR_BCC eval:check_list_mirror_bcc()

The check_list_mirror_bcc function checks for Bcc to mailing lists declared with a LIST_ADDRESS via list_mirror πŸ’Œ

Spammers will often Bcc mailing lists; while it's uncommon and strange for valid messages to be Bcc-ed to any public mailing list. This rule allows users to assign a score to Bcc-ed messages. It's giving "why are you whispering to a public list" energy πŸ˜­πŸ’€

ifplugin PublicInbox::SaPlugin::ListMirror
  header LIST_MIRROR_BCC eval:check_list_mirror_bcc()
  describe LIST_MIRROR_BCC Mailing list was Bcc-ed
endif

πŸ’œ CONTACT πŸ’œ

Feedback welcome via plain-text mail to <mailto:meta@public-inbox.org> πŸ“¬

The mail archives are hosted at:

(yes that second one is a whole onion address, she's mysterious like that πŸ§…βœ¨)


Copyright (C) all contributors <mailto:meta@public-inbox.org>

License: AGPL-3.0+ β€” http://www.gnu.org/licenses/agpl-3.0.txt πŸ“œ


⭐ SEE ALSO ⭐

  • Mail::SpamAssassin::Conf

okay that's the whole page bestie, go forth and mirror those lists πŸ’–

This was perl v5.42.0, dated 2025-07-25 β€” stay slaying, and remember: accurate mirrors only, no cap πŸ‘‘πŸ’…

πŸ“¦ where this page comes from