.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PublicInbox::SaPlugin::ListMirror 3" .TH PublicInbox::SaPlugin::ListMirror 3 2023-07-30 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PublicInbox::SaPlugin::ListMirror \- SpamAssassin plugin for mailing list mirrors .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& loadplugin PublicInbox::SaPlugin::ListMirror .Ve .PP Declare some mailing lists based on the expected List-Id value, expected servers, and mailing list address: .PP .Vb 2 \& list_mirror List\-Id *.example.com foo@example.com \& list_mirror List\-Id *.example.com bar@example.com .Ve .PP Bump the score for messages which come from unexpected servers: .PP .Vb 3 \& header LIST_MIRROR_RECEIVED eval:check_list_mirror_received() \& describe LIST_MIRROR_RECEIVED Received does not match expected \& score LIST_MIRROR_RECEIVED 10 .Ve .PP Bump the score for messages which Bcc the list: .PP .Vb 3 \& header LIST_MIRROR_BCC eval:check_list_mirror_bcc() \& describe LIST_MIRROR_BCC Mailing list was Bcc\-ed \& score LIST_MIRROR_BCC 5 .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" 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. .SH "ADMINISTRATOR SETTINGS" .IX Header "ADMINISTRATOR SETTINGS" This plugin has no administrator settings, aside from the need to load it via \f(CW\*(C`loadplugin\*(C'\fR and enabling user rules \&\f(CW\*(C`allow_user_rules 1\*(C'\fR .SH "USER SETTINGS" .IX Header "USER SETTINGS" .IP "list_mirror HEADER HEADER_VALUE HOSTNAME_GLOB [LIST_ADDRESS]" 4 .IX Item "list_mirror HEADER HEADER_VALUE HOSTNAME_GLOB [LIST_ADDRESS]" Declare a list based on an expected \f(CW\*(C`HEADER\*(C'\fR matching \f(CW\*(C`HEADER_NAME\*(C'\fR exactly coming from \f(CW\*(C`HOSTNAME_GLOB\*(C'\fR. \f(CW\*(C`LIST_ADDRESS\*(C'\fR is optional, but may specify the address of the mailing list being mirrored. .Sp \&\f(CW\*(C`List\-Id\*(C'\fR or \f(CW\*(C`X\-Mailing\-List\*(C'\fR are common values of \f(CW\*(C`HEADER\*(C'\fR .Sp An example of \f(CW\*(C`HEADER_VALUE\*(C'\fR is \f(CW\*(C`\*(C'\fR if \f(CW\*(C`HEADER\*(C'\fR is \f(CW\*(C`List\-Id\*(C'\fR. .Sp \&\f(CW\*(C`HOSTNAME_GLOB\*(C'\fR may be a wildcard match for machines where mail can come from or an exact match. .Sp \&\f(CW\*(C`LIST_ADDRESS\*(C'\fR is only required if using the "check_list_mirror_bcc" eval rule .Sp \&\f(CW\*(C`list_mirror\*(C'\fR may be specified multiple times. .SH "EVAL FUNCTIONS" .IX Header "EVAL FUNCTIONS" .IP "header LIST_MIRROR_RECEIVED \fBeval:check_list_mirror_received()\fR" 4 .IX Item "header LIST_MIRROR_RECEIVED eval:check_list_mirror_received()" The \f(CW\*(C`check_list_mirror_received\*(C'\fR function implements \f(CW\*(C`Received:\*(C'\fR header checking based on "list_mirror" configuration values. .Sp 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: .Sp .Vb 4 \& ifplugin PublicInbox::SaPlugin::ListMirror \& header LIST_MIRROR_RECEIVED eval:check_list_mirror_received() \& describe LIST_MIRROR_RECEIVED Received does not match expected \& endif .Ve .IP "header LIST_MIRROR_BCC \fBeval:check_list_mirror_bcc()\fR" 4 .IX Item "header LIST_MIRROR_BCC eval:check_list_mirror_bcc()" The \f(CW\*(C`check_list_mirror_bcc\*(C'\fR function checks for Bcc to mailing lists declared with a \f(CW\*(C`LIST_ADDRESS\*(C'\fR via "list_mirror" .Sp 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 .Sp .Vb 4 \& ifplugin PublicInbox::SaPlugin::ListMirror \& header LIST_MIRROR_BCC eval:check_list_mirror_bcc() \& describe LIST_MIRROR_BCC Mailing list was Bcc\-ed \& endif .Ve .SH CONTACT .IX Header "CONTACT" Feedback welcome via plain-text mail to .PP The mail archives are hosted at and .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 2016\-2021 all contributors .PP License: AGPL\-3.0+ .SH "SEE ALSO" .IX Header "SEE ALSO" Mail::SpamAssassin::Conf