]> git.donarmstrong.com Git - remote_mail.git/blob - .procmailrc
stop archiving a copy of mail
[remote_mail.git] / .procmailrc
1 PATH=/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
2
3 SHELL=/bin/bash
4
5 # "VERBOSE=on" is only used for debugging.
6 VERBOSE=off
7
8 SENDMAIL=sendmail
9 MAILDIR=$HOME/Maildir
10 DEFAULT=$MAILDIR/Inbox/
11 LOGFILE=$HOME/.procmail_log
12 # LOGABSTRACT = "all"
13
14 # TODO
15
16 #:0 c:
17 #$HOME/Mail/temp/
18
19 # Add filter for "your message to foo awaits moderator approval"
20 # filter out owner mails
21
22
23 # where to send spam
24 HIGHSPAM=spam/HIGHSPAM/
25 SPAM=spam/SPAM/
26 JOEJOB=spam/JOEJOB/
27 POSTMASTER=spam/POSTMASTER/
28
29 # A list (one per line) of people I KNOW are spammers :-)
30 # can match any part of name so you can use fred, fred@aol.com or aol.com to
31 # match a user, mail address or domain.
32 # Note that this file is case-insensitive.
33 SPAMMERS=$HOME/.procmail/spammers
34
35 # name of the file containing a list of people we
36 # always want to get mail from, one per line.  If
37 # any substring of the From: or Sender: line matches
38 # a line of this file, it will go through, so this
39 # can be used to denote entire sites that we always
40 # wish to get mail from as well as individuals.
41 # E.g. "user", "user@aol.com" or "aol.com".
42 # Note that this file is case-insensitive.
43 # Putting all of the people or lists you get lots
44 # of mail from here will not only insure you get
45 # it, but will speed up procmail.
46 FRIENDS=$HOME/.procmail/friends
47
48 # ======================================
49 # Preventing duplicates using 16Kb cache
50 # They get shoved in duplicates folder
51 #:0 Whc: .msgid.lock
52 #| formail -D 16384 msgid.cache.new
53 #:0 a:
54 #/dev/null
55
56 :0 H
57 * ^Subject:.*Rnm-devel moderator request
58 /dev/null
59
60 :0 H
61 * ^Subject:.*Cron.*debbugs@master
62 /dev/null
63
64
65 # Handle delay messages
66 :0 Hc
67 * !Message-Id: .*delay[0-9]+@
68 * ^TO \/don\+delay\+[^@]+
69 $HOME/Mail/delay
70
71 :0 Hhbw
72 * !Message-Id: .*delay[0-9]+@
73 * ^TO \/don\+delay\+[^@]+
74 |/home/don/bin/delay_mail --mailto don@donarmstrong.com --enqueue --email --delay $MATCH
75
76 # Convert old-style PGP messages to MIME
77 :0
78 * !^Content-Type: multipart/
79 * !^Content-Type: application/pgp
80 {
81     :0 fBw
82     * ^-----BEGIN PGP MESSAGE-----
83     * ^-----END PGP MESSAGE-----
84     | formail \
85         -i "Content-Type: application/pgp; format=text; x-action=encrypt"
86
87     :0 fBw
88     * ^-----BEGIN PGP SIGNED MESSAGE-----
89     * ^-----BEGIN PGP SIGNATURE-----
90     * ^-----END PGP SIGNATURE-----
91     | formail \
92         -i "Content-Type: application/pgp; format=text; x-action=sign"
93 }
94
95 :0:
96 * ! ? (formail -x From: -x Sender: | fgrep -iqf $FRIENDS)
97 {
98
99 # Mails with a score of 15 or higher are almost certainly spam
100 :0:
101 * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
102 #definetly_spam
103 /dev/null
104
105 # Mails that are clearly spam, but we don't want to toss immediately
106 :0:
107 * ^X-Spam-Level: \*\*\*\*\*\*\*\*
108 $HIGHSPAM
109
110 # All mail tagged as spam (eg. with a score higher than the set threshold)
111 # is moved to "probably-spam".
112 :0:
113 * ^X-Spam-Status: Yes
114 $SPAM
115
116
117 # I get joe-jobbed a lot; if a message is from a mailer, but not from
118 # one of mine, discard it.
119 :0:
120 * (^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )([^>]*[^(.%@a-z0-9])?(Post(ma(st(er)?|n)|office)|(send)?Mailer|daemon|mmdf|n?uucp|ops|r(esponse|oot)|(bbs\.)?smtp(error)?|(s(erver)|ystem)|A(dmin(istrator)?|MMGR))(([^).!:a-z0-9][-_a-z0-9]*)?[%@>\t ][^<)]*(\(.*\).*)?)?$([^>]|$))
121 * !^From:.+(ucr|debian|donarmstrong|sndservers|ccin|schedulesdirect|promtheuslabor.com)
122 * !^From:.+(schedulesdirect|paypal.com)
123 * !^To:.+ (don\+.+\@donarmstrong\.com)
124 * !^List-.+
125 * !^X-Diagnostic:
126 $JOEJOB
127
128 # stuff for postmaster at my machines
129 :0:
130 * ^To: postmaster@
131 $POSTMASTER
132
133 # mail from people I don't want to see, because they annoy me
134 :0:
135 * ^From:.*rgm@gnu.org
136 $HOME/Mail/idiots
137
138 # Work around procmail bug: any output on stderr will cause the "F" in "From"
139 # to be dropped.  This will re-add it.
140 :0 H
141 * ! ^From[ ]
142 * ^rom[ ]
143 {
144   LOG="*** Dropped F off From_ header! Fixing up. "
145
146   :0 fhw
147   | sed -e 's/^rom /From /'
148 }
149
150
151
152
153 # Debian role accounts
154
155 :0:
156 * ^Delivered-To: (owner@bugs.debian.org)
157 bugs.debian.org/
158
159 :0:
160 * ^Delivered-To: (listmaster@lists.debian.org)
161 lists.debian.org/
162
163
164 # OFTC stuff
165 :0:
166 * ^TO (oftc@spi-inc.org)
167 oftc/
168
169 # Chili ALRM
170 :0:
171 * ^Subject:\ (\[comment\])?\[ALRM\ \#
172 chili_alarm/
173
174 :0:
175 * ^From:\ nagios@nagios-global.lab.propel.com
176 chili_alarm/
177
178 #
179 :0:
180 * ^From:\ noreply@dragongoserver.net
181 lists/dragongo/
182
183 ###################
184 #  Mailing lists  #
185 ###################
186
187 :0:
188 * ^From:.*announcements@student.ucr.edu
189 lists/ucr-announcements
190
191 :0:
192 * ^List-Id: <stannounce2.lists.ucr.edu>
193 lists/ucr-announcements
194
195 :0:
196 * X-Mailing-List: <\/[^@]+
197 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
198
199 :0:
200 * ^Delivered-To: mailing list \/[^@]+
201 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
202
203 :0:
204 * ^Sender: owner-\/[^@]+
205 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
206
207 :0:
208 * ^Sender: \/[^@]+-bounces?
209 lists/`echo $MATCH | sed -e 's/\-bounces*//g; s/[\/]/_/g'`/
210
211 :0:   
212 * ^X-BeenThere: \/[^@]+
213 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
214
215
216 # Dumb apache mailing lists
217 :0:
218 * ^List-Post: <mailto:\/[^@]+
219 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
220
221
222 # Debian's bug system uses X-Loop
223 :0:
224 * ^X-PTS-Package: \/.+
225 bugs/`echo $MATCH |sed -e 's/[\/]/_/g'`/
226
227 :0:
228 * ^X-Debian-PR-Source: \/.+
229 bugs/`echo $MATCH |sed -e 's/[\/]/_/g'`/
230
231 :0:
232 * ^X-Debian-PR-Package: \/.+
233 bugs/`echo $MATCH |sed -e 's/[\/]/_/g'`/
234
235 :0:
236 * ^X-Loop: owner@bugs.debian.org
237 bugs/control_messages/
238
239 :0:
240 * X-Loop: \/[^@]+
241 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
242
243 :0:
244 * X-ML-Name: \/[^@]+
245 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
246
247 # damn kernel back-to-frontness
248 :0:
249 * ^Sender:[      ]linux-kernel-owner@vger.kernel.org
250 lists/linux-kernel/
251
252 # linux-scsi
253 :0:
254 * ^Sender:[      ]linux-scsi-owner@vger.kernel.org
255 lists/linux-scsi/
256
257 # emacs-pretesters
258 :0:
259 * ^Sender:[      ]emacs-pretesters@gnu.org
260 lists/emacs-pretesters/
261
262 :0:
263 * ^Sender:.*GENE-ARRAYS@ITSSRV1.UCSF.EDU
264 lists/gene-arrays/
265
266 :0:
267 * ^Sender:.*scd-bounce@blars.org
268 lists/scd/
269
270 # broken lists using win32 software and NO LIST HEADER. Dumb.
271 :0:
272 * ^Sender: (Bugtraq|Incidents Mailing|VULN-DEV) List
273 lists/bugtraq/
274
275 # morons on emacs-devel keep Cc:'ing me; discard the message if it
276 # lists emacs-devel in To or Cc
277 :0:
278 * ^(To|Cc):.*emacs-devel@gnu.org
279 * !^Sender:.*emacs-devel
280 /dev/null
281
282
283 #####################################
284 # Last rule:  Put mail into mailbox #
285 #####################################
286
287 :0:
288 $DEFAULT
289
290 # End of file