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