# SPAM FILTER SECTION STARTS
#
# Review restrictions that they are suitable for your use and
# add this file for example to top of main.cf file.
#
# Look more info about spam filtering options at
# http://www.postfix.org/uce.html
# http://www.postfix.org/postconf.5.html
#
# SpamCop Blocklist
# http://www.spamcop.net/bl.shtml
#
# Spamhaus
# http://www.spamhaus.org/
#
# Author: Petri.Koistinen@iki.fi
# Comments and improvements are welcome.
# (See also old filter for Postfix 1.1 if you need to.)

header_checks = regexp:/etc/postfix/header_checks

smtpd_helo_required = yes
disable_vrfy_command = yes

address_verify_map = btree:/var/run/postfix_address_verify

non_fqdn_reject_code = 450
invalid_hostname_reject_code = 450
maps_rbl_reject_code = 450

smtpd_relay_restrictions =
 permit_mynetworks
 permit_sasl_authenticated
 reject_unauth_destination

smtpd_recipient_restrictions =
 check_recipient_access hash:/etc/postfix/recipient_access
 reject_unknown_client_hostname
 reject_non_fqdn_sender
 reject_unknown_sender_domain
 reject_rbl_client zen.spamhaus.org
 reject_rbl_client bl.spamcop.net
 reject_rhsbl_sender dbl.spamhaus.org
 reject_rhsbl_reverse_client dbl.spamhaus.org

# last modified: Tuesday, 20-Oct-2026 14:36:46 EEST
# http://www.iki.fi/petri.koistinen/postfix/postfix-spam-filter.shtml
# SPAM FILTER SECTION ENDS