Rainloop "Can't connect to server"

Hello,

I have been experiencing some email issues, yesterday I reinstalled Cyberpanel and configured emails, I was able to send and receive emails from Wordpress, Outlook and Rainloop, the email-tester result was 10/10.

Today the issue has returned, I can not connect to mailserver using outlook, also Rainloop returns “Can’t connect to server”.

I have tried restarting postfix “sudo service postfix restart” however the issue remains.

This has been an ongoing daily occurring issue for me, I don’t want to try reissuing SSL as I have been doing so previously because I found the SSL limit gets reached and then I am screwed.

This is my first VPS so I could be missing something very obvious, any help would be very much appreciated.

Thank you :slight_smile:

Ok, so I backed up my Letsencrypt/Live folder just in case I hit my SSL limit. I reissued mail server SSL to mail.mydomain.co.uk (the Domain with RDNS record against it) straight after doing so my email is working again.

This is the loop I am stuck in, sorry to sound negative but from my experience I believe tomorrow the same issue will reoccur and again the following day until I hit my SSL limit.

What could be causing this? I really like the Cyberpanel but this really is driving me insane :frowning:

I did, I verified using various SSL checker sites for both primary and email domain.

Thank you for confirming everything I did shouldn’t have broken it, being new to Cyberpanel I wasn’t sure :slight_smile:

Regarding the Hostinger image though I used minimal Centos 7 on my laptop and same email + ssl problem reoccurs.

I would rather not disable CF, however in an attempt to fix this I will, let’s see how it looks tomorrow if it doesn’t break again by then or the next day then that’s a very good sign/ or not! lol.

When I see the error again I will try those commands to what the output is.

Thank you :slight_smile:

Ok so as of today my emails were still working, I just went to email a customer and bam emails are down again. Today I did install and enable Modsecurity nothing else, no rule packs etc…

systemctl status dovecot (returned many lines here are some of them)

May 29 11:14:01 mydomain.co.uk dovecot[679]: pop3-login: Login: user=sales@mydomain.co.uk, …Xjw>
May 29 11:14:26 mydomain.co.uk dovecot[679]: pop3(sales@mydomain.co.uk)<85173><STDMisemhzxexX…6616
May 29 11:20:16 mydomain.co.uk dovecot[679]: imap-login: Disconnected (no auth attempts in 25 secs): use…RQZ>
May 29 11:20:25 mydomain.co.uk dovecot[679]: imap-login: Disconnected (no auth attempts in 10 secs): use…RQZ>
May 29 11:42:11 mydomain.co.uk dovecot[679]: imap-login: Disconnected (no auth attempts in 2 secs): user…qAF>
May 29 12:11:49 mydomain.co.uk dovecot[679]: pop3-login: Login: user=sales@mydomain.co.uk, …Xmh>
May 29 12:12:24 mydomain.co.uk dovecot[679]: pop3(sales@mydomain.co.uk)<88827><rEqBWcim+UdexX…6616
May 29 12:12:25 mydomain.co.uk dovecot[679]: pop3-login: Login: user=sales@mydomain.co.uk, …Xmh>
Hint: Some lines were ellipsized, use -l to show in full.

[root@mydomain ~]# systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; disabled; vendor preset: disabled)
Active: inactive (dead)

May 29 07:57:54 mydomain.co.uk postfix[215446]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: und…ions
May 29 07:57:54 mydomain.co.uk postfix[215446]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: und…ions
May 29 07:57:54 mydomain.co.uk postfix[215446]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: und…ions
May 29 07:57:54 mydomain.co.uk postfix[215446]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: und…ions
May 29 07:57:54 mydomain.co.uk postfix[215446]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: und…ions
May 29 07:57:54 mydomain.co.uk postfix[215446]: /usr/sbin/postconf: warning: /etc/postfix/main.cf: undef…maps
May 29 07:57:54 mydomain.co.uk postfix[215446]: /usr/sbin/postconf: warning: /etc/postfix/main.cf: unuse…=yes
May 29 07:57:54 mydomain.co.uk postfix[215446]: /usr/sbin/postconf: warning: /etc/postfix/main.cf: unuse…=yes
May 29 07:57:54 mydomain.co.uk postfix/master[46213]: terminating on signal 15
May 29 07:57:54 mydomain.co.uk systemd[1]: Stopped Postfix Mail Transport Agent.
Hint: Some lines were ellipsized, use -l to show in full.
[root@mydomain ~]#

