Description of problem: All outgoing mail gets stuck with this in maillog: Mar 3 12:37:40 gene sendmail[5314]: j23Cbe8O005312: SYSERR(root): getmxrr: res_search (pobox.surrey.redhat.com) failed with impossible h_errno (0) Mar 3 12:37:40 gene sendmail[5314]: j23Cbe8O005312: to=<laroche>,<notting>,<kreilly>, ctladdr=<twaugh.redhat.com> (2472/2478), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=181707, relay=pobox.surrey.redhat.com, dsn=4.0.0, stat=Operating system error Version-Release number of selected component (if applicable): sendmail-8.13.3-1.1 How reproducible: 100% Steps to Reproduce: 1. See attached /etc/mail/sendmail.cf Additional info: Backing off to sendmail-8.13.3-1 fixes it for me.
Created attachment 111657 [details] sendmail.cf
FWIW, changing 'DSpobox.surrey.redhat.com' to 'DS[pobox.surrey.redhat.com]' in sendmail.cf made this work again, but I couldn't work out why res_search() was returning -1 but leaving h_errno=0.
I think this is a bind problem, not a sendmail problem. The following program prints h_errno=4 correctly when linked against the libresolv that comes with glibc but prints h_errno when linked against the libbind that comes with bind-libs-9.3.1rc1-3. #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> #include <netdb.h> main() { int ret; unsigned char answer[256] = {0}; res_init(); ret = res_search("105-10.202-68.tampabay.res.rr.com.", ns_c_in, ns_t_mx, answer, sizeof answer); printf("ret=%d, h_errno=%d, answer=%s\n", ret, h_errno, answer); }
This problem is now fixed with bind-9.3.1rc1-5 . Incorrect assumptions in the code about pthread availability resulted in the wrong h_errno_location() being used. Note that the res_search function is deprecated, and the proper way to write the above code would be: #include <sys/types.h> #include <unistd.h> #include <string.h> #include <netinet/in.h> #include <bind/arpa/inet.h> #include <bind/arpa/nameser.h> #include <bind/resolv.h> #include <bind/netdb.h> #include <stdio.h> static struct __res_state res; main() { int ret; unsigned char answer[256] = {0}; memset(&res, '\0', sizeof(res)); res_ninit(&res); ret = res_nsearch(&res,"105-10.202-68.tampabay.res.rr.com.", ns_c_in, ns_t_mx, answer, sizeof answer); printf("ret=%d, h_errno=%d\n", ret, h_errno); if ( ret > 0 ) fp_nquery(answer,ret,stdout); }
*** Bug 150703 has been marked as a duplicate of this bug. ***
Looks like fixed. If still exists, please reopen. Regards, Adam
Huh, after investigation about bug #245857 patch for this bug is completely wrong. About comment #3 : libbind uses different resolving mechanisms so if you want use libbind resolver you must bind/* headers instead glibc's headers (as Jason wrote in comment #4). Also I believe when sendmail was linked against libbind it includes wrong headers => NOTABUG Adam
This problem needs more investigation especially with recently upstream changes. Patch's idea is completely unusable 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] 2119. [compat] libbind: allow res_init() to succeed enough to return the default domain even if it was unable to allocate memory. *** This bug has been marked as a duplicate of 254501 ***