[Pkg-exim4-users] Reverse DNS lookups

Andreas Metzler ametzler at downhill.at.eu.org
Mon May 29 17:38:00 UTC 2006


On 2006-05-29 Bill Horne <bill at horne.net> wrote:
> Andreas Metzler wrote:
> >On 2006-05-27 Bill Horne <bill at horne.net> wrote:
[...]
>> To make sure I understand you corectly: Given a IP-address you need to
>> check whether a A record for this IP exists?
>> 
>> Afaik that is impossible without reverse DNS, because this is exactly
>> the service reverse DNS provides.
[...]
> Given a domain name (received from a HELO)

The part about comparing HELO/EHLO and IP-address was missing

> and an IP address, I need to 
> know if Exim4 can do a *FORWARD* lookup and compare the IP address (if 
> any) shown for the domain name against the actual IP address the email 
> is being sent from.
[...]

You could use a dnsdb-lookup to get the A records for $sender_helo_name
and compare whether $sender_host_address matches any of these.

/usr/sbin/exim4 -be '${if match_ip{131.130.1.35}{${lookup dnsdb{>:a=mx.univie.ac.at}{$value}fail}}{yes}fail}'

(If the mail server is IPv6 connected this would get more complicated.)

Just an idea, hth, cu andreas
-- 
The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken.                                (c) Jasper Ffforde



More information about the Pkg-exim4-users mailing list