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.)
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 *.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With