Different A Addresses for Main Domain and Email - email

So this maybe a long shot!
However, I have client and there structure for hosting is:
Hosted under my VPS server:
Main Domain: Pointed to Wix
Email Domain: Pointed to my server
Subdomain(s): Pointed to my server and running different scripts/redirecting to other URLs
The subdomains are working fine under my hosting however, the emails aren't working. I was wondering is there away to have two different A addresses or different IPs for Main Domain and Emails?
As of right now I have:
DOMAIN.COM - A - WIX IP
www - CNAME - WIX NAME
mail - CNAME - DOMAIN.COM
Then when I tried to do:
mail - A - VPS IP
I got an error stating that I couldn't do so as I already have a CNAME.
Can anyone help me?!

Make it:
DOMAIN.COM - MX - mail [MX records list DNS names with A/AAAA records]
mail - A - VPS IP
It should allow you handle messages for user#domain.com by accepting incoming SMTP sessions/connections at VPS IP.

Related

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

Email forwarding with Godaddy, SMTP2Go and Netlify

I cannot get email forwarding from my godaddy domain to my gmail. When I send an email to the address, I get the email (from my gmail only) and a message saying address not found.
Setup is:
Godaddy domain and emailforwarding
Netlify to mangage the DNS (it's where the site it managed too)
SMTP2GO to manage email sending an configuration
In GoDaddy, the MX settings are active with the green tickmark showing.
In Netlify, I have input the MX records from GoDaddy.
In SMTP2GO, the SPF and DKIM records are verified.
What am I doing wrong?
Thanks
If netlify is managing DNS, then the MX records in Godaddy are ignored. You can tell this by using whois:
$ whois fools.website | grep -i "name server"
Name Server: DNS1.P05.NSONE.NET
Name Server: DNS2.P05.NSONE.NET
Name Server: DNS3.P05.NSONE.NET
Name Server: DNS4.P05.NSONE.NET
Netlify's nameservers all match the same pattern of DNSx.P0X.NSONE.NET
If your whois lookup returns similar results, you'll want to instead configure everything you have in your DNS settings in Godaddy at Netlify's DNS config, usually https://app.netlify.com/account/dns/domain.name (where you replace domain.name with your actual domain name like mynetlifysite.com)
If your whois records look more like this:
$ whois godaddysite.com | grep -i "name server"
Name Server: PDNS03.DOMAINCONTROL.COM
Name Server: PDNS04.DOMAINCONTROL.COM
Then you'd want to work with Godaddy's support on why the records aren't working as expected since they do host/manage your DNS.
Point Godaddy's DNS to Netlify. Then from Netlify, add MX record of SMTP2GO. Lastly, create alias from STMP2GO that points to your Gmail email address. In my case, I'm using Namecheap instead of Godaddy and ImprovMX instead of SMTP2GO. I posted this here
https://marvintan.com/posts/free-custom-email-address/

AWS EC2 Reverse DNS (PTR) Failing

Have searched everywhere, can't find answer.
I have the domain mydomain.com. The root and www records point to my main server, which runs my website.
I am now using a separate AWS ec2 instance to set up an email server for my domain. This is running on the subdomain mail.
My dns looks like this:
A # webserverip
A www webserverip
A mail ec2ip
To prevent my server from getting flagged for spam, I submitted the amazon reverse dns form here: https://aws.amazon.com/forms/ec2-email-limit-rdns-request
I gave them the ip of my ec2 mail server, and put "mail.mydomain.com" in the "Reverse DNS Record for EIP 1" box.
However, I keep receiving emails back from them saying:
When attempting to map the reverse DNS entry, we notice that this is failing because the PTR record doesn't match the A record for that domain.
We currently require the forward A record to match the PTR record for all reverse DNS entries.
I really don't understand what I am doing wrong. The "mail" subdomain has an A record pointing to my ec2 server ip. Any assistance would be greatly appreciated!
(I am using cloudflare for my dns if this makes any difference)
You can follow these steps to configure the DNS for your EC2 dedicated mail server on AWS:
STEPS
Add two A host records for pop.mydomain.com and
smtp.mydomain.com that point to your elastic IP and assign your
MX record to the smtp.mydomain.com host.
Add a CNAME record (not A host record) for mail.mydomain.com that points to the DNS entry assigned by AWS (e.g., ec2-XXX-XXX-XXX-XXX.REGION.compute.amazonaws.com).
Submit your rDNS request for smtp.mydomain.com mapping to your EIP.
Don't forget to add the SPF TXT record for your mail server. For example, v=spf1 mx a
Once you're done with this setup, you should have a proper mail server configuration in terms of DNS that would pass SMTP tests and avoids being flagged as spam.

1 DNS 2 IPS, 1 IP for email server and 1 IP for website

Hello fellow Stackoverflow users, I have this issue while setting up an email server and website to this email server in two different machines (I've been using Digitalocean's name servers).
example.com REDIRECTS to 107...*
mail.example.com REDIRECTS to example.com
I don't think I'm able to simply change mail.example.com to another IP because then the e-mails wouldn't be like "fellow#example.com"
Any clue about what I should do since they have a rigid abuse system and they would think I'd be abusing if I carefulessly changed those kind of stuff.
Thank you for your time!
If I understood correctly you have 2 different servers ? Which one is webserver and another one for mail ?
If so you should add 3 different records:
A record to webserver:
domain.com. IN A 1.1.1.1
www IN A 1.1.1.1 (www.domain.com)
A record for mail server:
mail IN A 2.2.2.2 - this will create mail.domain.com pont to 2.2.2.2 ip
And then set MX record for that domain:
domain.com. IN MX 10 mail.domain.com - 10 is priority
--
Website will be working from server ip 1.1.1.1, mail will work from 2.2.2.2

Ubuntu exim4 - Config setup and spam filters

I've recently setup my Ubuntu web server with exim4 so my PHP website applications can send email such as "thank you" and "confirmation" notices.
I've got it setup and working such that I can send email to gmail, Yahoo! and my work address. However, my work email gets caught up in our spam filter. I'm new to setting up mail servers so I'm not sure what I might need to look for in making this mail server more trusted, while keeping is secure.
Here are some details:
Server is NATed behind a firewall.
Firewall has port 25 open for outgoing SMTP traffic (from server to anywhere).
Server is virtual hosting a couple different of our websites
The server is running the following exim4 config:
dc_eximconfig_configtype='internet'
dc_other_hostnames='web-serv.example1.com;example2.com'
dc_local_interfacees='127.0.0.1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets='' dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
Questions:
Do I need to open port 25 to incoming SMTP mail (anywhere to server)? I wonder if other mail servers need to talk to my mail server to verify itself, in a sort of handshake attempt.
I have not created any MX records primarily because the server has different websites on it the mail server should send mail for all the websites. Do I need to pick/create a domain address and create MX records for it?
One thing of note is that the mail headers look like this:
Return-Path: <www-data#example2.com>
Received: from web-serv.example1.com ([Firewall public IP Address])
Received-SPF: neutral (google.com: [Firewall public IP Address] is neither permitted nor denied by best guess record for domain of www-data#example2.com)
"web-serv" is the host name of the server, such that you get this if you type it into the command line:
$ hostname
web-serv
and "www-data" is the account name for the Apache2 server that Ubuntu gave it as default.
Any other general advice would be appreciated. It's all new to me.
Cheers!
One item of note, since I posted this question time time ago (almost 10 months) is that I found out the biggest issue I had was with setting up the DNS for reverse DNS on our hosting providers side of things.
In other words, our hosting provider (the people who give us our IP address and manage our hardware) had to enter a record to match my server(s) hostname to whatever IP address it used.
There's a specific name for this. I believe it's a "PTR" record but the name escapes me at the moment, but you basically tell them "my server hostname is ..." and they do a quick update to the DNS for reverse DNS purposes.
When I asked this question, we had a different hosting provider who didn't really help explain this to me, and after switching providers, I got to talk to someone who was happy to help me understand that side of the equation.
And as I understand it, this is setup by the people who assign you the IP addresses. But there's probably more to it than that.
Once I got that setup properly, email had no problem getting through the spam filters and Gmail/Yahoo showed SPF as "passed". It was showing neutral before.
Our company email was set to drop any email that would not resolve reverse DNS, which is why I could not even receive the email or find it in the spam filter. Of course, that situation would be dependent on the company and what email policy and software they're using to manage spam. Some might just drop all email that does not reverse DNS and some might dump it in to spam filters instead.
Hope that might help some people with similar issues.
Cheers!