-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsieve_filter.master
More file actions
74 lines (61 loc) · 2.33 KB
/
sieve_filter.master
File metadata and controls
74 lines (61 loc) · 2.33 KB
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
<tmpl_if name="sieve_script" op="==" value="before">
# This sieve script is generated by ISPConfig, any changes made will be overwritten.
# You can create and activate a per-user sieve script (manually or via managesieve),
# which will execute after this.
require ["body", "copy", "date", "envelope", "fileinto", "imap4flags", "mailbox", "regex", "reject", "relational", "subaddress", "vacation", "variables"];
<tmpl_if name="move_junk" op="==" value="y">
# Move spam to spam folder
if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
fileinto :create "Junk";
# Stop here so that we do not reply on spams
stop;
}
</tmpl_if>
<tmpl_if name="cc">
# Send a copy of email to
<tmpl_loop name="ccloop">
redirect :copy "<tmpl_var name='address'>";
</tmpl_loop>
</tmpl_if>
<tmpl_var name='custom_mailfilter'>
</tmpl_if>
<tmpl_if name="sieve_script" op="==" value="after">
# This sieve script is generated by ISPConfig, any changes made will be overwritten.
# You can create and activate a per-user sieve script (manually or via managesieve),
# which will execute before this.
require ["body", "copy", "date", "envelope", "fileinto", "imap4flags", "mailbox", "regex", "reject", "relational", "subaddress", "vacation", "variables"];
<tmpl_if name="move_junk" op="==" value="a">
# Move spam to spam folder
if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
fileinto :create "Junk";
# Stop here so that we do not reply on spams
stop;
}
</tmpl_if>
<tmpl_if name="autoresponder" op="==" value="y">
#################################################################
# Autoreply
#################################################################
# Move spam to spam folder
if anyof (header :is ["X-Spam", "X-Spam-Flag"] "Yes", header :matches "X-Spam-Status" "Yes, *") {
# Stop here so that we do not reply on spams
stop;
}
<tmpl_if name="start_date">
if currentdate :value "ge" "iso8601" "<tmpl_var name='start_date'>" {
</tmpl_if>
<tmpl_if name="end_date">
if currentdate :value "le" "iso8601" "<tmpl_var name='end_date'>" {
</tmpl_if>
vacation :days 1
:subject "<tmpl_var name='autoresponder_subject'>"
<tmpl_var name='addresses'>
"<tmpl_var name='autoresponder_text'>";
<tmpl_if name="end_date">
}
</tmpl_if>
<tmpl_if name="start_date">
}
</tmpl_if>
</tmpl_if>
</tmpl_if>