aboutsummaryrefslogtreecommitdiff
path: root/procmailrc.dot.link
blob: 4a13d0fb4ddc09ef80c2e29e87692344321f4858 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#
# Procmail rules
#
# * Recipe lines begin with :0
# * Dont put comments on recipe lines
# * Disable a recipe with the false condition !
# * Condition lines begin with * and regex is your friend
# * Conditions are anded and everything after * is fed straight into egrep
# * One action line follows the conditions (for example a mailbox name)
#
# Procmail is being deprecated. For more information, check
#
# * https://lwn.net/Articles/416901/
# * http://www.wonkity.com/~wblock/docs/html/maildrop.html
# * https://www.courier-mta.org/maildrop/maildrop.html
# * https://www.courier-mta.org/maildrop/maildropfilter.html#include
# * https://gitlab.torproject.org/tpo/tpa/team/-/issues/40639

MAILDIR=$HOME/mail
LOGFILE=$HOME/temp/log/procmail
LOGABSTRACT=no
VERBOSE=off
FORMAIL=/usr/bin/formail
NL="
"

#
# SPAM handling
#

# Send mail through bogofilter
# See http://www.exstrom.com/journal/comp/bogofilter.html
#     http://www.linuxjournal.com/article/6439
#     http://bogofilter.sourceforge.net/faq.shtml
:0fw
| /usr/bin/bogofilter -uep

# Custom recipes
INCLUDERC=$HOME/.custom/procmailrc

# Put mail bogofilter deems as spam in spam folder
:0:
* ^X-Bogosity: Spam, tests=bogofilter
INBOX.Trash/new

# Put mail bogofilter deems as unsure in spam folder
#:0:
#* ^X-Bogosity: Unsure, tests=bogofilter
#INBOX.Trash/new

:0:
* ^X-Spam-Level: ******
INBOX.Trash/new

:0:
* ^X-Spam-Flag: YES
INBOX.Trash/new

:0:
* ^Subject:.*(SPAM)
INBOX.Trash/new

:0:
* ^X-Bogosity:.*Yes
INBOX.Trash/new

:0:
*^Subject:.*(\*\*\*SPAM\*\*\*)
INBOX.Trash/new

:0:
*^X-Bogosity: Spam.*
INBOX.Trash/new

################################
# Last rule: mail that gets    #
# this far goes in default box #
################################
:0
* .*
INBOX/new