Re: [Exim] [sleclerc@actionweb.fr: Bug#119747: Problem with …

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: Stephane Leclerc
Kopio: exim-users
Aihe: Re: [Exim] [sleclerc@actionweb.fr: Bug#119747: Problem with host_reject_recipients and mysql]
On Sun, 18 Nov 2001, Stephane Leclerc wrote:

> Realy sorry but I still do not understand.


No problem. Half the time I don't either. :-)

> Without +allow_host:
> 1.2.3.4 is in the host_reject_recipients and lookup_host is unset.
>
> >>> looking up host name for 1.2.3.4
> >>> IP address lookup failed
> >>> host in host_reject_recipients? yes (failed to find host name or lookup
> deferred)
> LOG: recipients from [1.2.3.4] refused (failed to find host name from IP
> address)


That's correct. If Exim requires a host name (because of a wild card or
a lookup in host_reject_recipients), but it cannot find a host name, it
denies access. In the case of host_reject_recipients, denying access
means refusing all the recipients.

> Without +allow_host:
> 1.2.3.5 is not in the host_reject_recipients and lookup_host is unset.
>
> >>> looking up host name for 1.2.3.5
> >>> IP address lookup failed
> >>> host in host_reject_recipients? yes (failed to find host name or lookup
> deferred)
> LOG: recipients from [1.2.3.5] refused (failed to find host name from IP
> address)


Same.

Unless you have changed things, you said your setting was

host_reject_recipients = mysql;MYSQL_REJECT_HOSTS

With a setting like that, Exim is *always* going to try to look up the
host name because it thinks it is going to have to do a lookup that
needs the host name. What have you actually set for MYSQL_REJECT_HOSTS?


> With +allow_host:
> 1.2.3.4 is in the host_reject_recipients and lookup_host is unset.
>
> >>> looking up host name for 1.2.3.4
> >>> IP address lookup failed
> >>> host in host_reject_recipients? no (failed to find host name or lookup
> deferred)


Again, it fails to find the host. But this time you have said "allow
access if you can't find a host name". So it does.

> I don't want host_lookup and I want to refuse hosts in the list.


But you need to have the host name if you want to compare it to a list.
How can the name be tested if Exim doesn't know it.

Aha! I think I see the problem.

What is your setting of MYSQL_REJECT_HOSTS? Are you trying to look up
*IP addresses* rather than *host names*? If you are looking up IP
addresses, you must then use net-mysql instead of just mysql, so that
Exim doesn't think it needs the host name.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.