1

Topic: Mails are not sent, can't connect to MySQL

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.1
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Downloadable installer
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Ubuntu 18.04.2 LTS
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello, the server stopped working properly over the weekend.

Roundcube:
SMTP error (-1) Connection to server failed.

syslog:
Sep 27 08:18:15 mail rsyslogd: action 'action 9' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.32.0 try http://www.rsyslog.com/e/2007 ]
Sep 27 08:18:15 mail rsyslogd: action 'action 9' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
Sep 27 08:18:25 mail roundcube: PHP Warning:  stream_socket_client(): unable to connect to 127.0.0.1:587 (Connection refused) in /opt/www/roundcubemail-1.4.7/vendor/pear/net_socket/Net/Socket.php on line 159
Sep 27 08:18:25 mail roundcube: <pkqu1l3n> PHP Error: Connection refused (POST /mail/?_task=mail&_unlock=loading1632730705879&_framed=1&_lang=en&_action=send)
Sep 27 08:18:25 mail roundcube: <pkqu1l3n> PHP Error: Failed to connect socket: Connection refused (POST /mail/?_task=mail&_unlock=loading1632730705879&_framed=1&_lang=en&_action=send)
Sep 27 08:18:25 mail roundcube: <pkqu1l3n> SMTP Error: Connection failed: Failed to connect socket: Connection refused in /opt/www/roundcubemail-1.4.7/program/lib/Roundcube/rcube.php on line 1702 (POST /mail/?_task=mail&_unlock=loading1632730705879&_framed=1&_lang=en&_action=send)

mail.log:
Sep 27 08:22:08 mail roundcube: PHP Warning:  stream_socket_client(): unable to connect to 127.0.0.1:587 (Connection refused) in /opt/www/roundcubemail-1.4.7/vendor/pear/net_socket/Net/Socket.php on line 159
Sep 27 08:22:08 mail roundcube: <ubraklcg> PHP Error: Connection refused (POST /mail/?_task=mail&_unlock=loading1632730928867&_framed=1&_lang=en&_action=send)
Sep 27 08:22:08 mail roundcube: <ubraklcg> PHP Error: Failed to connect socket: Connection refused (POST /mail/?_task=mail&_unlock=loading1632730928867&_framed=1&_lang=en&_action=send)
Sep 27 08:22:08 mail roundcube: <ubraklcg> SMTP Error: Connection failed: Failed to connect socket: Connection refused in /opt/www/roundcubemail-1.4.7/program/lib/Roundcube/rcube.php on line 1702 (POST /mail/?_task=mail&_unlock=loading1632730928867&_framed=1&_lang=en&_action=send)

dovecot.log:
Sep 27 06:52:43 mail dovecot: dict(2858): Error: mysql(127.0.0.1): Connect failed to database (iredadmin): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 5 seconds before retry
Sep 27 06:52:43 mail dovecot: dict(2858): Error: mysql(127.0.0.1): Connect failed to database (iredadmin): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 5 seconds before retry

Password for iredadmin same in /opt/www/iredadmin/settings.py and dovecot configs.

2

Re: Mails are not sent, can't connect to MySQL

adm_elst wrote:

Sep 27 06:52:43 mail dovecot: dict(2858): Error: mysql(127.0.0.1): Connect failed to database (iredadmin): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 5 seconds before retry

Is MySQL service running?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: Mails are not sent, can't connect to MySQL

Yes, MySQL is running

4

Re: Mails are not sent, can't connect to MySQL

Over the weekend there were no updates, no restarts, even total work activity was low.

5 (edited by adm_elst 2021-09-28 05:16:10)

Re: Mails are not sent, can't connect to MySQL

Seems like postfix subservice don't running currectly.

Post's attachments

8873461.jpg 108.46 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

6

Re: Mails are not sent, can't connect to MySQL

Please run "service postfix restart" and check its log file immediately: /var/log/maillog.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

7 (edited by adm_elst 2021-09-29 04:38:36)

Re: Mails are not sent, can't connect to MySQL

It was spam mailing from the account of one of the users. System go crazy and same of services goes down. Blocked a user, cleared the mailing queue. Problem solved, thank you for your help, Zhang.