When configuring a mail server, should it be setup to receive mail at the hostname or just the domain?
For example, if the hostname of the mail server is sub.domain.tld, should mail from anywhere be able to be sent to [email protected] or just to [email protected], with addresses @sub.domain.tld only available for local processes?
Is there an official way it should be configured or is it up to the administrator?
From
postfix
'smain.cf
file:From here, you have to make your own choice on what option satisfies you more.
In the simplest case, the mail server at
mail.example.com
would receive The mail server should accept mail topostmaster
andabuse
for it's domain (or any other), but need not accept any other addresses for that domain. In a simple setup, it is acceptable to receive mail at either domain.It is up to the mail administrator to configure how to handle delivery to the various domains the mail server accepts email for. It is common for an email domain's
MX
belong to an entirely different domain, possibly with a different TLD (top level domain). That server may well accept email for many domains all of which may have different valid user ids. The administrator will need to configure the server accordingly.