I dont understand what this means, can anyone help to fix this please

Same issue here, and i have installed modsecurity yesterday night too. Tried to deactivate and restart postfix, but not success yet.

@maicon1121 sorry to hear you are experiencing this too, but glad it’s not just me! lol

Ok, so Issued SSL for mail server, email working once again, however, I have been here before so I expect email to fail again tomorrow and again the next day until I hit the SSL limit then no way to temporarily resolve. Pretty sure before as a workaround I restored a backup copy of the SSL Live folder, this doesn’t stop it failing again the next day though.

Nice! All you did is issue mailserver SSL and you are now receiving emails correctly?

Type your comment> @maicon1121 said:

Nice! All you did is issue mailserver SSL and you are now receiving emails correctly?

Yes, before issuing mail domain SSL I did disable Modsecurity, so far it has not failed again, will allow a few days to see if it fails again before trying to enable Modsecurity once more, will test Spamassassin afterward as I see other reported Spamassassinn as the cause to email failing also.

As of this morning, the email has broken once again, it seems no emails have arrived since yesterday @ 8am, I don’t have Modesecurity enabled or spamassasin, really do not know where to go from here, just seem to be going around in circles, unfortunately, I do not have the experience or knowledge to resolve this on my own :frowning:

Just to clarify this is just as I speculated, issued mail SSL once again and email connects once more, this must be an SSL issue? Any chance of an admin taking a look please?

Ok, so did a fresh install without installing Modsecurity, it seems SSL issue may be resolved however this time around I found I could only receive emails and not send them.

I uninstalled CSF and emails were now able to send. All ports required were already added to CSF so not sure of the cause. I reinstalled CSF and emails are still currently working.

I have posted this in case someone else has the same issue, this may be a temporary or long term fix only time will tell.

Just to add, maybe CSF has problems with allowing ports as I also found if I changed the SSH port from 22 to 12345 for example and then added the new SSH port 12345 to CSF allow TCP in & out the Terminal does not connect to backend. My point here is maybe the email ports which are added are also not allowed regardless of being added to CSF allow.

Ok so I checked the mail.domain SSL using SSL Checker and cert appears ok so I have have decided not to reissue SSL right now.

If I run commands as advised previously “systemctl status dovecot” I receive the following. (I have replaced IP with “*”).

Jun 16 10:09:43 mydomain.co.uk dovecot[375460]: auth: Warning: auth client 0 disconnected with 1 pending requests: EOF
Jun 16 10:10:04 mydomain.co.uk dovecot[375460]: auth: Warning: auth client 0 disconnected with 2 pending requests: EOF
Jun 16 10:15:42 mydomain.co.uk dovecot[375460]: pop3-login: Login: user=sales@mydomain.co.uk, method=PLAIN, rip=83.146.., lip=145.14.., mpid=6962…+oZulTkjdc>
Jun 16 10:15:43 mydomain.co.uk dovecot[375460]: pop3(sales@mydomain.co.uk)<696218><gVLQ/C+oZulTkjdc>: Disconnected: Logged out top=0/0, retr=6/91759, del=0/6…ze=34019970
Jun 16 10:21:40 mydomain.co.uk systemd[1]: Stopping Dovecot IMAP/POP3 email server…
Jun 16 10:21:40 mydomain.co.uk dovecot[375458]: master: Warning: Killed with signal 15 (by pid=698242 uid=0 code=kill)
Jun 16 10:21:40 mydomain.co.uk dovecot[375460]: auth: Warning: auth client 0 disconnected with 1 pending requests: EOF
Jun 16 10:21:40 mydomain.co.uk dovecot[375460]: auth: Warning: auth client 0 disconnected with 1 pending requests: EOF
Jun 16 10:21:41 mydomain.co.uk dovecot[375460]: log(375460): Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Jun 16 10:21:41 mydomain.co.uk systemd[1]: Stopped Dovecot IMAP/POP3 email server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@mydomain ~]#

