[PLUG] qmail hostname and domain confusion

Brian & Lori Nordlund ble.nordlund at verizon.net
Sun Nov 13 21:04:08 UTC 2005


All-
I was hoping someone could provide a brief bonehead-level  primer on setting
up qmail, or see something wrong in what I have tried to do.  I am trying to
set up qmail, vpopmail, and courier POP/IMAP.  Although I am doing this in
gentoo, I am pretty sure my confusion transcends distro-specific issues, so
any input would be appreciated.

I have followed the gentoo qmail-howto at
http://www.gentoo.org/doc/en/qmail-howto.xml .  However, the way I read it
there seems to be some blur between the hostname of the server and the
domain being served.  To start, there is a section explaining that if
# hostname --fqdn
returns "localhost" that I should check /etc/hostname or /etc/hosts and my
DNS to make sure "everything is correct".  Then once I have "checked" then
edit the config files in /var/qmail/control.  There is also a reference that
the file /var/qmail/control/me should contain the hostname.  Now for the
confusion:

There are samples of what the /var/qmail/control files should contain, which
is where I get confused.  There are examples to be used if you are doing a
"2nd level domain" followed by examples for doing a third level domain:

2nd level domain examples:
# hostname --fqdn
should return "wh0rd.org"
# cat me
should contain "wh0rd.org"
# cat defaultdomain
should contain "wh0rd.org"
# cat plusdomain
should contain "wh0rd.org"
# cat locals
should contain "wh0rd.org"
# cat rcpthosts
should contain "wh0rd.org"

Now tell me if I'm a complete loon, but it looks to me like we are mixing
the definition of host and domain.  In order to force # hostname --fqdn to
return "wh0rd.org" wouldn't I be using a domain name for my server?  Maybe
the example for 3rd level domains is a little less confusing:

3rd level domain examples:
# hostname --fqdn
should return "mail.wh0rd.org"
# cat me
should contain "mail.wh0rd.org"
# cat defaultdomain
should contain "wh0rd.org"
# cat plusdomain
should contain "wh0rd.org"
# cat locals
should contain "mail.wh0rd.org"
# cat rcpthosts
should contain "mail.wh0rd.org"


.....Starting here, I will be referring to my real domain name
("towermonky.com") rather than the "wh0rd.org"  from the howto.......

I guess the 3rd level domain examples makes a little more sense to me in
that it looks like where we are concerned with host names, we are actually
using a full hostname and where we are talking about domain names, we use
what looks like a domain name.  However, according to the help above, I have
fixed these files, but "# hostname --fqdn" continues to return "localhost".
Apparently the recommendation to "fix" /etc/hostname and /etc/hosts means to
go in and edit them.  However, I wouldn't be crazy enough to think I need to
edit them so that the only hostname for the server would be
"mail.towermonkey.com".  I can't imagine how many things I would break by
doing that!  Anyway, my /etc/hostname file includes a single line
"hrimgerth", which is the hostname my machine has had forever.  I don't know
if I should be including both "hrimgerth" and "mail" or if that would be a
mistake.  Part of my confusion is that it doesn't make any sense to me for
my multi-purpose machine (smb file server,  printer server, etc) to now have
to only have a single hostname of "mail.towermonkey.com" for all these other
services.  I thought a machine could have several aliases, including
localhost, mail, hrimgerth, etc, etc.  Now for my /etc/hosts:

127.0.0.1 localhost hrimgerth localhost.localdomain
192.168.30.2 nisse
.... (other hosts skipped).....
192.168.30.5 hrimgerth mail mail.towermonkey.com
////(IPV^ section skipped)....

I hope at this point someone has seen something that is obviously out of
line and can steer me in the right direction.  The operational issue I have
is that no mail clients can log in using POP or IMAP or SMTP, so based on
some of the howtos and help files I have read I think they are being refused
because they are not seen as being from the right domain.

Thanks for enduring such a long posting.  Any pointers?

Thanks,
Brian.





More information about the PLUG mailing list