[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mailq on solaris 8



Matti,

I found where the problem is, but I don't quite understand it. Solaris 8 has
getaddrinfo...I did some debugging and found that gettaddrinfo was returning
a 3 (EAI_BADFLAGS).  I then found that mailq.c was including:

#if     defined(HAVE_SOCKET) && (defined(HAVE_RESOLVER) || defined(HAVE_YP))
#include <netdb.h>
#ifndef EAI_AGAIN
# include "netdb6.h"
#endif
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/file.h>
#endif  /* HAVE_SOCKET */

netdb.h defines:

#define AI_CANONNAME    0x0010  /* return canonical version of host */

And then netdb6.h defines:

#ifndef AI_CANONNAME
#define AI_CANONNAME   2       /* Request for canonical name.  */
#endif

I then took the define of AI_CANONNAME from netdb.h and put in in the
mailq.c code right before you initialize the req and ai structures around
line 315, recompiled and:

mail# mailq -sv
0 entries in router queue: idle
0 messages in transport queue: idle
Transport queue is empty -- or scheduler uses -Q -mode


What do you make of this?



On Thu, Feb 01, 2001 at 12:28:25PM +0200, Matti Aarnio wrote:
> On Wed, Jan 31, 2001 at 08:46:27PM -0400, Trent MacDougall wrote:
> > I just built the latest zmailer from CVS on a Solaris 8 box and get the
> > following:
> > 
> > mail$ mailq -sv
> > mailq: cannot find address of localhost
> > mail$ uname -a
> > SunOS mail 5.8 Generic_108528-05 sun4u sparc SUNW,UltraSPARC-IIi-Engine
> > mail$ 
> 
>    Now if you are able to re-run 'make' in the scheduler/ directory
>    so that you at first remove the 'mailq' binary, you should see
>    linkage operation, and its tail has these libraries, possibly
>    in this order:
> 
>      -lresolv -lnsl -lsocket -lxnet
> 
>    Unfortunately I have no clue as to what Sol8 does, 2.5 (I think)
>    did introduce the  -lxnet,  which is nice call interface to the
>    socket syscalls, but usage of  -lresolv  needs also  -lnsl and
>    -lsocket so that it won't barf mysteriously.
> 
>    Hmm...  now  '-lresolv -lxnet' pair works just fine at that machine.
>    Very weird...    Ah, if it tries now do (and finds!) object named
>    in the  /etc/hosts, it gets a SIGSEGV.  Those "-lnsl -lsocket"
>    must be in there for the thing to work reliably at Sol 2.6.
>    (nsswitch.conf says:  "hosts: files dns")
> 
>    The supplied  gethostbyname()  call resolves "localhost" internally.
> 
>    Solaris 8  gethostbyname()  does things differently, no doubt...
> 
> 
>    Oh yes, you *do* have 'localhost' at '/etc/hosts' file ??
> 
> 
> > I have built zmailer with gcc 2.95.2 and the following config:
> > 
> > CPPFLAGS="-I/opt/BerkeleyDB/include -L/opt/BerkeleyDB/lib" CC=gcc
> > ./configure --prefix=/opt/zmailer --with-mailvar=/var/zmailer 
> > --with-postoffice=/var/zmailer/postoffice --with-mailbox=/var/mail
> > --with-logdir=/var/zmailer/log --with-zmailer-conf=/etc/zmailer.conf
> > --mandir=/opt/zmailer/man --libdir=/opt/zmailer/lib
> > --includedir=/opt/zmailer/include --with-bundled-libresolv
> > --with-openssl-prefix=/opt/ssl
> > 
> > Anyone seen this before?
> > -- 
> >                 Trent MacDougall @ InfoInterActive Inc.
> >            Network Administrator @ 902-832-2651
> >                  Trent.MacDougall@InfoInterActive.Com
> 
> -- 
> /Matti Aarnio	<mea@nic.funet.fi>

-- 
                Trent MacDougall @ InfoInterActive Inc.
           Network Administrator @ 902-832-2651
                 Trent.MacDougall@InfoInterActive.Com