[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: getservbyname() and glibc 2.1 (was Re: postfix cannot send mail anymore)

On Wed, Mar 17, 1999 at 03:06:25AM +0200, Edvard Majakari wrote:
> >>>>> "Craig" == Craig Sanders <cas@taz.net.au> writes:
>  Craig> looking at the man page for getservbyname(), it seems that the
>  Craig> source is calling it correctly, but it is returning junk.
> So, seems like getservbyname() (glibc2.1?) is broken? hmm, probably
> few of my perl scripts are broken too then, oh well.. that doesn't
> matter so much.
> What do you think, is it easier to downgrade the system to 2.1 (which
> packages?) or wait for the solution to the problem? I'm afraid I don't have
> skills enough to fix the problem. Then again, I could try sendmail, as
> it's quite easy to setup working and then I just need to create
> symlinks from /var/spool/mail to users' home directories, because I
> use ~/Mailbox for mail delivery.

read on. a temporary partial fix is to disable chroot for the smtp
transport. the real fix will be to find out why the behaviour has
changed when the only thing different on the machine is glibc 2.1 rather
than glibc 2.0

> But hey, you did great work solving source of the problem, and I am greatful
> for your deed.

i've found a partial fix. i posted a question on the postfix-users list
about the problem and got the following reply (in about 10 minutes!
that's one of the things i love about using Free Software...even if
postfix doesn't quite qualify as FS according to the DFSG yet):

--- begin forwarded message
From: scott cotton <scott@chronis.pobox.com>
Date: Wed, 17 Mar 1999 01:24:39 -0500
To: postfix-users@postfix.org
Subject: Re: postfix and glibc 2.1
Message-ID: <19990317012439.A32064@chronis.pobox.com>
References: <19990317171338.J16607@taz.net.au>
In-Reply-To: <19990317171338.J16607@taz.net.au>; from Craig Sanders on Wed, Mar 17, 1999 at 05:13:38PM +1100

your problem isn't glibc, it's chroot.

in master, you probably have smtp listed as one of the
processes that runs chroot()'d, and in your queue directory,
you don't have a copy of /etc/services.

for scripts on how to install a chroot environment for all
the postfix programs on various platforms, see the contrib
distribution or if it's in the distribution you downloaded
<sourcedir>/contrib/chroot-setup or something like that.

in the mean time, you can just turn off chroot in
/etc/postfix/master.cf for the affected processesm, and
it'll run just fine with one less layer of defense.

--- end forwarded message

i edited /etc/postfix/master and changed the "-" in the chroot field for
both smpt lines to "n":

i.e. from this:

smtp      inet  n       -       -       -       -       smtpd
smtp      unix  -       -       -       -       -       smtp

to this:

smtp      inet  n       -       n       -       -       smtpd
smtp      unix  -       -       n       -       -       smtp


craig sanders

Reply to: