Debian Codegraph @

test/functional/configs/spamassassin.rules

raw
1 # These rules are from SpamAssasin project! (but might be modified)
2 # Licensed to the Apache Software Foundation (ASF) under one or more
3 # contributor license agreements. See the NOTICE file distributed with
4 # this work for additional information regarding copyright ownership.
5 # The ASF licenses this file to you under the Apache License, Version 2.0
6 # (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at:
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 ifplugin Mail::SpamAssassin::Plugin::FreeMail
18
19 freemail_domains qq.com yahoo.com outlook.com
20 freemail_domains lycosmail.com hotmail.com
21
22 header FREEMAIL_FROM eval:check_freemail_from()
23 describe FREEMAIL_FROM Sender email is commonly abused enduser mail provider
24 score FREEMAIL_FROM 1.0
25
26 header FREEMAIL_ENVFROM_END_DIGIT eval:check_freemail_header('EnvelopeFrom', '\d@')
27 describe FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit
28 score FREEMAIL_ENVFROM_END_DIGIT 1.0
29
30 header FREEMAIL_SUBJECT eval:check_freemail_header('Subject')
31 describe FREEMAIL_SUBJECT Subject contains freemail
32 score FREEMAIL_SUBJECT 1.0
33
34 endif
35
36 ifplugin Mail::SpamAssassin::Plugin::WLBLEval
37
38 header USER_IN_BLACKLIST eval:check_from_in_blacklist()
39 describe USER_IN_BLACKLIST From: address is in the user's black-list
40 tflags USER_IN_BLACKLIST userconf noautolearn
41 score USER_IN_BLACKLIST 10.0
42
43 header USER_IN_WHITELIST eval:check_from_in_whitelist()
44 describe USER_IN_WHITELIST From: address is in the user's white-list
45 tflags USER_IN_WHITELIST userconf nice noautolearn
46 score USER_IN_WHITELIST -10.0
47
48 header USER_IN_BLACKLIST_TO eval:check_to_in_blacklist()
49 describe USER_IN_BLACKLIST_TO User is listed in 'blacklist_to'
50 tflags USER_IN_BLACKLIST_TO userconf noautolearn
51 score USER_IN_BLACKLIST_TO 10.0
52
53 header USER_IN_WHITELIST_TO eval:check_to_in_whitelist()
54 describe USER_IN_WHITELIST_TO User is listed in 'whitelist_to'
55 tflags USER_IN_WHITELIST_TO userconf nice noautolearn
56 score USER_IN_WHITELIST_TO -10.0
57
58 # not implemented
59 #header USER_IN_DEF_WHITELIST eval:check_from_in_default_whitelist()
60 #describe USER_IN_DEF_WHITELIST From: address is in the default white-list
61 #tflags USER_IN_DEF_WHITELIST userconf nice noautolearn
62 #score USER_IN_DEF_WHITELIST -10.0
63
64 # not implemented
65 #header USER_IN_MORE_SPAM_TO eval:check_to_in_more_spam()
66 #describe USER_IN_MORE_SPAM_TO User is listed in 'more_spam_to'
67 #tflags USER_IN_MORE_SPAM_TO userconf nice noautolearn
68
69 # not implemented
70 #header USER_IN_ALL_SPAM_TO eval:check_to_in_all_spam()
71 #describe USER_IN_ALL_SPAM_TO User is listed in 'all_spam_to'
72 #tflags USER_IN_ALL_SPAM_TO userconf nice noautolearn
73
74 blacklist_to [email protected]
75 blacklist_from [email protected]
76 whitelist_from [email protected]
77 whitelist_to [email protected]
78 # not implemented
79 #whitelist_from [email protected] [email protected]
80 # not implemented
81 #whitelist_from *@example.com
82 # not implemented
83 #whitelist_from_rcvd *@example.org
84 # not implemented
85 #def_whitelist_from rspamd.com
86 endif
87
88 # These rules are /not/ from SpamAssassin project
89
90 header TEST_XFOO X-Foo =~ /.{1,50}/
91 score TEST_XFOO 1
92 header TEST_XBAR X-Bar =~ /.{1,50}/
93 score TEST_XBAR 1
94 meta TEST_META1 TEST_XFOO && TEST_XBAR
95 meta TEST_META2 TEST_META1 && SIMPLE_TEST
96 meta TEST_META3 TEST_META1 && TEST_META2
97 meta TEST_META4 TEST_META3 && TEST_XBAR