single MX record for all subdomains (gsuite) - dns

I would like to route all my inbound mails for subdomains to sendgrid mail service.
I have added an MX record entry using wildcard (*)
When I try to send a mail to one of my subdomain ex:-(user#subdomain.mydomain.com) gmail was showing me an error the domain could not be found
Any help would be thankful

MX records to not have Wildcards, A records do... MX records have Priority and are for the Domain you set. To service Subdomain emails (which is odd), you would need to configure that outside of DNS and within the app that expects the emails to come-in (Sendgrid)
You should setup specific MX record for each subdomain, not use wildcard
Once you have a valid email, that your MX server is able to recognize a a valid mailbox, then you will be able to send to that email.

Related

Use 2 different server for send and receive email

I have a classified website in a VPS. VPS are configured only like Web & MySQL server. I actually use an external mail provider for send mail from cms used in website to users. I have configured DNS on Cloudflare like follow:
domain-name.xxx in A [WEB SERVER IP]
ftp in CNAME domain-name.com
www in CNAME domain-name.com
domain-name.xxx in MX mail.provider.host priority 10
domain-name.xxx in MX mail2.provider.host priority 20
domain-name.xxx in TXT "v=spf1 include:spf-c.mail.provider.host mx a ~all"
Now i want use only noreply#domain-name.xxx (large number of emails are sent from this email address) with Dedicated mail hosting provider (it's not cheap but is affordable) and I want to use info#domain-name.xxx, or personal email accounts like name.surname#domain-name.xxx on another hosting provider ( cheap :-) ).
I'd like know if is correct adding follow DNS rules for use a second server (for info# etc):
domain-name.xxx in MX new.mail.host priority 10
I don't know if i must add any other rule.
If the mail you are sending from your server is no-reply then you could:
use a service like Mailgun . It's ideal for transactional email, and very affordable. Since the website email is outgoing only, the only DNS entries you'll need are 2 SPF & DKIM records, no MX required
then in CloudFlare add just the MX for your info# and personal mail server
and finally configure your email to bounce anything to noreply#
If this would fit your business setup then it's easy and may well cost less than using a dedicated server for sending outgoing website email.
If you needed more options for the outgoing website email, Mailgun also let's you setup a subdomain like “mg.mydomain.com”. Using a subdomain you will still be able to send emails from your root domain e.g. “noreply#mydomain.com” and it will play well with your personal email.
Good luck!

DKIM DNS entries for multiple subdomains in mailgun

I use Mailgun for sending mails in my multi-tenant application. Each tenant is using different (sub)domain in mailgun to send mails around. For example:
Tenant 1 - tenant1.example.com
Tenant 2 - tenant2.example.com
...
I would like to be able to create tenants automatically (without my involvement). Mailgun provides API for creating domains programatically. The problem is that some DNS entries need to be added to make full use of Mailgun features. My current DNS provider does not provide API for automatically adding those entries.
I noticed, that if I add single SPF record with name *.example.com then mailgun is fine with this and does not ask me to add SPF record separately for each subdomain.
Is it possible to do the same with DKIM? If not, what are the alternatives?

how to forward email using MX record in DNS

I have domain name(exmple.com) and DNS. I want email at admin#exmple.com is forwarded to mymail#gmail.com. there is any way to forwarding using MX recoder in DNS. If it is possible tell me how to update MX record ?
Thanks
It is not possible. The MX record answers the question "To send an email to a given domain name, which host should I contact?". Since what you want to do involves the local parts of email addresses, it falls outside of the realm of DNS.

SPF and DNS records host domain server

I am setting up a server to host some websites.
FQDN server = svr01.server.net (fictional domain name)
IP: 150.150.150.xx
DNS settings server.net domain:
A svr01.server.net 150.150.150.xx
A svr02.server.net 150.150.151.xx
MX-10 server.net [ip provider]
MX-20 server.net [ip provider]
website domains: domain-a.com, domain-b.com, domain-c.com
I have a second server on the server.net domain: svr02.server.net. On that server I will also host domains. This server has another IP: 150.150.151.xx and a FQDN svr02.server.net
I did some test with mxtoolbox for svr01.server.net and svr02.server.net and there it gives a warning that there is no spf record.
When I check a working Strato VPS server hxxxx.stratoserver.net it gives this TXT record:
v=spf1 ip4:81.169.xxx.0/24 ip4:81.169.xxx.0/24 ~all
When I make a virtual server for domain-a.com and check the neccessary dns settings they look like this:
domain-a.com. A 150.150.150.xx
mail.domain-a.com. A 150.150.150.xx
domain-a.com. MX 5 mail.domain-a.com.
domain-a.com. SPF v=spf1 a mx a:domain-a.com ip:150.150.150.xx ?all
So actually this last SPF record say that all mail send from 150.150.150.xx is valid for the domain domain-a.com.
These are my questinons:
Do I need to set a spf record for server.net?
If the answer is yes, how does this spf record look? Something like this maybe:
server.net. IN TXT "v=spf1 ip4:150.150.150.xx ip4:150.150.151.xx ~all". Maybe in the future one or some of these domains can get a different IP for SSL. So then I have to add more ip's. How can I avoid that the list will be to long?
I didn't set an A-record for server.net. Is this correct? When I check this Strato server (hxxxx.stratoserver.net) the domain stratoserver.net also doesn't have an A-record. Only the subdomains hxxxx.stratoserver.net.
I don't want to send mail from server.net, only from the domains on that server. So thats why I keep the MX-records default, so pointing to my domain hosting company. Is this correct?
You don't need an SPF record. The same way you don't need DKIM. But it's recommended, it's a way of proving your mail isn't fake and stopping others from using your domain name to send spam (spoofing).
"Spoofers can commit mail fraud by sending mail from what appear to be trusted addresses in order to gain sensitive information."
This also reduced the likelihood your emails are flagged as spam on some systems where this reduces your spam rating slightly.
The spf record is basically a list of where the mail should come from.
If you get more IPs that you send mail from then yes, you should add them, I've seen some very long SPF records. This is the SPF for one of out domains set up by our mail provider:
v=spf1 a mx ptr ptr:46.242.123.222 ptr:146.222.202.226 mx:domain.co.uk.inbound10.emea.mxlogic.net mx:domain.co.uk.inbound10.emea.mxlogicmx.net ip4:84.2.91.221 ip4:181.118.168.198 ip4:81.178.68.129 include:domain.co.uk include:mxlogic.net mx:mail.domain.co.uk ~all
You should make sure your hosting providers PTR for your IPs is set to the host names of your servers and then add the hostname of the servers to the SPF.
http://en.wikipedia.org/wiki/Sender_Policy_Framework
http://help.mandrill.com/entries/21751322-What-are-SPF-and-DKIM-and-do-I-need-to-set-them-up-
One of the better SPF generators (not just for MS Exchange servers): https://www.unlocktheinbox.com/senderid-wizard/

Is it possible to get email on my shared hosting domain (Verio) which were sent to a different (unhosted) domain name?

I have a website "example.com" with email user "anyname". I also have a domain name "other.com" with zone records pointing to "example.com". if I email "anyname#other.com" I get either a user not found or a relay not allowed message.
I have found no way to modify "other.com"s MX records to allow this.
I have also played with mod rewrite to no good effect.

Resources