• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Cannot connect to Mail server.... sometimes

Peter Downes

Basic Pleskian
Hi

My mail app 'sometimes', just 2 or 3 times a day, cannot connect to my mail server and reports a connection error. Five minutes later it is fine. I check very often.

A client reports they cannot connect more frequently - often - and for longer periods. An hour or so at a time.

So I cannot say that the server does not have problem. But I cannot understand why they have greater connectivity problems than I.

Any ideas or where I can look for problems?
Thank you
 
Thanks. Looks like I am using POSTFIX

I'm not sure if this is the best place to troubleshoot my mail logs so please tell me if not.

I see these lines every 12 seconds or so:

Where <DOMAIN> replaces a domain hosted on the VPS. There is no mail account set up for test@<DOMAIN>. There is no MX record set for <DOMAIN> pointing to the server.

Apr 5 06:07:23 vps19193315 postfix/smtpd[23133]: connect from unknown[185.22.173.***]
Apr 5 06:07:24 vps19193315 plesk_saslauthd[14036]: No such user 'test@<DOMAIN>' in mail authorization database
Apr 5 06:07:24 vps19193315 plesk_saslauthd[14036]: failed mail authenticatication attempt for user 'test@<DOMAIN>' (password len=8)
Apr 5 06:07:24 vps19193315 postfix/smtpd[23133]: warning: unknown[185.22.173.***]: SASL LOGIN authentication failed: authentication failure
Apr 5 06:07:24 vps19193315 postfix/smtpd[23133]: lost connection after AUTH from unknown[185.22.173.***]
Apr 5 06:07:24 vps19193315 postfix/smtpd[23133]: disconnect from unknown[185.22.173.***]

Perhaps I should stop this - not sure how.
Thanks
 
Hi @Peter Downes
I would suggest you install Fail2Ban from the Plesk installer, either in the UI...
Plesk -> Tools & Settings -> Updates & Upgrades

Or via the CLI like so...

Install
Code:
/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --install-component fail2ban

Uninstall
Code:
/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --remove-component fail2ban


I hope that helps
Regards...
 
I found this thread
https://talk.plesk.com/threads/cour...nnection-after-some-hours.208768/#post-560015

I too see this error in my logs
--
Unexpected SSL connection shutdown.
--

I looked at my copy of

It had
--
MAXDAEMONS=40
MAXPERIP=4
--

I know my clients with problems connecting has 11 accounts behind the same IP address.

So I downloaded using ftp and changed to:-
MAXDAEMONS=80
MAXPERIP=60

And uploaded. (I wonder if its ok to do via FTP?)

I've then tried to restart IMAP services following this article.
https://kb.plesk.com/en/113841

But I get strange output from the CLI

--
[root@mail ~]# cp -a /etc/courier-imap/imapd{,.backup}
[root@mail ~]# /etc/init.d/courier-imapd restart
: command not foundmapd: line 23:
....(etc etc)
: command not foundmapd: line 462:
Stopping Courier IMAP server:
--


And then nothing........ But Email is still working so phew.

Any suggestions welcome.
Thanks
 
To restart Courier run...

Code:
/etc/init.d/courier-imapd restart

Code:
/etc/init.d/courier-imaps restart

Code:
/etc/init.d/courier-pop3d restart

Code:
/etc/init.d/courier-pop3s restart

Code:
/etc/init.d/courier-authdaemon restart

Regards

Lloyd
 
Thanks Lloyd but I guess something is not right on the VPS

I get
[root@mail ~]# /etc/init.d/courier-imapd restart
: command not foundmapd: line 23:
....[lots of command not foundmapd: line here]
: command not foundmapd: line 460:
: command not foundmapd: line 462:
Stopping Courier IMAP server:

Time to raise a support ticket to say I cannot restart Courier?
 
Oh you downloaded the file and edited, sorry I missed that, that possibly changed the format of the file, You can try running...

Code:
dos2unix /etc/courier-imap/imapd

And then start courier. But since you have the backup file, just restore it.

You can then set MAXIP in the Plesk panel...

Plesk -> Tools & Settings -> Mail Server Settings

I hope that helps
Regards

Lloyd

Note: If you want to download files and edit them, best use something like Notepad++ and set it up for a UNIX environment. But you are better off learning vi.
 
Back
Top