Re: [exim] sender_host_name contains invalid host nameswhen …

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Ted Cooper
Data:  
Para: exim-users
Asunto: Re: [exim] sender_host_name contains invalid host nameswhen forward-reverse-IP lookups fail
Colin Keith wrote:
> Thanks for looking and let me clarify that it is rare but it has happened
> several times in the past and again just recently. I've never been able to
> reproduce it either. This is an older box running Fedora Core 4
> (2.6.15-1.1833_FC4) and bind 9.3.1-14_FC4, so its entirely possible that
> there's an issue there. (It just happens to be a box with a 950 day up
> time which is ridiculously long compared to any other linux boxes I have)


I've just realised that this is almost identical to a bug on *BSD where
the IP address of a previous connection would end up as the IP address
for any subsequent connections until the daemon was restarted. They
weren't using the host name for anything if they did I'm sure it would
be looking up the wrong address. It ended up being a relatively easy fix
(2 lines). This has been committed to the source for release in 4.70 but
you can patch 4.69 with it now.

(If the the patch gets stripped from the mailing list, you can get it
from here: http://bugs.exim.org/attachment.cgi?id=279 )

I haven't actually tried to replicate your bug with all the info you
sent me yet .. I'm hoping this might be the same issue. Let me know if
it doesn't and I'll look further.


--
The Exim Manual
http://www.exim.org/docs.html
http://docs.exim.org/current/
--- src/daemon.c.orig Sat Aug 30 03:49:46 2008
+++ src/daemon.c        Mon Sep  1 00:46:09 2008
@@ -1613,7 +1613,7 @@
   struct sockaddr_in accepted;
   #endif


- EXIM_SOCKLEN_T len = sizeof(accepted);
+ EXIM_SOCKLEN_T len;
pid_t pid;

   /* This code is placed first in the loop, so that it gets obeyed at the
@@ -1808,6 +1808,7 @@
           {
           if (FD_ISSET(listen_sockets[sk], &select_listen))
             {
+            len = sizeof(accepted);
             accept_socket = accept(listen_sockets[sk],
               (struct sockaddr *)&accepted, &len);
             FD_CLR(listen_sockets[sk], &select_listen);