]> git.donarmstrong.com Git - remote_mail.git/blob - .procmailrc
handle usgo e-mail to lists
[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 # Daycare emails
77 :0:
78 * 1^0 ^Subject: Cottage Kids Children's Center Check-
79 * 1^0 ^Subject: Bright Path to Learning Child Development Center
80 daycare/
81
82 :0:
83 * ! ? (formail -x From: -x Sender: | fgrep -iqf $FRIENDS)
84 {
85
86 # Mails with a score of 15 or higher are almost certainly spam
87 :0:
88 * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
89 #definetly_spam
90 /dev/null
91
92 # Mails that are clearly spam, but we don't want to toss immediately
93 :0:
94 * ^X-Spam-Level: \*\*\*\*\*\*\*\*
95 $HIGHSPAM
96
97 # All mail tagged as spam (eg. with a score higher than the set threshold)
98 # is moved to "probably-spam".
99 :0:
100 * ^X-Spam-Status: Yes
101 $SPAM
102
103 }
104
105 # discard bounces from dumb mailing lists on prometheuslabor
106 :0:
107 * ^From: MAILER-DAEMON@
108 * ^To: root@mail.prometheuslabor.com
109 * ^Subject:.*Undelivered
110 /dev/null
111
112 # Discard bounces from lists.acbnrates.com
113 :0:
114 * ^To: mailman-bounces@lists.acbnrates.com
115 * ^Subject:.*Undelivered
116 /dev/null
117
118 # discard AQMD mail
119 :0:
120 * ^From: usc.aqmd@usc.edu
121 * ^Subject:.*USC AQMD Survey
122 /dev/null
123
124 # discard no spam digest
125 :0:
126 * ^From: .*spam-control@illinois.edu
127 * ^Subject:.*End User Digest: 0 New Messages
128 /dev/null
129
130 # stuff for postmaster at my machines
131 :0:
132 * ^To: postmaster@
133 $POSTMASTER
134
135 # mail from people I don't want to see, because they annoy me
136 :0:
137 * ^From:.*rgm@gnu.org
138 $HOME/Mail/idiots
139
140 # Send messages from sacramento city unified to Laurel
141 :0:cr
142 * ^From:.*DoNotReply@scusd.edu
143 | /usr/lib/sendmail lkdwillow@gmail.com
144
145 # Work around procmail bug: any output on stderr will cause the "F" in "From"
146 # to be dropped.  This will re-add it.
147 :0 H
148 * ! ^From[ ]
149 * ^rom[ ]
150 {
151   LOG="*** Dropped F off From_ header! Fixing up. "
152
153   :0 fhw
154   | sed -e 's/^rom /From /'
155 }
156
157 # Debian role accounts
158 :0:
159 * ^Delivered-To: (owner@bugs.debian.org)
160 bugs.debian.org/
161
162 :0:
163 * ^Delivered-To: .*listmaster@lists.debian.org
164 lists.debian.org/
165
166 :0:
167 * ^Delivered-To: .*lists-listmaster@bendel.debian.org
168 lists.debian.org/
169
170 # Buildds
171 :0:
172 * ^Return-Path:.*buildd@.*.donarmstrong.com
173 buildd.donarmstrong.com/
174
175 # OFTC stuff
176 :0:
177 * ^TO (oftc@spi-inc.org)
178 oftc/
179
180 # Chili ALRM
181 :0:
182 * ^Subject:\ (\[comment\])?\[ALRM\ \#
183 chili_alarm/
184
185 :0:
186 * ^From:\ nagios@nagios-global.lab.propel.com
187 chili_alarm/
188
189 # Mail from dragongo
190 :0:
191 * ^From:\ noreply@dragongoserver.net
192 lists/dragongo/
193
194 # discard all yahoogroups mail
195 # except for those to rsult (riverside ultimate)
196 :0:
197 * !^To:.*rsult@yahoogroups.com
198 * ^To:.*@yahoogroups.com
199 /dev/null
200
201
202 ###################
203 #  Mailing lists  #
204 ###################
205
206 :0:
207 * ^From:.*announcements@student.ucr.edu
208 lists/ucr-announcements
209
210 :0:
211 * ^List-Id: <stannounce2.lists.ucr.edu>
212 lists/ucr-announcements
213
214 :0:
215 * X-Mailing-List: <\/[^@]+
216 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
217
218 :0:
219 * ^Delivered-To: mailing list \/[^@]+
220 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
221
222 :0:
223 * ^Sender: owner-\/[^@]+
224 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
225
226 :0:
227 * ^Sender: +<?\/[^@]+-bounces?
228 lists/`echo $MATCH | sed -e 's/\-bounces*//g; s/\"//g; s/.*<//g; s/[\/]/_/g; y/A-Z/a-z/'`/
229
230 :0:   
231 * ^X-BeenThere: \/[^@]+
232 lists/`echo $MATCH | sed -e 's/<//g; s/[\/]/_/g'`/
233
234
235 # Dumb apache mailing lists
236 :0:
237 * ^List-Post: <mailto:\/[^@]+
238 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
239
240
241 # Debian's bug system uses X-Loop
242 :0:
243 * ^X-PTS-Package: \/.+
244 bugs/bug_reports/
245
246 :0:
247 * ^X-Debian-PR-Source: \/.+
248 bugs/bug_reports/
249
250 :0:
251 * ^X-Debian-PR-Package: \/.+
252 bugs/bug_reports/
253
254 :0:
255 * ^X-Loop: owner@bugs.debian.org
256 bugs/bug_reports/
257
258 :0:
259 * X-Loop: \/[^@]+
260 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
261
262 :0:
263 * X-ML-Name: \/[^@]+
264 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
265
266 # damn kernel back-to-frontness
267 :0:
268 * ^Sender:[      ]linux-kernel-owner@vger.kernel.org
269 lists/linux-kernel/
270
271 # linux-scsi
272 :0:
273 * ^Sender:[      ]linux-scsi-owner@vger.kernel.org
274 lists/linux-scsi/
275
276 # emacs-pretesters
277 :0:
278 * ^Sender:[      ]emacs-pretesters@gnu.org
279 lists/emacs-pretesters/
280
281 :0:
282 * ^Sender:.*GENE-ARRAYS@ITSSRV1.UCSF.EDU
283 lists/gene-arrays/
284
285 :0:
286 * ^Sender:.*scd-bounce@blars.org
287 lists/scd/
288
289 :0:
290 * ^Sender:.*journal@usgo.org
291 lists/usgo/
292
293 # broken lists using win32 software and NO LIST HEADER. Dumb.
294 :0:
295 * ^Sender: (Bugtraq|Incidents Mailing|VULN-DEV) List
296 lists/bugtraq/
297
298 #####################################
299 # Last rule:  Put mail into mailbox #
300 #####################################
301
302 :0:
303 $DEFAULT
304
305 # End of file