Subject: Re: sendmail and new ip
To: None <netbsd-help@netbsd.org>
From: Jan Danielsson <jan.danielsson@gmail.com>
List: netbsd-help
Date: 01/12/2006 21:04:33
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig073F880BD8241CCF5597450D
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Matthias Scheler wrote:
>>   I assumed that this wouldn't mean anything other than that I would
>>get a new IP, but I was (unpleasanly) surprised to notice that sendmail
>>said something along the line of "unable to qualify my own domain name"
>>when I restarted the system. Same messages poped up on the first console
>>when my daily cron jobs started. After searching the net for suggestions
>>I tried changing a line in /etc/hosts from:
>>
>>   a.b.c.d            myhost
>>
>>to
>>
>>   a.b.c.d            myhost myhost.
> 
> Why do you need an entry in "/etc/hosts"? Their should be DNS entries
> for your public IP address (or you will run into problems anyway).

Hmm.. Let's see if I get it all right here..

   In order to be able to access the 'net, we need to log on to some
system. I automated that process by writing a login script in python.
The login page contains the IP address I have been given by the DHCP. In
the script I perform a few sanity checks. Among them I check if the IP
on the page is equal to the "myhost" IP. The "myhost" IP (in /etc/hosts)
is updated automatically by a sed hack in /etc/dhclient-enter-hooks.

   When I run "ifconfig -a", and then run "nslookup <retrieved ip>" I
get a funny-looking name. In it seems to be a hostname. So I know that I
have been assigned a unique name "out there". However, if I remove my
hard-coded "hostname=..." from rc.conf, my funny-looking hostname is not
set automatically.

   Though being assigned a dynamic name is not what I want. A friend of
mine used to have a dynamic assigned hostname, and when that name
changed one day, our Perforce-server refused to allow him access because
of a hostname mismatch.

   Is it possible to (successfully) have a hardcoded host name, and
still use a dhcp? (Note: I know _very_ little about networking).

>>But I still only get the error message.
> 
> What does "/var/log/maillog" say?

# tail /var/log/maillog
Jan 12 19:35:02 anca sendmail[3657]: k0CIZ0CT003657: to=root,
ctladdr=root (0/0), delay=00:00:02, xdelay=00:00:01, mailer=relay,
pri=30294, relay=[localhost.] [127.0.0.1], dsn=4.0.0, stat=Deferred:
Connection refused by [localhost.]
Jan 12 19:39:45 anca sm-mta[4839]: starting daemon (8.13.3):
SMTP+queueing@00:30:00
Jan 12 19:40:01 anca sendmail[4286]: k0CIe0NG004286: from=root,
size=294, class=0, nrcpts=1, msgid=<200601121840.k0CIe0NG004286@anca.>,
relay=root@localhost
Jan 12 19:40:06 anca sm-mta[4119]: k0CIe6e3004119: ruleset=check_mail,
arg1=<root@anca>, relay=localhost [IPv6:::1], reject=553 5.1.8
<root@anca>... Domain of sender address root@anca does not exist
Jan 12 19:40:06 anca sendmail[4286]: k0CIe0NG004286: to=root,
ctladdr=root (0/0), delay=00:00:06, xdelay=00:00:05, mailer=relay,
pri=30294, relay=[localhost.] [IPv6:::1], dsn=5.6.0, stat=Data format error
Jan 12 19:40:06 anca sendmail[4286]: k0CIe0NG004286: k0CIe0NH004286:
DSN: Data format error
Jan 12 19:40:06 anca sm-mta[4119]: k0CIe6e3004119: from=<root@anca>,
size=294, class=0, nrcpts=0, proto=ESMTP, daemon=MTA6, relay=localhost
[IPv6:::1]
Jan 12 19:40:07 anca sm-mta[4119]: k0CIe6e4004119: from=<>, size=2108,
class=0, nrcpts=1, msgid=<200601121840.k0CIe0NH004286@anca.>,
proto=ESMTP, daemon=MTA6, relay=localhost [IPv6:::1]
Jan 12 19:40:07 anca sendmail[4286]: k0CIe0NH004286: to=root,
delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=31318,
relay=[localhost.], dsn=2.0.0, stat=Sent (k0CIe6e4004119 Message
accepted for delivery)
Jan 12 19:40:07 anca sm-mta[5465]: k0CIe6e4004119: to=<root@anca>,
delay=00:00:01, xdelay=00:00:00, mailer=local, pri=32270, dsn=2.0.0,
stat=Sent


   I got a reply via private email which states that I need a "proper
fully qualified domain name". But what does that mean? My university
network has the domain "student.uu.se" (which I can also see in
resolve.conf, which is updated when dhclient is run).

-- 
Kind Regards,
Jan Danielsson
Te audire non possum. Musa sapientum fixa est in aure.

--------------enig073F880BD8241CCF5597450D
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iD8DBQFDxrZX8wBCTJQ8HEIRAqfDAJ9v+L/ZhWxkWf5cm2lx4p6jFoz6egCdFVlS
d/ba/1VGXJTeEYpHdHh093E=
=0ZUY
-----END PGP SIGNATURE-----

--------------enig073F880BD8241CCF5597450D--