]> git.donarmstrong.com Git - remote_mail.git/blob - .procmailrc
send messages from sacramento city unified to Laurel
[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 # Send messages from sacramento city unified to Laurel
147 :0:cr
148 * ^From:.*DoNotReply@scusd.edu
149 | /usr/lib/sendmail lkdwillow@gmail.com
150
151 # Work around procmail bug: any output on stderr will cause the "F" in "From"
152 # to be dropped.  This will re-add it.
153 :0 H
154 * ! ^From[ ]
155 * ^rom[ ]
156 {
157   LOG="*** Dropped F off From_ header! Fixing up. "
158
159   :0 fhw
160   | sed -e 's/^rom /From /'
161 }
162
163 # Debian role accounts
164 :0:
165 * ^Delivered-To: (owner@bugs.debian.org)
166 bugs.debian.org/
167
168 :0:
169 * ^Delivered-To: .*listmaster@lists.debian.org
170 lists.debian.org/
171
172 :0:
173 * ^Delivered-To: .*lists-listmaster@bendel.debian.org
174 lists.debian.org/
175
176 # Buildds
177 :0:
178 * ^Return-Path:.*buildd@.*.donarmstrong.com
179 buildd.donarmstrong.com/
180
181 # OFTC stuff
182 :0:
183 * ^TO (oftc@spi-inc.org)
184 oftc/
185
186 # Chili ALRM
187 :0:
188 * ^Subject:\ (\[comment\])?\[ALRM\ \#
189 chili_alarm/
190
191 :0:
192 * ^From:\ nagios@nagios-global.lab.propel.com
193 chili_alarm/
194
195 # Mail from dragongo
196 :0:
197 * ^From:\ noreply@dragongoserver.net
198 lists/dragongo/
199
200 # discard all yahoogroups mail
201 # except for those to rsult (riverside ultimate)
202 :0:
203 * !^To:.*rsult@yahoogroups.com
204 * ^To:.*@yahoogroups.com
205 /dev/null
206
207
208 ###################
209 #  Mailing lists  #
210 ###################
211
212 :0:
213 * ^From:.*announcements@student.ucr.edu
214 lists/ucr-announcements
215
216 :0:
217 * ^List-Id: <stannounce2.lists.ucr.edu>
218 lists/ucr-announcements
219
220 :0:
221 * X-Mailing-List: <\/[^@]+
222 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
223
224 :0:
225 * ^Delivered-To: mailing list \/[^@]+
226 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
227
228 :0:
229 * ^Sender: owner-\/[^@]+
230 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
231
232 :0:
233 * ^Sender: +<?\/[^@]+-bounces?
234 lists/`echo $MATCH | sed -e 's/\-bounces*//g; s/\"//g; s/.*<//g; s/[\/]/_/g; y/A-Z/a-z/'`/
235
236 :0:   
237 * ^X-BeenThere: \/[^@]+
238 lists/`echo $MATCH | sed -e 's/<//g; s/[\/]/_/g'`/
239
240
241 # Dumb apache mailing lists
242 :0:
243 * ^List-Post: <mailto:\/[^@]+
244 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
245
246
247 # Debian's bug system uses X-Loop
248 :0:
249 * ^X-PTS-Package: \/.+
250 bugs/bug_reports/
251
252 :0:
253 * ^X-Debian-PR-Source: \/.+
254 bugs/bug_reports/
255
256 :0:
257 * ^X-Debian-PR-Package: \/.+
258 bugs/bug_reports/
259
260 :0:
261 * ^X-Loop: owner@bugs.debian.org
262 bugs/bug_reports/
263
264 :0:
265 * X-Loop: \/[^@]+
266 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
267
268 :0:
269 * X-ML-Name: \/[^@]+
270 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
271
272 # damn kernel back-to-frontness
273 :0:
274 * ^Sender:[      ]linux-kernel-owner@vger.kernel.org
275 lists/linux-kernel/
276
277 # linux-scsi
278 :0:
279 * ^Sender:[      ]linux-scsi-owner@vger.kernel.org
280 lists/linux-scsi/
281
282 # emacs-pretesters
283 :0:
284 * ^Sender:[      ]emacs-pretesters@gnu.org
285 lists/emacs-pretesters/
286
287 :0:
288 * ^Sender:.*GENE-ARRAYS@ITSSRV1.UCSF.EDU
289 lists/gene-arrays/
290
291 :0:
292 * ^Sender:.*scd-bounce@blars.org
293 lists/scd/
294
295 # broken lists using win32 software and NO LIST HEADER. Dumb.
296 :0:
297 * ^Sender: (Bugtraq|Incidents Mailing|VULN-DEV) List
298 lists/bugtraq/
299
300 #####################################
301 # Last rule:  Put mail into mailbox #
302 #####################################
303
304 :0:
305 $DEFAULT
306
307 # End of file