Can't fetch email POP3 via Gmail

|SYSTEM INFORMATION| |
Operating system Ubuntu Linux 20.04.3
Webmin version 1.984
Usermin version 1.834
Virtualmin version 6.17-3
|||

I am new to Virtualmin, I have recently confugured virtualmin on a Ubuntu VPS. And I am able to create domains and all the basic stuff.
However, I am stuck on the email configuration.
I am able to create new email addresses and I can send and receive emails (to Gmail and whereever) via Usermin interface. However, when I try to fetch Gmail via PoP3, I get this error:
""There was a problem while connecting to mail.xxxxxxx.xxx
Server returned error: “Connection timed out: There may be a problem with the settings you added. Please contact your other email provider to verify the correct server name and port.”

Previously, with other domain control panels, I have used Gmail/PoP3 successfully. I do not know what am I doing wrong here.
I have not done any customizations, everything is running on Default settings of virtualmin.
I just enabled the DKIM settings under the Email Settings tab, as it was not configured by default. And I am using the Default LetsEncrypt SSL, as created at the time of new VPS by Virtualmin, moreover I am using Cloudflare DNS. [can this be a cause of any problem ?]

And logs from /var/log/mail.log is empty.
The same problem occurs with Outlook App

Any tips how to resolve this issue ?
Is there any default firewall configuration that I am missing ?

thanks

Did you generate ssl certificate, what ports did you use for pop3 and did you test imap? With usermin userid may be user@domain.com, when you connect via pop3/imap - userid may be user.domain and not as user@domain.com

1-I am using port settings from “Email Client Settings” page, provided by virtualmin. And I didn’t configure any ports myself.
2-I have tried “user.domain” as user name, but same error.
3- Yes I had generated Letsencrypt SSL and moreover I am using Cloudflare DNS. [can this be a cause of any problem ?]
4- The problem is any mail client can’t connect to mail.domain.com
5- Is there any firewall rules that I need to configure for first time usage ?

Thanks for taking time in my issue.

Try using the hostname of the Virtualmin server instead of mail.domain.tld

Yes, open ports 25, 110, 465, 587, 993 and 995 for mail

Well trying the hostname of the Virtualmin server worked. I have tried it before, but it was not working then, may be I was lazy.
However, SSL is not working via hostname server. How much of a risk is it ?

thanks for the tip

Can we still investigate/probe further to make mail.domain.tld work also ?
I check the firewall, the ports appear to be open.

You want to configure your server correctly and also offer your users every option available, so you cannot have SSL not working and leave it at that; how much of a risk a server is sans valid SSL certificate is an imponderable.

Let’s try this:

  1. create a virtual server with the hostname of the Virtualmin server
    1a) at the time of creating the virtual server, disable (uncheck the box for) mail.
  2. apply for SSL certificate for this virtual server - ensure that all the sub-domains that Virtualmin is requesting the certificate for actually exist and point to the Virtualmin server’s IP address
  3. after the certificate has been installed successfully, in Virtualmin → Server Configuration → SSL Certificate hit the box that says ‘make default for all services’ or words to that effect.

You will now have SSL for email and everything else too, when using the hostname of your Virtualmin server for incoming server and outgoing server in your email client.

Should work with the Ubuntu 20 LTS which you are using, if you get a SLL for the corresponding virtual server via Virtualmin → Server Configuration → SSL Certificate

thanks I will give it a try

Well a virtual server with the hostname of the Virtualmin server was already present, when i first installed the virtualmin, so i didn’t had to do that.
When I request LetsEncrypt certificate, the validation fails. As the hostname is a subdomain, provided to me by my hosting company.

Then don’t use the hostname provided to you by the hosting company. Why should you use someone else’s domain as part of your ecosystem?

Change the Virtualmin hostname to a sub-domain of a domain you own.

I have created many domains on the server, wouldn’t this be a problem ?
The domains are not critical, if they go down for some time it wouldn’t be a problem. But it would be a problem, if I mess the installation altogether :slight_smile:
You have definitely given me very valuable tips, I am very grateful.

I think Rerun Configuration Wizard might help

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.