How to connect my Mac Mail to my domain which his DNS are handled through DigitalOcean? - email

I bought a domain.
I pointed his name servers to:
ns1.digitalocean.com
ns2.digitalocean.com
I have added a CNAME record point to #
I want to send and receive emails using my Mac mail program.
I know that I should probably build a full mail server which is an awful thing to do.
Therefore, I have another server (not digitalocean) running on cPanel. In this cPanel I have a very powerful cPanel's mail server.
How can I point my digitalocean CNAME to the remote server where the cPanel is?
I hope it's clear enough.

In order to make your domain points to the digital ocean server, you will have to create A record that points to the IP of that server, same goes to any subdomain.
Regarding your mail server, you need to make mail.mydomain.com points to the IP of your cPanel server using A record not CName and also modifying other records like SPF/DKIM records.
For your local mail client you can get the configuration by logging into the cPanel user account and view the mail settings

Related

The IP you're using to send mail is not authorized 550-5.7.1 to send email directly to our servers

I am new to DO and I have tried to look for solution online but I didn't find any answer. I am using Ubuntu OS 20.04(LTS)X64 version.
My question is that I have 2 droplets, MailServer droplet where I have installed docker composer and mailcow to run mail mails, and another droplet named WebServer hosting my domains. I have also set up all required DS records under my domain added on WebServer droplet and pointed A record mail.mydomail.com to the IP of mail server droplet. However, whenever I try sending emails they all bounce back unless the ones sending between mydomain users(user1#mydomain.com & user2#mydomain.com). It just says that "The IP you're using to send mail is not authorized.....".
Any support to help me solve this issue will be highly appreciated. An I am wondering if that approach is possible or if there is any documentation on how someone can set up dns records on one server and configure mailserver on another server using digitalocean.
Here is how I set my DNS on mydomain.com to point to MailServer IP

Can I run an email Server with a fixed IP only?

I created a web app to do some basic content management for just myself. I want to mail some docs to the server instead of downloading then uploading them. Ive been looking at postfix but everything assumes you have a domain. Is it possible to receive email at a server with a fixed ip and no domain?
if you want anybody and any app to be able to send mail you need MX records in DNS. And MX records point at dns server names, not IP addresses.
https://serverfault.com/questions/663112/why-cant-mx-records-point-to-an-ip-address
If its just you then you can telnet to the SMTP port to send mail

cPanel email routing... if not found locally try remote

I've got a weird setup with my emails that I need someones brain to look at. I've got it setup like this so that most of my emails are on one server (server1) and then 1 single account is setup on a second server hidden from the rest (server2)
Email Sent to user1#domain.me
MX record for domain.me = mail.domain.me
A record for mail.domain.me = server1 (11.11.11.11)
Email forwarding rule forwards all email sent to user1#domain.me to user#2.domain.me
MX record for 2.domain.me = mail2.domain.me
A record for mail2.domain.me = server2 (22.22.22.22) a cpanel server
Email hits my server now addressed to user1#2.domain.me
Domain forwarding rule forwards all email sent to #2.domain.me to #domain.me
This works great however my mail routing in cpanel is set to local, and therefore when sending emails out on server2 (22.22.22.22) to users#domain.me they're always delivered locally first and foremost
Is there any way around this? so that outgoing mail on this domain obey's DNS records (the mx records) and delivers it firstly to server1 (11.11.11.11) as if it was being sent from any other domain, gmail etc. Perhaps if the account isn't found locally then send on out to the web? Or perhaps there is a way to setup an alias somehow to let the local account receive mail for user1#2.domain.me
Thanks for your time & efforts looking into this
Henry
Check if your remote domains are listed in /etc/remotedomains and /etc/secondarymx. Note that if your second server has a dns server, it will try fetch the dns data locally first.
I have 2 servers using cpanel where each server acts as the other's backup and I don't have the issue you described.

No Such User Here VPN/WHM with Mail Routed through Separate Server

Ok, I am using a VPN on GoDaddy for webhosting. But on one of the websites that I am hosting, the email is handled on a separate VPN.
So I have an A record for domain.com set to the GoDaddy VPN and an A record for mail.domain.com set to the IP of the other domain and several CNAMES pointed to that A record. It's all working beautifully except for one thing....
Email from other domains on the GoDaddy VPN cannot send to this domain. So myemail#mydomain.com cannot send to email#separateemailvpn.com
I get error "No Such User Here" from my server.
I understand that the GoDaddy VPN is checking for that user locally and not finding it, but I don't know how to make it NOT check for this domain.
I am using WHM/cPanel with Exim and SpamAsassin. Thanks!
Not sure what the deal is with the downvotes, but here was my solution (probably obvious).
From Linux Terminal:
sudo su (for admin rights)
nano /etc/localdomains (erase domain from local domains)
nano /etc/remotedomains (add domain to remote domains)
Now it doesn't check that domain for users locally before it sends it out to the remote server.
Changing the mail exchanger on the server is relatively easy from WHM too. In WHM left menu, navigate to "DNS Functions >> Edit MX Entry". From there, simply select the domain name you wish to edit, and then select the desired mail exchanger to change the mail routing settings for the domain.
The options are Auto, Local Mail Exchanger, Backup Mail Exchanger, or Remote Mail Exchanger. Set to "Remote Mail Exchanger" and click Save to have WHM update the /etc/localdomains and /etc/remotedomains for you.

Set up mail.mydomain.com to point to dedicated server

I currently have a domain name which is set to point to Amazon Cloudfront's nameservers. I also have a dedicated server which uses WHM/cPanel that I want to use for all mail.
On Amazon:
The A record for the domain is set to point to the server IP
The MX record is set up as well
On Server:
I have an A record for "mail" that points to the server IP
However, when I log into cPanel webmail, I can send mail but cannot receive it.
Any help would be greatly appreciated. Some type of routing issue I am assuming? When I send an email via Gmail to myemail#mydomain.com, it does not bounce back.
I fixed it by changing the MX record from mydomain.com. to mail.mydomain.com. and then having the A record for mail point to the server IP.