How to configure GMail to act as Client to Nethserver

NethServer Version:
NethServer 7.9.2009

Module: email

Hi Guys, I’ve just moved to a new phone which doesn’t allow me to load the RoundCube mail client (corporate lockdown), so I’m trying to find a way of using Gmail or Outlook (already on the phone) or some other client to access the mail service on Nethserver.

I can access the Nethserver mail server fine through webmail, and I have checked that both IMAP and POP are enabled on the server, but I can’t get either of the clients listed above to log on and handle mail…what is worse, all I get is a cryptic “Can’t log on” message, with no diagnostics.

It should be so simple, but its beaten me! I guess the critical part of the config is port numbers and security. I have tried a whole bunch of port numbers, the usual suspects for IMAP and SMTP, to no avail.

My Nethserver is running in a “domestic” environment and as such is about as default as it can be. I have certificates loaded because I’m running a couple of websites, and I know https works OK, so the certificates must be right (?)

Can anyone suggest a way forward?

Thanks

In the documentation about client configuration you can find a list of the used services/ports.

OK, so I checked all the necessary ports are permitted through shorewall (110, 143, 4190, 993, 995, 25, 465, 587) and I can telnet and get a response from 25, 143, 587 and 4190. I get a disconnect from 993, 995 and 465, but that should only affect SSL/TLS, and I should be able to use 25 and 143 (shouldn’t I?) .
However, when I try to set up the client, I still get “cannot log on” messages. Is there a logfile I can access to get more details about why the connections are failing?

You could check /var/log/maillog for errors.

Yes, here’s the right link for NethServer 7 mail client config: Email — NethServer 7 Final

looking at what was in the link you sent, it looks like I need port 993 open and responding…can’t use 25 , the doc states “The standard SMTP port 25 is reserved for mail transfers between MTA servers”
But I’m not getting a response when I telnet to 993. Any ideas why that may be…I will continue to investigate/google

Thanks for your help so far!

1 Like

Telnet should work. Here are some ideas:

Is dovecot running or throwing errors?

systemctl status dovecot -l

Is the dovecot service allowed from green and red interface?

You could try to disable the NS7 firewall for testing:

shorewall clear

To enable the firewall again:

signal-event firewall-adjust

Do you use Fail2ban? Maybe the client from which you’re using telnet is blocked due to wrong credentials.

If you’re using Threat Shield or IPS on NS7, you may try to disable it.

1 Like

Dovecote is running, throwing some errors like this

Nov 07 08:38:26 name_erased.blake-online.net dovecot[2913]: imap-login: Disconnected: Too many invalid commands (no auth attempts in 0 secs): user=<>, rip=118.193.56.149, lip=192.168.xxx.yyy, session=

Nov 07 08:38:26 name_erased.blake-online.net dovecot[2913]: imap-login: Disconnected: Too many invalid commands (no auth attempts in 0 secs): user=<>, rip=118.193.56.149, lip=192.168.xxx.yyy, session=

Nov 07 08:38:27 name_erased.blake-online.net dovecot[2913]: imap-login: Disconnected: Too many invalid commands (no auth attempts in 0 secs): user=<>, rip=118.193.56.149, lip=192.168.xxx.yyy, session=

Yes, on ports TCP: 110, 143, 4190, 993, 995

That didn’t change the issue, I got software disconnects when trying to Telnet into 993 and the mail client failed to connect

I have Fail2ban running on the server, but know very little about it or Threat Shield