-
Notifications
You must be signed in to change notification settings - Fork 9
/
.procmailrc
49 lines (39 loc) · 1.05 KB
/
.procmailrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# $Id: ~/.procmailrc Exp $
#
RECIPIENT="${1}"
SHIFT = 1
SHELL=/bin/sh
MAILDIR="${HOME}/mail"
DEFAULT="${HOME}/mail/${RECIPIENT}"
LOGFILE="${HOME}/.log/procmail.log"
BOGOFILTER_DIR="${HOME}/mail/.bogofilter:${RECIPIENT}"
# Filter mail through bogofilter, tagging it as Ham, Spam, or Unsure,
# and updating the wordlist
:0fw
| bogofilter -u -e -p
# if bogofilter failed, return the mail to the queue;
# the MTA will retry to deliver it later
# 75 is the value for EX_TEMPFAIL in /usr/include/sysexits.h
:0e
{
EXITCODE=75 HOST
}
# File the mail to spam-bogofilter if it's spam.
:0:
* ^X-Bogosity: Spam, tests=bogofilter
spam-${RECIPIENT}
# File the mail to unsure-bogofilter
# if it's neither ham nor spam.
#:0:
#* ^X-Bogosity: Unsure, tests=bogofilter
#unsure-${RECIPIENT}
# With this recipe, you can train bogofilter starting with an empty
# wordlist. Be sure to check your unsure-folder regularly, take the
# messages out of it, classify them as ham (or spam), and use them to
# train bogofilter.
:0:
${DEFAULT}
#
# vim:fenc=utf-8:ci:pi:sts=2:sw=2:ts=2:
#