How to enable RBL filters in postfix?
My current configuration:
submission inet n - n - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=reject_sender_login_mismatch,permit
-o receive_override_options=no_header_body_checks,no_address_mappings
-o smtpd_sender_restrictions=permit_sasl_authenticated,reject
-o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
The mails are being sent and recieved.
When I add:
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net
Thunderbird loops forever during sending and nothing happens. /var/log/mail.* are empty.
Your
reject_rbl_client
declaration goes into the smtpd_recipient_restrictions declaration found in main.cf. For my CentOS machines, that's in /etc/postfix/. The code you posted tends to show up in master.cf. That's a different file all-together.This is what my smtpd_recipient_restrictions definition looks like:
As the others said, you put reject_rbl_client in wrong place. Set it in smtpd line
master.cf
or inmain.cf
.If your postfix has version 2.8 higher, you can put the RBL checking in
postscreen
. You can get more info in Postscreen Howto page.For example, the equivalent config of
in postscreen terms is
Some consideration where you put rbl check, smtpd_*_restriction or postscreen
Postcreen Pros
postscreen_dnsbl_sites = internal.rbl.example.com*3, spamhaus.org
)permit_dnswl_client
Postcreen Cons
See Sebix answer to this question and a thread in postfix mailing list