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