1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Chris Lieb wrote: |
5 |
> I have recently setup logwatch-7.3.2 on a few of my machines along with |
6 |
> sendmail. For all but one of the machines, I get emails that have the |
7 |
> hostname in the subject line (Logwatch for capitol (Linux)) as well as |
8 |
> on the line that reads 'Logfiles for Host' (Logfiles for Host: capitol). |
9 |
> |
10 |
> However, on one machine, the hostname is not resolved correctly. The |
11 |
> email has the subject line 'Logwatch for 10 (Linux)' and in the body of |
12 |
> the email has 'Logfiles for Host: 10'. The IP address of this machine |
13 |
> is 10.192.202.xxx, and the hostname is high. |
14 |
> |
15 |
> When I do a `hostname -va` on high, I get: |
16 |
> gethostname()=`high' |
17 |
> Resolving `high' ... |
18 |
> Result: h_name=`high.opcdir.intranet' |
19 |
> Result: h_aliases=`high' |
20 |
> Result: h_aliases=`localhost' |
21 |
> Result: h_addr_list=`127.0.0.1' |
22 |
> high localhost |
23 |
> When I run the same command on congress, which has a working logwatch, I |
24 |
> get: |
25 |
> gethostname()=`congress' |
26 |
> Resolving `congress' ... |
27 |
> Result: h_name=`congress.opcdir.intranet' |
28 |
> Result: h_aliases=`congress' |
29 |
> Result: h_aliases=`localhost' |
30 |
> Result: h_addr_list=`127.0.0.1' |
31 |
> congress localhost |
32 |
> This seems to me to eliminate the possibility of a misconfigured |
33 |
> hostname on high. |
34 |
> |
35 |
> Does anyone have an idea as to what is causing logwatch to not resolve |
36 |
> the hostname correctly? |
37 |
> |
38 |
> Thanks, |
39 |
> Chris Lieb |
40 |
|
41 |
I believe I've found the problem! There is a hash called %swordsmen |
42 |
that defines a pair of 'high => 10'. It appears that a function is |
43 |
calling getInt, which uses %wordsToInts to process hostname, turning my |
44 |
hostname of 'high' into '10'. |
45 |
|
46 |
I'm going to play around with it some more to see if this is the case. |
47 |
-----BEGIN PGP SIGNATURE----- |
48 |
Version: GnuPG v1.4.9 (MingW32) |
49 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org |
50 |
|
51 |
iQEcBAEBAgAGBQJJqAf0AAoJEJWxx7fgsD+C3dcH/2gWwHoDG7tIeBN2NV6Gq8L5 |
52 |
sMOgI/QKqRcOFWEefnc8PQDZ6yj66fAu12MuTEcUi6CLP1XaHcqjjOdeVnu4giDd |
53 |
3lJl8Bk7LdTjpz+TAF/vlj5D0ERMIVftrF73JoaTBEp5QeNFwcHu9UywVy1I4/KH |
54 |
FkrPuS9lSW6gSdovo7ZN+Q0ok9ooD70grhrzXg6355sNONt1zbbWV/7AkKip357T |
55 |
H6BpNx4xeS0CzyG8hAdkNAbjYd7MAilxX2p8ihLNdjLDmh25WvaBYL3MkRjIMt38 |
56 |
ENuS64vODniIUe2I2FAQ7iyVMoHULXdWfdvqoLLK8CiQ2cEMH2p1n6XvWR54Mg8= |
57 |
=Tco2 |
58 |
-----END PGP SIGNATURE----- |