]> git.donarmstrong.com Git - remote_mail.git/blob - .procmailrc
* add rules to handle joejobs
[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
28 # A list (one per line) of people I KNOW are spammers :-)
29 # can match any part of name so you can use fred, fred@aol.com or aol.com to
30 # match a user, mail address or domain.
31 # Note that this file is case-insensitive.
32 SPAMMERS=$HOME/.procmail/spammers
33
34 # name of the file containing a list of people we
35 # always want to get mail from, one per line.  If
36 # any substring of the From: or Sender: line matches
37 # a line of this file, it will go through, so this
38 # can be used to denote entire sites that we always
39 # wish to get mail from as well as individuals.
40 # E.g. "user", "user@aol.com" or "aol.com".
41 # Note that this file is case-insensitive.
42 # Putting all of the people or lists you get lots
43 # of mail from here will not only insure you get
44 # it, but will speed up procmail.
45 FRIENDS=$HOME/.procmail/friends
46
47 # ======================================
48 # Preventing duplicates using 16Kb cache
49 # They get shoved in duplicates folder
50 #:0 Whc: .msgid.lock
51 #| formail -D 16384 msgid.cache.new
52 #:0 a:
53 #/dev/null
54
55 :0 H
56 * ^Subject:.*Rnm-devel moderator request
57 /dev/null
58
59 :0 H
60 * ^Subject:.*Cron.*debbugs@master
61 /dev/null
62
63
64 # Handle delay messages
65 :0 Hc
66 * !Message-Id: .*delay[0-9]+@
67 * ^TO \/don\+de[^@]+
68 $HOME/Mail/delay
69
70 :0 Hhbw
71 * !Message-Id: .*delay[0-9]+@
72 * ^TO \/don\+delay\+[^@]+
73 |/home/don/bin/delay_mail --mailto don@donarmstrong.com --enqueue --email --delay $MATCH
74
75
76 :0:
77 * ! ? (formail -x From: -x Sender: | fgrep -iqf $FRIENDS)
78 {
79
80 # Mails with a score of 15 or higher are almost certainly spam
81 :0:
82 * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
83 #definetly_spam
84 /dev/null
85
86 # Mails that are clearly spam, but we don't want to toss immediately
87 :0:
88 * ^X-Spam-Level: \*\*\*\*\*\*\*\*
89 $HIGHSPAM
90
91 # All mail tagged as spam (eg. with a score higher than the set threshold)
92 # is moved to "probably-spam".
93 :0:
94 * ^X-Spam-Status: Yes
95 $SPAM
96
97
98 # I get joe-jobbed a lot; if a message is from a mailer, but not from
99 # one of mine, discard it.
100 :0:
101 * ^FROM_MAILER
102 * !^From:.+(ucr|debian|donarmstrong|sndservers|ccin)
103 $JOEJOB
104
105 # Work around procmail bug: any output on stderr will cause the "F" in "From"
106 # to be dropped.  This will re-add it.
107 :0 H
108 * ! ^From[ ]
109 * ^rom[ ]
110 {
111   LOG="*** Dropped F off From_ header! Fixing up. "
112
113   :0 fhw
114   | sed -e 's/^rom /From /'
115 }
116
117
118
119
120 # Debian role accounts
121
122 :0:
123 * ^Delivered-To: (owner@bugs.debian.org)
124 bugs.debian.org/
125
126 :0:
127 * ^Delivered-To: (listmaster@lists.debian.org)
128 lists.debian.org/
129
130
131 # OFTC stuff
132 :0:
133 * ^TO (oftc@spi-inc.org)
134 oftc/
135
136 # Chili ALRM
137 :0:
138 * ^Subject:\ (\[comment\])?\[ALRM\ \#
139 chili_alarm/
140
141 :0:
142 * ^From:\ nagios@nagios-global.lab.propel.com
143 chili_alarm/
144
145 #
146 :0:
147 * ^From:\ noreply@dragongoserver.net
148 lists/dragongo/
149
150 ###################
151 #  Mailing lists  #
152 ###################
153
154 :0:
155 * X-Mailing-List: <\/[^@]+
156 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
157
158 :0:
159 * ^Delivered-To: mailing list \/[^@]+
160 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
161
162 :0:
163 * ^Sender: owner-\/[^@]+
164 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
165
166 :0:
167 * ^Sender: \/[^@]+-bounces?
168 lists/`echo $MATCH | sed -e 's/\-bounces*//g; s/[\/]/_/g'`/
169
170 :0:   
171 * ^X-BeenThere: \/[^@]+
172 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
173
174
175 # Dumb apache mailing lists
176 :0:
177 * ^List-Post: <mailto:\/[^@]+
178 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
179
180
181 # Debian's bug system uses X-Loop
182 8
183 :0:
184 * ^X-PTS-Package: \/.+
185 bugs/`echo $MATCH |sed -e 's/[\/]/_/g'`/
186
187 :0:
188 * ^X-Debian-PR-Package: \/.+
189 bugs/`echo $MATCH |sed -e 's/[\/]/_/g'`/
190
191 :0:
192 * ^X-Loop: owner@bugs.debian.org
193 bugs/control_messages/
194
195 :0:
196 * X-Loop: \/[^@]+
197 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
198
199 :0:
200 * X-ML-Name: \/[^@]+
201 lists/`echo $MATCH | sed -e 's/[\/]/_/g'`/
202
203 # damn kernel back-to-frontness
204 :0:
205 * ^Sender:[      ]linux-kernel-owner@vger.kernel.org
206 lists/linux-kernel/
207
208 # linux-scsi
209 :0:
210 * ^Sender:[      ]linux-scsi-owner@vger.kernel.org
211 lists/linux-scsi/
212
213 # emacs-pretesters
214 :0:
215 * ^Sender:[      ]emacs-pretesters@gnu.org
216 lists/emacs-pretesters/
217
218 :0:
219 * ^Sender:.*GENE-ARRAYS@ITSSRV1.UCSF.EDU
220 lists/gene-arrays/
221
222 :0:
223 * ^Sender:.*scd-bounce@blars.org
224 lists/scd/
225
226 # broken lists using win32 software and NO LIST HEADER. Dumb.
227 :0:
228 * ^Sender: (Bugtraq|Incidents Mailing|VULN-DEV) List
229 lists/bugtraq/
230
231 #####################################
232 # Last rule:  Put mail into mailbox #
233 #####################################
234
235 :0:
236 $DEFAULT
237
238 # End of file