Important Configuration Considerations
We saw at the beginning of this chapter how Postfix requires only minimal configuration changes to work. Depending on how you plan to use your Postfix system, you may want to consider some of the more common options. This section discusses how your system identifies itself, and then covers the very important topic of relay control.
Configuring Your MTA Identity
There are four parameters dealing with your system’s
hostname and domain that you want to consider, no matter
how you use Postfix: myhostname,
mydomain, myorigin, and mydestination.
myhostname and mydomain
We discussed the purpose and importance of the
myhostname parameter earlier in this chapter. If myhostname is not specified, Postfix uses
the function gethostname
to determine what your system’s hostname is. If your
system correctly reports the fully qualified hostname, you can leave myhostname unspecified in the
configuration file. Some systems may not be configured correctly or
may not report the fully qualified version of the hostname. In these
cases, you can set either myhostname to the fully qualified hostname
or mydomain to your system’s domain. If mydomain is explicitly set, Postfix
automatically sets myhostname to
the domain name specified and the local hostname reported by
gethostname to create the fully
qualified hostname.
If you set myhostname to
the system’s fully qualified hostname but omit mydomain, Postfix uses the value of
myhostname, minus the first component of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access