uname(3) return being truncated

Daniel Bye dan at slightlystrange.org
Mon Jul 7 04:11:13 PDT 2003


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?

Cheers,

Dan

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3B9D 8BBB EB03 BA83 5DB4 3B88 86FC F03A 90A1 BE8F
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030707/8d0c9197/attachment.bin


More information about the freebsd-questions mailing list