Re: [exim] Trapping Connection Errors

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Todd Lyons
日付:  
To: Systems Controllor
CC: Exim
題目: Re: [exim] Trapping Connection Errors
On Fri, Aug 22, 2014 at 5:50 PM, Systems Controllor <www.query@gmail.com> wrote:

> Exim 4.63 (Centos 5) and Exim 4.72 (Centos 6).


I build current 64 bit versions of Exim for C5 and C6, available for
download if you want them at
http://downloads.mrball.net/Linux/CentOS/. They are built differently
than the distro provided versions.

> I would like to trap and then use the absence of a Host name in ACL
> Connection.
> Exim log shows: 13:35:34 no host name found for IP address 207.191.2.243
> The best I have managed to do is:-
> ----------------------------------
> warn  message   = ${run{SHELL -c "PHP EXIM_ALERT \
>                   'cA:host' \
>                   'host$sender_host_name' \
>                   'ip$sender_host_address' \
>                   'mx${primary_hostname}' \
>                   'msg[SNA04] (Host name absent) or (No Reverse DNS)' \
>                   'port$sender_host_port'"}}
>       condition = ${if and{{def:sender_host_address} \
>                    {!def:sender_host_name}} {yes}{no}}

>
> deny  message   = [SNA04] Rejected. (Host name absent) or (No Reverse \
>                    DNS) ...........
>       condition = ${if and{{def:sender_host_address} \
>                    {!def:sender_host_name}} {yes}{no}}
> ----------------------------------

>
> The above condition, found on the Internet, can not discriminate between
> the absence of a host name and the absence of a Reverse DNS entry.


I use this to check if a host has rDNS:

condition     = ${lookup dnsdb{defer_never,ptr=$sender_host_address}{yes}}


To negate it, just add the NOT logical operator:

!condition     = ${lookup dnsdb{defer_never,ptr=$sender_host_address}{yes}}


...Todd
--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine