toteph42 / identy_switch

This plugin allows users to switch between different accounts (and check for new mails) in a single Roundcube session.
GNU General Public License v3.0
6 stars 3 forks source link

can't send letters after plugin install #9

Closed pikachurus closed 2 months ago

pikachurus commented 3 months ago

roundcube 1.6.7, php-fpm 8.1, nginx 1.25, mysql 8.0.37. just installed plugin (and migrated from ident_switch), activated in config.inc.php and then i can't send any letter, with this message in errors.log:

[14-Jun-2024 23:16:24 +0300]: <45nml2sm> PHP Error: php_network_getaddresses: getaddrinfo for %n failed: Name or service not known(POST /?_task=mail&_unlock=loading1718396184503&_framed=1&_action=send) [14-Jun-2024 23:16:24 +0300]: <45nml2sm> PHP Error: Failed to connect socket: php_network_getaddresses: getaddrinfo for %n failed: Name or service not known (POST /?_task=mail&_unlock=loading1718396184503&_framed=1&_action=send) [14-Jun-2024 23:16:24 +0300]: <45nml2sm> SMTP Error: Connection failed: (Code: -1) in /var/www/roundcubemail/program/lib/Roundcube/rcube.php on line 1794 (POST /?_task=mail&_unlock=loading1718396184503&_framed=1&_action=send)

but plugin itself works - added some profiles, change between them.

with old ident_switch everything's fine

toteph42 commented 3 months ago

Hi, I'm on vacation until end of month. I'll then come back on your issue. I suggest in meatime you should check different SMTP setting. You could for example trace your normal RC setup and see what RC is using as host. I think it has to do with your setting.

Am 14. Juni 2024 22:55:55 MESZ schrieb pikachurus @.***>:

roundcube 1.6.7, php-fpm 8.1, nginx 1.25, mysql 8.0.37. just installed plugin (and migrated from ident_switch), activated in config.inc.php and then i can't send any letter, with this message in errors.log:

[14-Jun-2024 23:16:24 +0300]: <45nml2sm> PHP Error: php_network_getaddresses: getaddrinfo for %n failed: Name or service not known(POST /?_task=mail&_unlock=loading1718396184503&_framed=1&_action=send) [14-Jun-2024 23:16:24 +0300]: <45nml2sm> PHP Error: Failed to connect socket: php_network_getaddresses: getaddrinfo for %n failed: Name or service not known (POST /?_task=mail&_unlock=loading1718396184503&_framed=1&_action=send) [14-Jun-2024 23:16:24 +0300]: <45nml2sm> SMTP Error: Connection failed: (Code: -1) in /var/www/roundcubemail/program/lib/Roundcube/rcube.php on line 1794 (POST /?_task=mail&_unlock=loading1718396184503&_framed=1&_action=send)

but plugin itself works - added some profiles, change between them.

with old ident_switch everything's fine

-- Reply to this email directly or view it on GitHub: https://github.com/toteph42/identy_switch/issues/9 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

CodeShakingSheep commented 3 months ago

I run into the same issue. Seems to be a problem related so SSL.

[24-Jun-2024 03:30:04 UTC] PHP Warning:  stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /var/www/roundcube/vendor/pear/net_socket/Net/Socket.php on line 159
[24-Jun-2024 03:30:04 UTC] PHP Warning:  stream_socket_client(): Failed to enable crypto in /var/www/roundcube/vendor/pear/net_socket/Net/Socket.php on line 159
[24-Jun-2024 03:30:04 UTC] PHP Warning:  stream_socket_client(): Unable to connect to ssl://mail.<REDACTED_MAILSERVER>.com:587 (Unknown error) in /var/www/roundcube/vendor/pear/net_socket/Net/Socket.php on line 159
[24-Jun-2024 03:30:04 +0000]: <hqfc1cv5> PHP Error: Failed to connect socket:  (POST /?_task=mail&_unlock=loading1719199802861&_framed=1&_action=send)
[24-Jun-2024 03:30:04 +0000]: <hqfc1cv5> SMTP Error: Connection failed:  (Code: -1) in /var/www/roundcube/program/lib/Roundcube/rcube.php on line 1794 (POST /?_task=mail&_unlock=loading1719199802861&_framed=1&_action=send)

Edit: I could solve sending mails by changing my SMTP port from 587 to 465. The reason for the issue was that I had my IMAP encryption set to SSL and my SMTP authorization set to "Same as IMAP" which makes SMTP use SSL too. So, for SMTP I need to use the port which is working for SSL (not TLS) which in the case of my mail provider is 465.

I think in ident_switch plugin you could set the protocol for SMTP separately and if you used different encryption (e.g. SSL for IMAP and TLS for SMTP) then you run into this bug. Let me know if changing the port works for you as well @pikachurus .

toteph42 commented 2 months ago

@CodeShakingSheep Thank you for your suggestion. Will be implemented in 1.0.18