{"id":474,"date":"2015-05-31T14:04:39","date_gmt":"2015-05-31T20:04:39","guid":{"rendered":"http:\/\/bozhidar.maramski.com\/?p=474"},"modified":"2015-06-08T11:02:55","modified_gmt":"2015-06-08T17:02:55","slug":"dns-blacklist-with-exim","status":"publish","type":"post","link":"https:\/\/bogi.maramski.com\/?p=474","title":{"rendered":"DNS Blacklist with Exim"},"content":{"rendered":"<p>First switch exim4 to use split configuration files.<\/p>\n<p> Edit the file \/etc\/exim4\/conf.d\/main\/02_exim4-config_options and insert the following after the very last line.<\/p>\n<p><code># Added TODAYS-DATE by YOURNAME<br \/>\nCHECK_RCPT_IP_DNSBLS = zen.spamhaus.org\/<;$sender_host_address;$sender_address_domain :\\\n     nomail.rhsbl.sorbs.net\/$sender_address_domain : cbl.abuseat.org :\\\n     list.dsbl.org : web.dnsbl.sorbs.net : socks.dnsbl.sorbs.net :\\\n     http.dnsbl.sorbs.net\nCHECK_RCPT_DOMAIN_DNSBLS = zen.spamhaus.org\/<;$sender_host_address;$sender_address_domain :\\\n     nomail.rhsbl.sorbs.net\/$sender_address_domain : cbl.abuseat.org :\\\n     list.dsbl.org : web.dnsbl.sorbs.net : socks.dnsbl.sorbs.net :\\\n     http.dnsbl.sorbs.net\n<\/code><\/p>\n<p>Edit the file \/etc\/exim4\/conf.d\/acl\/30_exim4-config_check_rcpt. Search for CHECK_RCPT_IP_DNSBLS acl and change the word \"warn\" to \"deny\" as shown below:<\/p>\n<p><code># Check against classic DNS \"black\" lists (DNSBLs) which list<br \/>\n  # Check against classic DNS \"black\" lists (DNSBLs) which list<br \/>\n  # sender IP addresses<br \/>\n  .ifdef CHECK_RCPT_IP_DNSBLS<br \/>\n  deny<br \/>\n    message = X-Warning: $sender_host_address is listed at $dnslist_domain ($dnslist_value: $dnslist_text)<br \/>\n    log_message = $sender_host_address is listed at $dnslist_domain ($dnslist_value: $dnslist_text)<br \/>\n    dnslists = CHECK_RCPT_IP_DNSBLS<br \/>\n  .endif<\/p>\n<p>  # Check against DNSBLs which list sender domains, with an option to locally<br \/>\n  # whitelist certain domains that might be blacklisted.<br \/>\n  #<br \/>\n  # Note: If you define CHECK_RCPT_DOMAIN_DNSBLS, you must append<br \/>\n  # \"\/$sender_address_domain\" after each domain.  For example:<br \/>\n  # CHECK_RCPT_DOMAIN_DNSBLS = rhsbl.foo.org\/$sender_address_domain \\<br \/>\n  #                            : rhsbl.bar.org\/$sender_address_domain<br \/>\n  .ifdef CHECK_RCPT_DOMAIN_DNSBLS<br \/>\n  deny<br \/>\n    message = X-Warning: $sender_address_domain is listed at $dnslist_domain ($dnslist_value: $dnslist_text)<br \/>\n    log_message = $sender_address_domain is listed at $dnslist_domain ($dnslist_value: $dnslist_text)<br \/>\n    !senders = ${if exists{CONFDIR\/local_domain_dnsbl_whitelist}\\<br \/>\n                    {CONFDIR\/local_domain_dnsbl_whitelist}\\<br \/>\n                    {}}<br \/>\n    dnslists = CHECK_RCPT_DOMAIN_DNSBLS<br \/>\n  .endif<br \/>\n<\/code><\/p>\n<p>Restart Exim so that our configuration changes take effect:<\/p>\n<p>\/etc\/init.d\/exim4 restart<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First switch exim4 to use split configuration files. Edit the file \/etc\/exim4\/conf.d\/main\/02_exim4-config_options and insert the following after the very last line. # Added TODAYS-DATE by YOURNAME CHECK_RCPT_IP_DNSBLS = zen.spamhaus.org\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-474","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=\/wp\/v2\/posts\/474"}],"collection":[{"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=474"}],"version-history":[{"count":6,"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=\/wp\/v2\/posts\/474\/revisions"}],"predecessor-version":[{"id":482,"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=\/wp\/v2\/posts\/474\/revisions\/482"}],"wp:attachment":[{"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bogi.maramski.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}