[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: postfix /etc/mailname

Mihalis I. Tsoukalos wrote:
> If I change the /etc/mailname file to something different than
> "localhost", then all the mail for root goes to root@host.name

/etc/mailname is the local host's fully qualified domain name.  It
should match your /etc/hostname file.  Although /etc/hostname may be a
short hostname and is not required to be the fully qualified
hostname.  It is an admin preference.  I prefer it fully qualifed.

> If I have the "localhost" entry, then some mailservers reject my mail as
> my servername is not a valid one.

Correct.  The address for this list <debian-user@lists.debian.org> is
valid.  But <debian-user@localhost> is not.  This is the same thing.
It needs to be a valid hostname that *other* systems know about.

> What can I do to solve it?

  hostname --fqdn > /etc/mailname
  /etc/init.d/postfix restart


/etc/mailname is a Debian specific modification.  I will guess that
the intention is to a) support systems that use the short hostname
instead of the fully qualified domain name, b) to take the hostname
out of random MTA specific files (e.g. /etc/postfix/main.cf for
postfix) and keep them in a generic location.  By doing so then the
MTA config files are allowed to be more generic.  Postfix (and I
assume most mailers) don't need this setting if the hostname is
already fully qualified since it gets the mailname from the hostname.

For me /etc/mailname is an issue since I have a heterogeneous
environment.  Do I support /etc/mailname since it is a Debian thing?
Or do I junk it since since it is a Debian only thing?  I ended up
writing my scripts to be adaptive and use it on Debian but do not use
it on non-Debian.  Remember that the /etc/mailname is a patch to the
Debian sources and not found on other systems.


Attachment: pgpxtbdC8vOTX.pgp
Description: PGP signature

Reply to: