View Single Post
Old 29 Oct 2018, 12:00 PM   #10
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
Arrow Details of subdomain delivery

Quote:
Originally Posted by gardenweed View Post
There is an implication in this thread that one needs to create an alias to be able to apply a subdomain for that address. (For domains I own) But I think that might be the case only if you have not created the "*" catchall for that domain. Is this correct?...
There are several issues which affect delivery of messages sent to subdomain addresses. Let's say your domain name is "example.org" (which is the reserved by the internet standards for such hypothetical discussions). I'm referring to how the Fastmail Settings>Domains setup screen shows these settings if your domain DNS records are hosted by Fastmail.
  • Your DNS records must contain records such as these to receive messages sent to your domain (user@example.org). This does not allow any domain except for "@example.org", so does not enable subdomains. In other words, the use of "example.org" as the domain (part after @) is literally exact:
    MX example.org 10 in1-smtp.messagingengine.com (TTL)
    MX example.org 20 in1-smtp.messagingengine.com (TTL)
  • In addition, your DNS records must contain records such as these to receive messages sent to any subdomain of your main domain. Of course, you could only add specific subdomains rather then the wildcard *:
    MX *.example.org 10 in1-smtp.messagingengine.com (TTL)
    MX *.example.org 20 in1-smtp.messagingengine.com (TTL)
  • By default, Fastmail enables an A record for mail.example.org which allows you to use that URL to reach the Fastmail login page. This A record disables the wildcard MX entry for the single mail.example.org subdomain for email. So Fastmail by default adds MX records for mail.example.org so you can receive email at the mail subdomain.
  • All of the above just allows a MTA server to discover the IP required to reach the Fastmail incoming MX mail server. When the MTA contacts the Fastmail MX, it announces the envelope TO address. The Fastmail MX then checks whether that mail account is active and accepts mail for that specific domain or subdomain address as you have configured your account in Settings>Domains and Settings>Aliases.
  • The first setting at the Fastmail account which affects acceptance of an email at a subdomain is in the Mail section near the bottom of the Settings>Domains screen. You can set one of the following:
    • Accept mail to anything@user.example.org and deliver it to user+anything@example.org. This means that you need an alias "user" set up at the Settings>Domains screen and messages will by default be delivered to the "anything" folder due to the plus+addressing. This is the default setting and what people usually mean in EMD when Fastmail subdomain delivery is discussed.
    • Accept mail to user@anything.example.org and deliver it to user@example.org. This means that the subdomain is ignored and the message is delivered to the "user" alias.
    • Reject mail to anything@anything.example.org. This will reject messages sent to any subdomain.
  • Note that the "user" described at the bottom of the Domains setup screen must be enabled in the Aliases setup screen as an active alias.
    • This can be due to a wildcard *@example.org alias.
    • Or this can be due to a specific alias user@example.org.
    • If there is both a wildcard alias and a specific alias, the delivery settings in the specific alias override the wildcard delivery settings.
Quote:
Originally Posted by gardenweed View Post
... For example, say I have domain weeds.com And I have setup the catchall alias *@weeds.com to point to my Fastmail user account. If I create a subdomain address on the fly such as fred@greedybank.weeds.com and give that address to greedybank ... Then emails to fred@greedybank.weeds.com should arrive in my FM account without the requirement to setup an alias of greedybank@weeds.com.I have tested this and it seems to work fine. Any comments on this method?
If you have your DNS MX records at weeds.com set up to accept messages for any subdomain and the default subdomain setting at the bottom of the weeds.com Domains setup page and the *@weeds.com alias enabled in the Aliases setup page, then messages sent to anything@anythingelse@weeds.com will be delivered to the target you set for the wildcard alias. This is assuming that you don't override the wildcard alias delivery setting with a specific alias entry.

If you want to disable that one subdomain (greedybank.weeds.com), add an alias for greedybank@weeds.com and set it to reject all mail. This will disable that alias but allow others to continue working.

Bill
n5bb is offline   Reply With Quote