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