0

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 user@sub.domain.tld or just to user@domain.tld, 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?

1

From postfix's main.cf file:

The myorigin parameter specifies the domain that locally-posted mail appears to come from. The default is to append $myhostname, which is fine for small sites. If you run a domain with multiple machines, you should (1) change this to $mydomain and (2) set up a domain-wide alias database that aliases each user to user@that.users.mailhost.

For the sake of consistency between sender and recipient addresses, myorigin also specifies the default domain name that is appended to recipient addresses that have no @domain part.

From here, you have to make your own choice on what option satisfies you more.

0

In the simplest case, the mail server at mail.example.com would receive The mail server should accept mail to postmaster and abuse 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.

  • I'm not completely clear on what you are saying in the first paragraph. Is there a general recommendation or requirement for the mail server to receive mail at its full hostname (mail.example.com) or is it okay to deny outside emails to the hostname and only accept emails to the domain (example.com)? I understand what you are saying about particular local part addresses that should be received, but I am concerned here mainly with hostname versus domain. – user981178 Apr 30 '16 at 18:20
  • @user981178 With the exception of postmaster it is OK to refuse mail to the that domain. Many domains don't configure postmaster which makes it difficult for other administrators to inform them of issues. If you don't support postmaster you can get away with not accepting mail to its full domain name. It is usual for the mail server's host name to be different than the fully qualified domain name the the mail server uses. – BillThor May 2 '16 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.