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