Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mailgun sending AND receiving using wildcard subdomains

Tags:

mailgun

I want to be able to send from foo@*.mydomain.com AND receive responses without needing to manually setup MX records for each subdomain I'm interested in (bar.mydomain.com, baz.mydomain.com, etc.mydomain.com , ...)

Mailgun docs show a setting on a domain called wildcard labeled "Mailgun allows you to receive email at multiple subdomains of a single domain without actually adding them. You still need to add the appropriate MX records for your subdomain(s) at your DNS provider" in the web ui.

A comment on this ServerFault answer seems to hint that a new MX record would have to be made for each subdomain. I'd prefer not to have to do that and just keep it dynamic with something like this:

@                IN  MX  10  mxa.mailgun.org.
@                IN  MX  10  mxb.mailgun.org.
*.mydomain.com.  IN  MX  10  mxa.mailgun.org.
*.mydomain.com.  IN  MX  10  mxb.mailgun.org. 

Does Mailgun support sending AND receiving from wildcard subdomains? and if so, what DNS records should be added (MX & SPF/DKIM)?

(This somewhat related question doesn't list out the specifics.)

like image 203
Greg Avatar asked Oct 29 '17 18:10

Greg


People also ask

How do I use wildcard subdomain?

A wildcard DNS record allows you to point all existing and non-existing subdomains to a specific area. For example, www.example.com and test.example.com would both direct to www.example.com when a wildcard subdomain is enabled. If your main domain is example.com, then the wildcard subdomain will be *.

What is wildcard subdomain?

Wildcard subdomain allows you to point all non-existing subdomains to a specific folder in your account. It means that if you enter different subdomains (which are not created in your cPanel) in your browser, they all will show the same content that you uploaded to the folder set for the wildcard subdomain.

Can you send email from a subdomain?

Every email comes from a domain, or web address, shown after the @ symbol in the address. Often, the sending domain will be the same as the company's website. This is the “root” or main domain. An email subdomain delivers email from an address underneath the umbrella of your root domain.

How do I setup a subdomain email?

To setup, simply navigate to Web Host Manager -> Create A New Account. Rather than using a domain, enter the subdomain (i.e. billing.yourdomain.com) and use the password generator to create a strong one. Once added, login to cPanel -> Email Accounts and create the address needed.


1 Answers

Just got a response from MG support

We do not support sending from wildcard domain. We require each domain you wish to send with be added and verified to our system with the explicitly SMTP credentials or API endpoint used for sending.

like image 54
Greg Avatar answered Oct 30 '22 22:10

Greg