This file is indexed.

/usr/share/doc/procmail/QuickStart is in procmail 3.22-25+deb9u1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
procmail QuickStart
===================

* procmail is not an `interactive' program. It has to run automatically
when the mail arrives. Therefore the first thing to do is to tell our MTA
that we want procmail to "eat" all our mail messages. The way of doing
this depends on the MTA we are using. For example, if we are using
sendmail, it will suffice to have a .forward file like this in our home
directory:

"|exec /usr/bin/procmail"

(don't forget the quotes, they are needed in this case).

If you are using exim, use this instead as your .forward file:

|/usr/bin/procmail

The step of creating a .forward file is not needed if the MTA already
performs the delivery using procmail. For example, Debian sendmail will
automatically use procmail for mail delivering if the sendmail.cf is
generated from a sendmail.mc file containing this line:

FEATURE(local_procmail)dnl


* If we have a stand-alone system with no permanent net connection (like
PPP), and we are using fetchmail to get mail from a server, we don't
really need a MTA.  Just adding  --mda "formail -s procmail"  to the
fetchmail command line (or using the `mda' keyword) will tell it to
deliver through procmail.


* Next, we have to write a ~/.procmailrc file in our home directory. This
file is a set of filtering rules, based on regular expressions. The
complete syntax is explained in procmailrc(5). Let's see a real example
just to get started. Let's suppose you are subscribed to the following two
mailing lists:

linux-kernel@vger.kernel.org
debian-user@lists.debian.org

The first list is managed by Majordomo. Messages coming from a Majordomo
list often include a header field "Sender: " which allow easy filtering.

The second list is managed my SmartList. Messages coming from a SmartList
list may include several headers that can be used to filter it. One of
them (in fact, the only that it is not X-whatever) is "Resent-Sender: ".

So the following .procmailrc will first filter the mailing lists, and
any remaining message will go to the default folder:

*--------------------------------->8------------------------------------
MAILDIR=$HOME/mail             # you'd better make sure it exists
DEFAULT=$MAILDIR/mbox          # completely optional
LOGFILE=$MAILDIR/procmail.log  # recommended

:0:
* ^Sender:.*linux-kernel-owner@vger.kernel.org
linux-kernel

:0:
* ^Resent-Sender:.*debian-user-request@lists.debian.org
debian-user
*--------------------------------->8------------------------------------

From this example additional rules for mailing lists may be created
easily.


* Once you have received lots of messages you will want to know where
did they go. That's what the LOGFILE is for. There is a tool named
mailstat which parses this file and shows a summary:

mailstat procmail.log

The mailstat command that this package provides does really come from the
examples directory and it is installed by default. You may have your own
modified copy in $HOME/bin, if you like.


If you have to refilter an old mail folder according to your current
~/.procmailrc file, you may do the following:

cat mbox | formail -s procmail

But of course if your mbox file is the target of a procmail recipe you should
do this instead:

mv mbox whatever
cat whatever | formail -s procmail

See formail(1) for details.


Santiago Vila <sanvila@debian.org>