]> git.proxmox.com Git - proxmox-spamassassin.git/blame - sa-updates/25_dkim.cf
buildsys: use simple parenthesis for variables
[proxmox-spamassassin.git] / sa-updates / 25_dkim.cf
CommitLineData
b780ea8d
SI
1# SpamAssassin - DKIM rules
2#
3# Please don't modify this file as your changes will be overwritten with
4# the next update. Use /etc/mail/spamassassin/local.cf instead.
5# See 'perldoc Mail::SpamAssassin::Conf' for details.
6#
7# <@LICENSE>
8# Licensed to the Apache Software Foundation (ASF) under one or more
9# contributor license agreements. See the NOTICE file distributed with
10# this work for additional information regarding copyright ownership.
11# The ASF licenses this file to you under the Apache License, Version 2.0
12# (the "License"); you may not use this file except in compliance with
13# the License. You may obtain a copy of the License at:
14#
15# http://www.apache.org/licenses/LICENSE-2.0
16#
17# Unless required by applicable law or agreed to in writing, software
18# distributed under the License is distributed on an "AS IS" BASIS,
19# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20# See the License for the specific language governing permissions and
21# limitations under the License.
22# </@LICENSE>
23#
24###########################################################################
25
26# Requires the Mail::SpamAssassin::Plugin::DKIM plugin be loaded.
27
28ifplugin Mail::SpamAssassin::Plugin::DKIM
29
30# Note: DKIM_SIGNED, DKIM_VALID and DKIM_VALID_AU are mainly informational
31# rules, and can serve as a basis for meta rules; it is not difficult for a
32# sender to cause hits on them or to prevent them from firing, so their score
33# should be kept low.
34
35full DKIM_SIGNED eval:check_dkim_signed()
36describe DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid
37tflags DKIM_SIGNED net
38reuse DKIM_SIGNED
39
40full DKIM_VALID eval:check_dkim_valid()
41describe DKIM_VALID Message has at least one valid DKIM or DK signature
42tflags DKIM_VALID net nice
43reuse DKIM_VALID
44
45meta DKIM_INVALID DKIM_SIGNED && !DKIM_VALID
46describe DKIM_INVALID DKIM or DK signature exists, but is not valid
47
48full DKIM_VALID_AU eval:check_dkim_valid_author_sig()
49describe DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain
50tflags DKIM_VALID_AU net nice
51reuse DKIM_VALID_AU
52
53if (version >= 3.004002)
54full DKIM_VALID_EF eval:check_dkim_valid_envelopefrom()
55describe DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain
56tflags DKIM_VALID_EF net nice
57reuse DKIM_VALID_EF
58endif
59
60full __DKIM_DEPENDABLE eval:check_dkim_dependable()
61describe __DKIM_DEPENDABLE A validation failure not attributable to truncation
62reuse __DKIM_DEPENDABLE
63
64header DKIM_ADSP_NXDOMAIN eval:check_dkim_adsp('N')
65describe DKIM_ADSP_NXDOMAIN No valid author signature and domain not in DNS
66tflags DKIM_ADSP_NXDOMAIN net
67reuse DKIM_ADSP_NXDOMAIN
68
69header DKIM_ADSP_DISCARD eval:check_dkim_adsp('D')
70describe DKIM_ADSP_DISCARD No valid author signature, domain signs all mail and suggests discarding the rest
71tflags DKIM_ADSP_DISCARD net
72reuse DKIM_ADSP_DISCARD
73
74header DKIM_ADSP_ALL eval:check_dkim_adsp('A')
75describe DKIM_ADSP_ALL No valid author signature, domain signs all mail
76tflags DKIM_ADSP_ALL net
77reuse DKIM_ADSP_ALL
78
79header DKIM_ADSP_CUSTOM_LOW eval:check_dkim_adsp('1')
80describe DKIM_ADSP_CUSTOM_LOW No valid author signature, adsp_override is CUSTOM_LOW
81tflags DKIM_ADSP_CUSTOM_LOW net userconf
82reuse DKIM_ADSP_CUSTOM_LOW
83
84header DKIM_ADSP_CUSTOM_MED eval:check_dkim_adsp('2')
85describe DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED
86tflags DKIM_ADSP_CUSTOM_MED net userconf
87reuse DKIM_ADSP_CUSTOM_MED
88
89header DKIM_ADSP_CUSTOM_HIGH eval:check_dkim_adsp('3')
90describe DKIM_ADSP_CUSTOM_HIGH No valid author signature, adsp_override is CUSTOM_HIGH
91tflags DKIM_ADSP_CUSTOM_HIGH net userconf
92reuse DKIM_ADSP_CUSTOM_HIGH
93
94full __RESIGNER1 eval:check_dkim_valid('linkedin.com')
95tflags __RESIGNER1 net
96reuse __RESIGNER1
97full __RESIGNER2 eval:check_dkim_valid('googlegroups.com','yahoogroups.com','yahoogroups.de')
98tflags __RESIGNER2 net
99reuse __RESIGNER2
100meta __VIA_RESIGNER __RESIGNER1 || __RESIGNER2
101describe __VIA_RESIGNER Mail through a popular signing remailer
102
103meta NML_ADSP_CUSTOM_LOW DKIM_ADSP_CUSTOM_LOW && !__VIA_ML && !__VIA_RESIGNER
104describe NML_ADSP_CUSTOM_LOW ADSP custom_low hit, and not from a mailing list
105
106meta NML_ADSP_CUSTOM_MED DKIM_ADSP_CUSTOM_MED && !__VIA_ML && !__VIA_RESIGNER
107describe NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list
108
109meta NML_ADSP_CUSTOM_HIGH DKIM_ADSP_CUSTOM_HIGH && !__VIA_ML && !__VIA_RESIGNER
110describe NML_ADSP_CUSTOM_HIGH ADSP custom_high hit, and not from a mailing list
111
dfdd1e08
SI
112if can(Mail::SpamAssassin::Plugin::DKIM::has_arc)
113 full ARC_SIGNED eval:check_arc_signed()
114 describe ARC_SIGNED Message has a ARC signature
115 tflags ARC_SIGNED net
116 reuse ARC_SIGNED
117
118 full ARC_VALID eval:check_arc_valid()
119 describe ARC_VALID Message has a valid ARC signature
21dcadbf 120 tflags ARC_VALID net nice
dfdd1e08
SI
121 reuse ARC_VALID
122
123 meta ARC_INVALID ARC_SIGNED && !ARC_VALID
124 describe ARC_INVALID ARC signature exists, but is not valid
125endif
126
b780ea8d
SI
127#
128# old, declared for compatibility with pre-3.3, should have scores 0
129#
130
131full DKIM_VERIFIED eval:check_dkim_valid()
132tflags DKIM_VERIFIED net nice
133reuse DKIM_VERIFIED
134
135header DKIM_POLICY_TESTING eval:check_dkim_testing()
136tflags DKIM_POLICY_TESTING net nice
137reuse DKIM_POLICY_TESTING
138
139header DKIM_POLICY_SIGNSOME eval:check_dkim_signsome()
140tflags DKIM_POLICY_SIGNSOME net nice
141reuse DKIM_POLICY_SIGNSOME
142
143header DKIM_POLICY_SIGNALL eval:check_dkim_signall()
144tflags DKIM_POLICY_SIGNALL net nice
145reuse DKIM_POLICY_SIGNALL
146
147endif # Mail::SpamAssassin::Plugin::DKIM