commit | author | age
|
4bb0bf
|
1 |
require ["fileinto","reject","envelope"]; |
AM |
2 |
# rule:[spam] |
|
3 |
if anyof (header :contains "X-DSPAM-Result" "Spam") |
|
4 |
{ |
|
5 |
fileinto "Spam"; |
|
6 |
stop; |
|
7 |
} |
|
8 |
# rule:[test1] |
|
9 |
if anyof (header :comparator "i;ascii-casemap" :contains ["From","To"] "test@domain.tld") |
|
10 |
{ |
|
11 |
discard; |
|
12 |
stop; |
|
13 |
} |
|
14 |
# rule:[test2] |
|
15 |
if anyof (not header :comparator "i;octet" :contains ["Subject"] "[test]", header :contains "Subject" "[test2]") |
|
16 |
{ |
|
17 |
fileinto "test"; |
|
18 |
stop; |
|
19 |
} |
|
20 |
# rule:[comments] |
|
21 |
if anyof (true) /* comment |
|
22 |
* "comment" #comment */ { |
|
23 |
/* comment */ stop; |
|
24 |
# comment |
|
25 |
} |
|
26 |
# rule:[reject] |
|
27 |
if size :over 5000K { |
|
28 |
reject "Message over 5MB size limit. Please contact me before sending this."; |
|
29 |
} |
|
30 |
# rule:[false] |
|
31 |
if false # size :over 5000K |
|
32 |
{ |
|
33 |
stop; /* rule disabled */ |
|
34 |
} |
|
35 |
# rule:[true] |
|
36 |
if true |
|
37 |
{ |
|
38 |
stop; |
|
39 |
} |
|
40 |
fileinto "Test"; |
|
41 |
# rule:[address test] |
|
42 |
if address :all :is "From" "nagios@domain.tld" |
|
43 |
{ |
|
44 |
fileinto "domain.tld"; |
|
45 |
stop; |
|
46 |
} |
|
47 |
# rule:[envelope test] |
|
48 |
if envelope :domain :is "From" "domain.tld" |
|
49 |
{ |
|
50 |
fileinto "domain.tld"; |
|
51 |
stop; |
|
52 |
} |