Thanks for the "qmail-remote outgoingip patch", I was able to
successfully apply it (by hand) to qmail 1.03.  Unfortunatly, it
didn't fix the problem I was having, which was that qmail was
connecting to itself (it was the backup MX for a down system) because the
MX record was bound to a secondary IP address, thus looping mail.  The
reason is because ipme still just looks at the primary interface and
qmail-remote uses that to compare against the MX record instead of the
bound address.

Here is a very lightly (oh, about 5 minutes) tested patch.  I was kinda in
a hurry and am not quite sure if [0] of a ip_address is the most or least
significant octet, I was betting on it being the most but this should
still work even if it's the least, as I don't think zero is legal for
either.  

*** ../qmail-ldap/qmail-remote.c        Tue Jan 11 01:43:02 2000
--- qmail-remote.c      Sat Feb 12 01:47:31 2000
***************
*** 29,34 ****
--- 29,35 ----
  #include "timeoutconn.h"
  #include "timeoutread.h"
  #include "timeoutwrite.h"
+ #include "byte.h"
  
  #define HUGESMTPTEXT 5000
  
***************
*** 396,402 ****
   
    prefme = 100000;
    for (i = 0;i < ip.len;++i)
!     if (ipme_is(&ip.ix[i].ip))
        if (ip.ix[i].pref < prefme)
          prefme = ip.ix[i].pref;
   
--- 407,413 ----
   
    prefme = 100000;
    for (i = 0;i < ip.len;++i)
!     if (outip.d[0] ? byte_equal(&ip.ix[i].ip,4,&outip.d[0]) : ipme_is(&ip.ix[i].ip))
        if (ip.ix[i].pref < prefme)
          prefme = ip.ix[i].pref;
   
--
Aaron Nabil

Reply via email to