3 PublicInbox::SaPlugin::ListMirror - SpamAssassin plugin for mailing list mirrors
7 loadplugin PublicInbox::SaPlugin::ListMirror
9 Declare some mailing lists based on the expected List-ID value,
10 expected servers, and mailing list address:
12 list_mirror List-ID <foo.example.com> *.example.com foo@example.com
13 list_mirror List-ID <bar.example.com> *.example.com bar@example.com
15 Bump the score for messages which come from unexpected servers:
17 header LIST_MIRROR_RECEIVED eval:check_list_mirror_received()
18 describe LIST_MIRROR_RECEIVED Received does not match expected
19 score LIST_MIRROR_RECEIVED 10
21 Bump the score for messages which Bcc the list:
23 header LIST_MIRROR_BCC eval:check_list_mirror_bcc()
24 describe LIST_MIRROR_BCC Mailing list was Bcc-ed
25 score LIST_MIRROR_BCC 5
29 This plugin contains common functions to provide accurate, ongoing
30 mirrors of existing mailing lists. It may be used independently of the
31 rest of public-inbox, it does not depend on any public-inbox code, only
34 =head1 ADMINISTRATOR SETTINGS
36 This plugin has no administrator settings, aside from the need
37 to load it via C<loadplugin> and enabling user rules
44 =item list_mirror HEADER HEADER_VALUE HOSTNAME_GLOB [LIST_ADDRESS]
46 Declare a list based on an expected C<HEADER> matching C<HEADER_VALUE>
47 coming from C<HOSTNAME_GLOB>. C<LIST_ADDRESS> is optional,
48 but may specify the address of the mailing list being mirrored.
50 C<List-ID> is the recommended value of C<HEADER> as most
51 mailing lists support it.
53 An example of C<HEADER_VALUE> is C<E<lt>foo.example.orgE<gt>>
54 if C<HEADER> is C<List-ID>.
56 As of public-inbox 2.0, using C<List-ID> as the C<HEADER> and a
57 C<HEADER_VALUE> contained by angle brackets (E<lt>list-idE<gt>),
58 matching is done in accordance with
59 L<RFC 2919|https://tools.ietf.org/html/rfc2919>. That is,
60 C<HEADER_VALUE> will be a case-insensitive substring match
61 and ignore the optional description C<phrase> as documented
64 All other C<HEADER> values use exact matches for backwards-compatibility.
66 C<HOSTNAME_GLOB> may be a wildcard match for machines where mail can
67 come from or an exact match.
69 C<LIST_ADDRESS> is only required if using the L</check_list_mirror_bcc>
72 C<list_mirror> may be specified multiple times.
80 =item header LIST_MIRROR_RECEIVED eval:check_list_mirror_received()
82 The C<check_list_mirror_received> function implements C<Received:>
83 header checking based on L</list_mirror> configuration values.
85 This rule can be used to score and prevent messages from being injected
86 directly into your mirror without going through the expected mailing
89 ifplugin PublicInbox::SaPlugin::ListMirror
90 header LIST_MIRROR_RECEIVED eval:check_list_mirror_received()
91 describe LIST_MIRROR_RECEIVED Received does not match expected
94 =item header LIST_MIRROR_BCC eval:check_list_mirror_bcc()
96 The C<check_list_mirror_bcc> function checks for Bcc to mailing lists
97 declared with a C<LIST_ADDRESS> via L</list_mirror>
99 Spammers will often Bcc mailing lists; while it's uncommon and
100 strange for valid messages to be Bcc-ed to any public mailing list.
101 This rule allows users to assign a score to Bcc-ed messages
103 ifplugin PublicInbox::SaPlugin::ListMirror
104 header LIST_MIRROR_BCC eval:check_list_mirror_bcc()
105 describe LIST_MIRROR_BCC Mailing list was Bcc-ed
112 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
114 The mail archives are hosted at L<https://public-inbox.org/meta/>
115 and L<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
119 Copyright (C) all contributors L<mailto:meta@public-inbox.org>
121 License: AGPL-3.0+ L<http://www.gnu.org/licenses/agpl-3.0.txt>
125 L<Mail::SpamAssassin::Conf>