]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/public-inbox-learn.pod
treewide: run update-copyrights from gnulib for 2019
[public-inbox.git] / Documentation / public-inbox-learn.pod
1 =head1 NAME
2
3 public-inbox-learn - spam trainer and remover for public-inbox
4
5 =head1 SYNOPSIS
6
7 B<public-inbox-learn> <spam|ham|rm> E<lt>MESSAGE
8
9 =head1 DESCRIPTION
10
11 public-inbox-learn can remove spam or inject ham messages into
12 an inbox while training a SpamAssassin instance.
13
14 It is intended for users of L<public-inbox-mda(1)> or
15 L<public-inbox-watch(1)>, but not users relying on
16 L<git-fetch(1)> to mirror inboxes.
17
18 It reads one message from standard input and operates on it
19 depending on the command given:
20
21 =head1 COMMANDS
22
23 public-inbox-learn takes one of the following commands as its
24 first and only argument:
25
26 =over 8
27
28 =item spam
29
30 Treat the message as spam.  This will mark the message as
31 removed so it becomes inaccessible via NNTP or WWW endpoints
32 for all configured inboxes.
33
34 The message remains accessible in git history.
35
36 It will also be fed to L<spamc(1)> for training purposes unless
37 C<publicinboxmda.spamcheck> is C<none> in L<public-inbox-config(5)>.
38
39 =item ham
40
41 Treat standard input as ham.  This is useful for manually injecting
42 messages into the archives which failed the spam check run by
43 L<public-inbox-mda(1)> or L<public-inbox-watch(1)>.
44
45 It relies on the C<To:>, C<Cc:>, and C<List-ID:> headers
46 to match configured inbox addresses and C<listid> directives.
47
48 It will also be fed to L<spamc(1)> for training purposes unless
49 C<publicinboxmda.spamcheck> is C<none> in L<public-inbox-config(5)>.
50
51 =item rm
52
53 This is identical to the C<spam> command above, but does
54 not feed the message to L<spamc(1)>
55
56 =back
57
58 =head1 ENVIRONMENT
59
60 =over 8
61
62 =item PI_CONFIG
63
64 Per-user config file parseable by L<git-config(1)>.
65 See L<public-inbox-config(5)>.
66
67 Default: ~/.public-inbox/config
68
69 =back
70
71 =head1 CONTACT
72
73 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
74
75 The mail archives are hosted at L<https://public-inbox.org/meta/>
76 and L<http://hjrcffqmbrq6wope.onion/meta/>
77
78 =head1 COPYRIGHT
79
80 Copyright 2019-2020 all contributors L<mailto:meta@public-inbox.org>
81
82 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
83
84 =head1 SEE ALSO
85
86 L<spamc(1)>, L<public-inbox-mda(1)>, L<public-inbox-watch(1)>