Date: 12 Jul 2003 15:03:34 -0400 From: Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com> To: dan@slightlystrange.org Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: uname(3) return being truncated Message-ID: <44fzlblg8p.fsf@be-well.ilk.org> In-Reply-To: <20030707111111.GC73629@catflap.home.slightlystrange.org> References: <20030707111111.GC73629@catflap.home.slightlystrange.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Bye <dan@slightlystrange.org> writes: > Morning all, > > I have just come across something that strikes me as a little peculiar. I > don't know if it's a FreeBSD peculiarity, or an Exim oddity. > > My MTA is exim 4.20. I had left the $primary_hostname unset in my config > file, expecting exim to take the return value from uname(3), which is the > stated default action. However, looking through headers of test mails I > sent myself (posts to the list were failing - without bounces...), I found > the hostname was mangled slightly - the last character of the FQDN was > truncated. > > Received: from danielby by catflap.home.slightlystrange.or with local (Exim > ^^^ > > I had a quick look in sys/utsname.h, and lib/libc/gen/uname.c, but don't > know enough C to figure what's going on. Is there a limit on the length of > the nodename that is returned? Or is exim chopping the last character? > > Explicitly setting $primary_hostname in the exim config fixes the problem - > my posts now get through to the list again. > > Just wondered if anyone could shed any light? According to /usr/include/sys/utsname.h, there is a 32-byte limit on the string that holds the hostname. It looks like it could be boosted without much trouble, but *anything* that used the utsname structure would need to be recompiled. And you'd have to migrate the change forward. Doesn't sound worth it to me...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44fzlblg8p.fsf>
