.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 3pm" .TH PublicInbox::SaPlugin::ListMirror 3pm "2022-11-14" "perl v5.32.1" "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 \s-1HEADER HEADER_VALUE HOSTNAME_GLOB\s0 [\s-1LIST_ADDRESS\s0]" 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 \*(L"check_list_mirror_bcc\*(R" eval rule .Sp \&\f(CW\*(C`list_mirror\*(C'\fR may be specified multiple times. .SH "EVAL FUNCTIONS" .IX Header "EVAL FUNCTIONS" .IP "header \s-1LIST_MIRROR_RECEIVED\s0 \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 \*(L"list_mirror\*(R" 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 \s-1LIST_MIRROR_BCC\s0 \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 \*(L"list_mirror\*(R" .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: \s-1AGPL\-3.0+\s0 .SH "SEE ALSO" .IX Header "SEE ALSO" Mail::SpamAssassin::Conf