I can't send mails to gmail or hotmail

9 posts / 0 new
Last post
#1 Tue, 08/20/2019 - 15:36
Felipe Sanchez

I can't send mails to gmail or hotmail

I have created a new virtual server several times and in none of them have I been able to send mails to gmail or hotmail. I can recive correctly. OS: Debian 9 netinst

Procedure: I simply create a new virtual server from virtualmin, then install roundcube from the script that comes by default in virtualmin and then I create a new user called felipe

I am using a DNS in cloudflare. It is configured like this: cloudflaredns

I don't know exactly what logs to show you, please ask me what you need

Tue, 08/20/2019 - 15:48
adamjedgar

Hi Felipe, Your emails are quite likely either being rejected or sent to spam by the receiving mail server because your configuration is correct.

Usually you need the the following:

  1. Reverse ptr (setup via your vps service provider dashboard)
  2. spf record (dns)
  3. _DMARC (dns)
  4. DKIM (dns...this is often advised but optional)

The reverse ptr is also linked with your vps provider and is setup through their interface prior to configuring Virtualmin and adding spf record into dns.

One way to check is via mxtoolbox.com

It also has a tool to help you create missing the records (although not obvious through mxtoolbox interface...I usually Google it)

EDIT...

Oops I forgot, you must get the main mail server configuration correct before any of the Virtual server mails will work. They rely on the parent webmin system mail to be correctly configured. Thus means your mail server itself should have the correct reverse ptr at vps provider dashboard + spf, _DMARC, and dkim records setup.

If the mail server itself is wrong, nothing will work on any virtual servers.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 08/20/2019 - 16:47 (Reply to #2)
Felipe Sanchez

Thank you very much for your quick response!

I am not using any VPS, I have my own server so the only way to configure my DNS is with CloudFlare.

I'm going to try adding the records you recommend (the PTR record is already set, I don't know if it's correct)

Tue, 08/20/2019 - 17:49
adamjedgar

whether or not you use vps doesn't matter...reverse ptr is mandatory.

see following links for dmarc and spf

https://mxtoolbox.com/DMARCRecordGenerator.aspx

https://mxtoolbox.com/SPFRecordGenerator.aspx

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 08/20/2019 - 21:49 (Reply to #4)
Felipe Sanchez

Thanks again, using the recommended links I have reached the following DNS configuration:

dns

Unfortunately I still can't send emails to gmail or hotmail.

I have passed the test provided by mxtoolbox and I have obtained the following results:

Captura

For some reason I am on three blacklists. I am using a dynamic IP that I update in DNS with ddclient, I have read that this can be a problem but it is the only way I have to put my servers on the internet.

I can't get a static IP because my ISP doesn't give it to me.

I keep waiting for more help. Thank you very much for all the time spent, I am new to the configuration of email servers and it is really helping me to use Virtualmin together with your tips

Tue, 08/20/2019 - 21:06
adamjedgar

May I also inquire as to why you say I have my own server so the only way to configure my DNS is with CloudFlare.

That is not true, your virtualmin server is already running Bind DNS by default.

Even if you don't use BInd on your Virtualmin system, a lot of domain registrars offer free dns hosting with each domain.

So you can use your domain registrar's free dns hosting to control this. All that is required is to log into your Domain registrars dashboard and add all of your DNS records (that you currently have at cloudflare) via your registrar domain control panel. This is by far the simplest method of doing this as my understanding is that Cloudflare causes some complications that need some workarounds!

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 08/20/2019 - 22:00 (Reply to #6)
Felipe Sanchez

You are really right, but as you can see I am using free TK domains for the tests. They are obtained from FreeNom and I have not been able to dynamically update my IP in its DNS, for this reason I use cloudflare (And by recommendations of friends).

I have written a comment above with some progress

Wed, 08/21/2019 - 04:35
adamjedgar

Ah yes I see. Don't forget to also check you webmin/logs...specifically those to do with your mail server software (ie make sure postfix is working).

There are documents here on Virtualmin.com that should help you ensure its all ok.

Let me just add, trying to do with with dhcp rather than static IP isn't ideal...I am not sure exactly what issues that will cause, however perhaps you being blacklisted might be one of them?

Free domain I am not sure about how this works with mail exactly?

I think at this point I will leave others to help further as I don't use cloudflare either.

I am sorry I cannot help you more, however your setup is not a standard one which makes this a bit difficult as you may need a few workarounds for your emails to get delivered properly.

My suggestion to you would be to get a cheap vps...ie vultr.com have a small vps for as little as $10 month..and this server is perfect for virtualmin.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Thu, 08/22/2019 - 11:20
Felipe Sanchez

Finally I have been able to confirm that the problem is the bad reputation of the IPs that my ISP gives. They are public and dynamic, and requesting a static IP from my ISP tells me they don't have this service ...