-
Notifications
You must be signed in to change notification settings - Fork 1
/
_forward
91 lines (76 loc) · 1.84 KB
/
_forward
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
82
83
84
85
86
87
88
89
90
91
# Exim filter - magic cookie - do not remove line
# vi: filetype=exim
# To test: /usr/sbin/sendmail -bf _forward < TEST_MESSAGE
# Or in mutt pipe through: /usr/sbin/sendmail -bf _forward | less
logfile $home/Maildir/from
logwrite "From $sender_address $tod_log $message_id"
logwrite "Subject: $h_subject"
if $h_X-Redmine-Host: CONTAINS "projects.puppetlabs.com"
then
logwrite " => puppet-redmine"
save $home/Maildir/.INBOX.puppet-redmine/
finish
endif
if $h_Sender: CONTAINS "[email protected]"
then
logwrite " => ny_pm"
save $home/Maildir/.INBOX.ny_pm/
finish
endif
if $h_List-Id: CONTAINS "london.pm.london.pm.org"
then
logwrite " => london_pm"
save $home/Maildir/.INBOX.london_pm/
finish
endif
if $h_List-Id: CONTAINS "london.pm.groups.perlists.pm"
then
logwrite " => london_pm"
save $home/Maildir/.INBOX.london_pm/
finish
endif
if $h_List-Id: matches "<(london.pm|jobs|jobs-discuss)\.london\.pm\.org>"
then
logwrite " => london_pm-$1"
save $home/Maildir/.INBOX.london_pm-$1/
finish
endif
if $h_List-Id: matches "<(.*?)\.pm\.org>"
then
logwrite " => $1"
save $home/Maildir/.INBOX.$1/
finish
endif
if $h_List-Id: matches "<(.*?)\.googlegroups\.com>"
then
logwrite " => $1"
save $home/Maildir/.INBOX.$1/
finish
endif
if $h_List-Id: CONTAINS "void.slab.org"
then
logwrite " => void"
save $home/Maildir/.INBOX.void/
finish
endif
if $h_List-Id: CONTAINS "pod-people.perl.org"
then
logwrite " => pod-people"
save $home/Maildir/.INBOX.pod-people/
finish
endif
if $h_List-Id: CONTAINS "hates-software"
then
logwrite " => hates-software"
save $home/Maildir/.INBOX.hates-software/
finish
endif
if $h_X-is-spam: CONTAINS "yes"
then
logwrite " => SPAM"
save $home/Maildir/.Spam/
finish
endif
logwrite " => INBOX"
save $home/Maildir/
finish