# SpamAssassin rules file: DNSWL tests
#
# Please don't modify this file as your changes will be overwritten with
# the next update. Use @@LOCAL_RULES_DIR@@/local.cf instead.
# See 'perldoc Mail::SpamAssassin::Conf' for details.
#
# <@LICENSE>
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at:
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# </@LICENSE>
#
###########################################################################

ifplugin Mail::SpamAssassin::Plugin::DNSEval

#  0.000   0.0000   0.0000    0.500   1.00   -8.00  T_RCVD_IN_DNSWL_HI
#  0.817   0.2509   3.5683    0.066   0.50    1.00  __RCVD_IN_DNSWL
#  0.059   0.0000   0.3481    0.000   0.50   -1.00  T_RCVD_IN_DNSWL_LOW
#  0.163   0.0000   0.9574    0.000   0.00   -4.00  T_RCVD_IN_DNSWL_MED

header	__RCVD_IN_DNSWL		eval:check_rbl('dnswl-firsttrusted', 'list.dnswl.org.')
tflags	__RCVD_IN_DNSWL		nice net
reuse   __RCVD_IN_DNSWL

header	RCVD_IN_DNSWL_NONE	eval:check_rbl_sub('dnswl-firsttrusted', '^127\.0\.\d+\.0$')
describe RCVD_IN_DNSWL_NONE	Sender listed at https://www.dnswl.org/, no trust
tflags RCVD_IN_DNSWL_NONE	nice net
reuse  RCVD_IN_DNSWL_NONE

header	RCVD_IN_DNSWL_LOW	eval:check_rbl_sub('dnswl-firsttrusted', '^127\.0\.\d+\.1$')
describe RCVD_IN_DNSWL_LOW	Sender listed at https://www.dnswl.org/, low trust
tflags RCVD_IN_DNSWL_LOW	nice net
reuse  RCVD_IN_DNSWL_LOW

header	RCVD_IN_DNSWL_MED	eval:check_rbl_sub('dnswl-firsttrusted', '^127\.0\.\d+\.2$')
describe RCVD_IN_DNSWL_MED	Sender listed at https://www.dnswl.org/, medium trust
tflags RCVD_IN_DNSWL_MED	nice net
reuse  RCVD_IN_DNSWL_MED

header	RCVD_IN_DNSWL_HI	eval:check_rbl_sub('dnswl-firsttrusted', '^127\.0\.\d+\.3$')
describe RCVD_IN_DNSWL_HI	Sender listed at https://www.dnswl.org/, high trust
tflags RCVD_IN_DNSWL_HI		nice net
reuse  RCVD_IN_DNSWL_HI

## score RCVD_IN_DNSWL_LOW		-1
## score RCVD_IN_DNSWL_MED		-4
## score RCVD_IN_DNSWL_HI		-8

header	RCVD_IN_DNSWL_BLOCKED	eval:check_rbl_sub('dnswl-firsttrusted', '^127\.0\.\d+\.255$')
describe RCVD_IN_DNSWL_BLOCKED	ADMINISTRATOR NOTICE: The query to DNSWL was blocked.  See http://wiki.apache.org/spamassassin/DnsBlocklists\#DnsBlocklists-dnsbl-block for more information.
tflags RCVD_IN_DNSWL_BLOCKED	net noautolearn
reuse  RCVD_IN_DNSWL_BLOCKED

if can(Mail::SpamAssassin::Conf::feature_dns_block_rule)
dns_block_rule RCVD_IN_DNSWL_BLOCKED list.dnswl.org
endif

endif