********************************* Also *********************************

“systemctl status postfix” returns

[root@mydomain ~]# systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: inactive (dead)

Jun 16 12:00:36 mydomain.co.uk postfix[1304]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
Jun 16 12:00:36 mydomain.co.uk postfix[1304]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
Jun 16 12:00:36 mydomain.co.uk postfix[1304]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
Jun 16 12:00:36 mydomain.co.uk postfix[1304]: /usr/sbin/postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
Jun 16 12:00:36 mydomain.co.uk postfix[1304]: /usr/sbin/postconf: warning: /etc/postfix/main.cf: undefined parameter: virtual_mailbox_limit_maps
Jun 16 12:00:36 mydomain.co.uk postfix[1304]: /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
Jun 16 12:00:36 mydomain.co.uk postfix[1304]: /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
Jun 16 12:00:36 mydomain.co.uk postfix/postfix-script[1348]: stopping the Postfix mail system
Jun 16 12:00:36 mydomain.co.uk postfix/master[1075]: terminating on signal 15
Jun 16 12:00:36 mydomain.co.uk systemd[1]: Stopped Postfix Mail Transport Agent.
[root@mydomain ~]#

I have noticed something new, it may or may not be related.

Upon remote SSH login I also see this below last login entry…

/dev/mem: No such file or directory

Sorry to post so many comments with allowing time for a reply.

I just updated CP then restarted the server, email is working once again! Hopefully, the issue has been resolved in the latest update : )

Destructively getting desperate here and don’t really understand half of what I just did or if repo and pip should have been updated or installed.

However, this is what I did.

  1. sudo yum install epel-release -y
  2. sudo yum update -y && sudo shutdown -r now
    3.sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
    (which returned)
    Installed:
    postfix3.x86_64 2:3.5.3-1.gf.el7 postfix3-mysql.x86_64 2:3.5.3-1.gf.el7
    Complete!
    [07.13.2020_09-31-12] #########################################################################
    [07.13.2020_09-31-12] Dovecot upgraded.
    [07.13.2020_09-31-12] #########################################################################
    [07.13.2020_09-31-15] #########################################################################
    [07.13.2020_09-31-15] Fixing permissions…
    #########################################################################
    [07.13.2020_09-31-15] chown core code successful.

usermod: group ‘nogroup’ does not exist

  1. -m pip install --upgrade pip
    Installing collected packages: pip
    Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
    Successfully uninstalled pip-8.1.2
    Successfully installed pip-20.1.1

  2. sudo yum update -y && sudo shutdown -r now

  3. Changed default SSH port back to port 22

  4. Reissue mail SSL

  5. Email working! & No wiser to what is the cause

No it had not expired, yes it is very strange I have to do steps which apprently do not affect email. I have forwarded all of this info onto hostinger to see what they come back with.

Also turns out my rdns is not seeing the correct mail.domain.com but domain.com instead.

I’ll wait and see what they say.

Thank you again for taking the time to reply and for easing my mind on what I have actually done. Im glad this makes no sense and its not just me lol.

:slight_smile:

No reason to use cron, just enable them at boot so when the server is restarted or rebooted both postfix and dovecot are loaded and restarted.

systemctl enable postfix

systemctl enable dovecot

or

systemctl enable postfix.service

systemctl enable dovecot.service

@themew

To be sure, I ran all of those commands, restarted server, and presto! The email appears to be working!

I have lost so much sleep over this can’t believe it was something so simple, of course only simple when you know-how lool.

Thank you so much for your help :slight_smile:

@themew

This morning emails failed once more!

I tried running the following commands but they had no effect,

systemctl enable postfix

systemctl enable dovecot

or

systemctl enable postfix.service

systemctl enable dovecot.service

The only commands which allow email service to resume are.

systemctl restart postfix

systemctl restart dovecot

It seems there is no way I can resolve this, maybe the idea of running a cron to restart the service is not a bad idea, or at least until we are on another server/ host.

If anyone can tell me how to setup a cron to run “systemctl restart postfix” + “systemctl restart dovecot” that would be very much appreciated, I understand this method is more of a nasty patch up rather than an actual fix.

Thanks again :slight_smile: