---
title: "Authorizing hostnames to handle e-mail"
date: "2015-03-17"
category: "email"
slug: "authorizing-hostnames-handle-e-mail"
---

## Overview

A hostname (a domain with an optional subdomain) can be configured to receive e-mail by adding it in **Mail** > **Mail Routing**. Any domain listed there causes the server to act as the final mail destination, bypassing MX lookups. This can cause issues if you use [[mail-sent-hosted-domain-not-arrive-third-party-mx-records]] MX records.

## Hostname Examples

The following examples show valid hostnames for a user _myuser_:

| Subdomain | Domain | Hostname | E-mail Address | Notes |
|-----------|--------|----------|---------------|-------|
| | mydomain.com | mydomain.com | myuser@mydomain.com | |
| foo | mydomain.com | foo.mydomain.com | myuser@foo.mydomain.com | |
| foo | "foo" | | **Invalid**: not a [FQDN](http://en.wikipedia.org/wiki/Fully_qualified_domain_name) | |
| | myotherdomain.com | myotherdomain.com | myuser@myotherdomain.com | Delivers to same inbox unless [[separating-mail-user-different-domain]] |

## DNS Configuration

Once a hostname is authorized through Mail Routing, DNS entries are created automatically if you use the provided [[nameserver-settings]].

### Third-Party Nameservers

If you use third-party nameservers (not the [[nameserver-settings]]), add the following DNS records manually after adding a hostname in Mail Routing:

<hostname>      IN MX 10 mail.<hostname>
mail.<hostname> IN A  <IP address>
