Hans Ekbrand
2011-Sep-10 11:08 UTC
[Pkg-exim4-users] how to reject mails when Reverse DNS check fails?
Dear exim users, I want to reject mail when Reverse DNS lookup fails, currently I only get a warning - like this: X-Host-Lookup-Failed: Reverse DNS lookup failed for 203.211.146.24 (failed) I have CHECK_RCPT_REVERSE_DNS = yes CHECK_RCPT_SPF = yes in /etc/exim4/conf.d/main/00_local_options How do I configure exim to reject instead of warn? Kind regards, Hans Ekbrand
Akihiro Terasaki
2011-Sep-10 13:42 UTC
[Pkg-exim4-users] how to reject mails when Reverse DNS check fails?
On Sat, Sep 10, 2011 at 13:08 +0200, Hans Ekbrand wrote:> How do I configure exim to reject instead of warn?--- conf.d/acl/30_exim4-config_check_rcpt 2011-09-10 22:00:29.000000000 +0900 +++ conf.d/acl/30_exim4-config_check_rcpt.new 2011-09-10 22:07:44.000000000 +0900 @@ -228,6 +228,10 @@ # this instead of !verify = reverse_host_lookup to catch deferrals # as well as outright failures. .ifdef CHECK_RCPT_REVERSE_DNS + deny + !verify = reverse_host_lookup + message = Reverse DNS lookup failed for $sender_host_address + warn message = X-Host-Lookup-Failed: Reverse DNS lookup failed for $sender_host_address (${if eq{$host_lookup_failed}{1}{failed}{deferred}}) condition = ${if and{{def:sender_host_address}{!def:sender_host_name}}\ Hope this helps -- Akihiro Terasaki
Johann Spies
2011-Sep-12 06:27 UTC
[Pkg-exim4-users] how to reject mails when Reverse DNS check fails?
Hallo Hans, On Sat, Sep 10, 2011 at 01:08:41PM +0200, Hans Ekbrand wrote:> Dear exim users, > > I want to reject mail when Reverse DNS lookup fails, currently I only > get a warning - like this: > > X-Host-Lookup-Failed: Reverse DNS lookup failed for 203.211.146.24 (failed) > > I have > CHECK_RCPT_REVERSE_DNS = yes > CHECK_RCPT_SPF = yes > > in /etc/exim4/conf.d/main/00_local_options > > How do I configure exim to reject instead of warn?I did this to find the answer: % sudo rgrep CHECK_RCPT_REVERSE_DNS /etc/exim4 /etc/exim4/exim4.conf.template: .ifdef CHECK_RCPT_REVERSE_DNS /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt: .ifdef CHECK_RCPT_REVERSE_DNS % vim /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt You can change the ''warn'' in the section where CHECK_RCPT_REVERSE_DNS is used to ''deny'' Regards Johann -- Johann Spies Telefoon: 021-808 4699 Databestuurder / Data manager Sentrum vir Navorsing oor Evaluasie, Wetenskap en Tegnologie Centre for Research on Evaluation, Science and Technology Universiteit Stellenbosch. "Let the wicked forsake his way, and the unrighteous man his thoughts: and let him return unto the LORD, and He will have mercy upon him; and to our God, for he will abundantly pardon." Isaiah 55:7
Hans Ekbrand
2011-Sep-17 20:36 UTC
[Pkg-exim4-users] how to reject mails when Reverse DNS check fails?
On Mon, Sep 12, 2011 at 08:27:19AM +0200, Johann Spies wrote:> Hallo Hans, > > > On Sat, Sep 10, 2011 at 01:08:41PM +0200, Hans Ekbrand wrote: > > Dear exim users, > > > > I want to reject mail when Reverse DNS lookup fails, currently I only > > get a warning - like this: > > > > X-Host-Lookup-Failed: Reverse DNS lookup failed for 203.211.146.24 (failed) > > > > I have > > CHECK_RCPT_REVERSE_DNS = yes > > CHECK_RCPT_SPF = yes > > > > in /etc/exim4/conf.d/main/00_local_options > > > > How do I configure exim to reject instead of warn? > > I did this to find the answer: > > % sudo rgrep CHECK_RCPT_REVERSE_DNS /etc/exim4 > /etc/exim4/exim4.conf.template: .ifdef CHECK_RCPT_REVERSE_DNS > /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt: .ifdef > CHECK_RCPT_REVERSE_DNS > % vim /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt > > You can change the ''warn'' in the section where CHECK_RCPT_REVERSE_DNS is > used to ''deny''Thanks, Johann and Akihiro!