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