Symptoms
-
Unable to send emails in Plesk. The following error is shown in webmail (Roundcube):
SMTP Error (-1): Connection to server failed.
-
An email sent to any external mailbox may be bounced back with the following error:
<[email protected]>: mail for example.com loops back to myself
-
/var/log/plesk-roundcube/errors
shows the following errors:PHP Warning: stream_socket_client(): unable to connect to ssl://localhost:465 (Connection refused) in /usr/share/psa-roundcube/vendor/pear/net_socket/Net/Socket.php on line 159
PHP Error: Connection refused (POST /roundcube/?_task=mail&_unlock=loading1617593106533&_framed=1&_lang=en_US&_action=send)
SMTP Error: Connection failed: Failed to connect socket: Connection refused in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1702 (POST /roundcube/?_task=mail&_unlock=loading1617593106533&_framed=1&_lang=en_US&_action=send)
Cause
Imunify360 firewall only allows SMTP connections from the root user or mail group.
Resolution
-
Go to Imunify360 > Settings > SMTP Traffic Management > Configure the Allow users with the following users:
postfix,horde_sysuser,roundcube_sysuser
> Click Save changes to apply the configuration: