From owner-freebsd-questions@FreeBSD.ORG Sat Jul 12 12:03:38 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67A8C37B401 for ; Sat, 12 Jul 2003 12:03:38 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88B3143FA3 for ; Sat, 12 Jul 2003 12:03:37 -0700 (PDT) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: from be-well.ilk.org (be-well.no-ip.com[66.30.200.37]) by comcast.net (sccrmhc13) with ESMTP id <2003071219033601600kgqfne>; Sat, 12 Jul 2003 19:03:36 +0000 Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [66.30.200.37] (may be forged)) by be-well.ilk.org (8.12.9/8.12.9) with ESMTP id h6CJ3alA070516; Sat, 12 Jul 2003 15:03:36 -0400 (EDT) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: (from lowell@localhost) by be-well.ilk.org (8.12.9/8.12.6/Submit) id h6CJ3Z6W070513; Sat, 12 Jul 2003 15:03:35 -0400 (EDT) X-Authentication-Warning: be-well.ilk.org: lowell set sender to freebsd-questions-local@be-well.ilk.org using -f Sender: lowell@be-well.no-ip.com To: dan@slightlystrange.org References: <20030707111111.GC73629@catflap.home.slightlystrange.org> From: Lowell Gilbert Date: 12 Jul 2003 15:03:34 -0400 In-Reply-To: <20030707111111.GC73629@catflap.home.slightlystrange.org> Message-ID: <44fzlblg8p.fsf@be-well.ilk.org> Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: FreeBSD Questions Subject: Re: uname(3) return being truncated X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2003 19:03:38 -0000 Daniel Bye 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...