PublicInbox::SaPlugin::ListMirror3pm
Spamassassin plugin for mailing list mirrors
Usage
loadplugin PublicInbox::SaPlugin::ListMirror
Declare some mailing lists based on the expected List-ID value, expected servers, and mailing list address:
list_mirror List-ID <foo.example.com> *.example.com [email protected]list_mirror List-ID <bar.example.com> *.example.com [email protected]
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 expectedscore LIST_MIRROR_RECEIVED 10
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-edscore LIST_MIRROR_BCC 5
Overview
This plugin contains common functions to provide accurate, ongoing mirrors of existing mailing lists. It may be used independently of the rest of public-inbox, it does not depend on any public-inbox code, only SpamAssassin.
Administrator settings
This plugin has no administrator settings, aside from the need to load it via "loadplugin" and enabling user rules "allow_user_rules 1"
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 may specify the address of the mailing list being mirrored."List-ID"is the recommended value of"HEADER"as 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, using
"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>. That is,"HEADER_VALUE"will be a case-insensitive substring match and ignore the optional description"phrase"as documented in RFC 2919.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 using the "check_list_mirror_bcc" eval rule"list_mirror"may be specified multiple times.
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:
ifplugin PublicInbox::SaPlugin::ListMirrorheader LIST_MIRROR_RECEIVED eval:check_list_mirror_received()describe LIST_MIRROR_RECEIVED Received does not match expectedendif
- 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
ifplugin PublicInbox::SaPlugin::ListMirrorheader LIST_MIRROR_BCC eval:check_list_mirror_bcc()describe LIST_MIRROR_BCC Mailing list was Bcc-edendif
Contact
Feedback welcome via plain-text mail to <mailto:[email protected]>
The mail archives are hosted at <https://public-inbox.org/meta/> and <http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
Releases
3 releases since Debian 12 (Bookworm); the text changed 1 time.