Hi, i`m struggling all the time with mail problems. A lot of mail gets delivered to spam by clients and lot of mails are not delivered at all.
I hope someone can help me to set things up correctly.
I have this as setup:
A VPS with the name srv1.myservers.com
myservers.com is registrered and points to its own domain on another server
srv1.myservers.com is an A record to my VPS (resolves correctly)
On the VPS i have added one mainserver: srv1.myservers.com (not used as website really).
I created a subserver for my website: example.com. This website is a subserver for srv1.myservers.com. (I changed the domainname afterwards, so the full domain is example.com, not example.srv1.myservers.com).
In DNS I created these records for domain.com:
mail.domain.com. IN A IP.ADDRESS > IP adress is the IP of domain.com VPS
mail.domain.com. CNAME to mydomain.com
mydomain.com IN TXT “v=spf1 include:srv1.myservers.com ~all”
MX 5 to srv1.myservers.com
In DNS i created these records for srv1.myservers.com:
mail.srv1.myservers.com IN A IP.ADDRESS > IP address of srv1.myservers.com
MX 5 mail.srv1.myservers.com.
srv1.myservers.com. IN TXT "“v=spf1 a mx a:srv1.myservers.com ip4:ipadres ?all”
This setup is working, but like 25% gets not delivered or is marked as spam. Basically the idea of this was to setup multiple domains with all the mailserver via srv1.myservers.com.
So mail.domain.com resolves to mydomain.com, which MX record resolves to srv1.myservers.com. Srv1.myservers MX records resolves to mail.srv1.myservers.com. and this resolves to srv1.myservers.com.
It seems like this could be setup lot easier and much more reliable, but this is completely new for me and I am glad I came this far already.
It would be awesome if someone could share the exact DNS settings for me I would use. (keeping in mind the setup of srv1, srv2, srvX.myservers.com and that my actual website is a subserver in Virtualmin). If it is wrong to be a subserver le me know too, I could just make it a mainserver but thought this was better managable since I would go to /home/user/domains/ and all my websites were there instead of every domain having its own home directory.
Thanks a lot in advance!