From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Ld4jA-0006lK-I5 for garchives@archives.gentoo.org; Fri, 27 Feb 2009 15:34:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9FEE3E0222; Fri, 27 Feb 2009 15:34:15 +0000 (UTC) Received: from mail-gx0-f175.google.com (mail-gx0-f175.google.com [209.85.217.175]) by pigeon.gentoo.org (Postfix) with ESMTP id 7B077E0222 for ; Fri, 27 Feb 2009 15:34:15 +0000 (UTC) Received: by gxk23 with SMTP id 23so2610991gxk.10 for ; Fri, 27 Feb 2009 07:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=aYOn60mWphWhdRxK2d1qBEMwQYy3Dx8COEa6aYY9DYY=; b=nM7+A8hkutceKmOJC5jn4fEys6z6yMhMQ9Zmx/VNt5JxlXja1ss/tmNU+Ftogzru/K NkJ1kYdZQNoorS7g8rH6EBDj+URuNDyhNJWlcj0t2shmyfsVXwjwiYDf4uzlfeX5G6Bc lc0wZMKOTTqjks5rdt+wLZ1W774boqLCuszx4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=mjnFLKqHsOIfv+Cjqt1vmvJum2yHc4HC01df1ySrSvdnXLE/kM7WRI2ycsqLxTHtuo rjRpCfRY7OUwWOs4ap7N3WR/rDZ4fKgsnbrzu6P5jiHIpAqK3VnaqwR8thT0e+LXyo/t dbfo+yFl/2zGPzmwMHMsxa+WyA2v80akoredc= Received: by 10.100.93.19 with SMTP id q19mr2636850anb.156.1235748854592; Fri, 27 Feb 2009 07:34:14 -0800 (PST) Received: from ?10.192.205.124? ([69.60.35.119]) by mx.google.com with ESMTPS id d24sm3983583and.30.2009.02.27.07.34.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 27 Feb 2009 07:34:13 -0800 (PST) Message-ID: <49A807F4.8070104@gmail.com> Date: Fri, 27 Feb 2009 09:34:12 -0600 From: Chris Lieb User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] Re: Logwatch not resolving hostname References: <49A5623B.8090904@gmail.com> In-Reply-To: <49A5623B.8090904@gmail.com> X-Enigmail-Version: 0.95.7 OpenPGP: id=266AC070; url= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 8879972d-4bbb-4a1b-82a8-94bba2c1d7f8 X-Archives-Hash: 60f2ebcc85314fa1d6755e05ceb38793 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris Lieb wrote: > I have recently setup logwatch-7.3.2 on a few of my machines along with > sendmail. For all but one of the machines, I get emails that have the > hostname in the subject line (Logwatch for capitol (Linux)) as well as > on the line that reads 'Logfiles for Host' (Logfiles for Host: capitol). > > However, on one machine, the hostname is not resolved correctly. The > email has the subject line 'Logwatch for 10 (Linux)' and in the body of > the email has 'Logfiles for Host: 10'. The IP address of this machine > is 10.192.202.xxx, and the hostname is high. > > When I do a `hostname -va` on high, I get: > gethostname()=`high' > Resolving `high' ... > Result: h_name=`high.opcdir.intranet' > Result: h_aliases=`high' > Result: h_aliases=`localhost' > Result: h_addr_list=`127.0.0.1' > high localhost > When I run the same command on congress, which has a working logwatch, I > get: > gethostname()=`congress' > Resolving `congress' ... > Result: h_name=`congress.opcdir.intranet' > Result: h_aliases=`congress' > Result: h_aliases=`localhost' > Result: h_addr_list=`127.0.0.1' > congress localhost > This seems to me to eliminate the possibility of a misconfigured > hostname on high. > > Does anyone have an idea as to what is causing logwatch to not resolve > the hostname correctly? > > Thanks, > Chris Lieb I believe I've found the problem! There is a hash called %swordsmen that defines a pair of 'high => 10'. It appears that a function is calling getInt, which uses %wordsToInts to process hostname, turning my hostname of 'high' into '10'. I'm going to play around with it some more to see if this is the case. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEcBAEBAgAGBQJJqAf0AAoJEJWxx7fgsD+C3dcH/2gWwHoDG7tIeBN2NV6Gq8L5 sMOgI/QKqRcOFWEefnc8PQDZ6yj66fAu12MuTEcUi6CLP1XaHcqjjOdeVnu4giDd 3lJl8Bk7LdTjpz+TAF/vlj5D0ERMIVftrF73JoaTBEp5QeNFwcHu9UywVy1I4/KH FkrPuS9lSW6gSdovo7ZN+Q0ok9ooD70grhrzXg6355sNONt1zbbWV/7AkKip357T H6BpNx4xeS0CzyG8hAdkNAbjYd7MAilxX2p8ihLNdjLDmh25WvaBYL3MkRjIMt38 ENuS64vODniIUe2I2FAQ7iyVMoHULXdWfdvqoLLK8CiQ2cEMH2p1n6XvWR54Mg8= =Tco2 -----END PGP SIGNATURE-----