As I have been trying to use Roundcube, I have unfortunately encountered a variety of problems.
One serious problem has been a complete failure to send any outgoing messages.
When it is attempted to send a message from the composition pane (by clicking the button Send), no action is completed, instead only is briefly flashed, in the lower right corner of the pane, the following error message:
SMTP Error (): Connection to server failed.
Despite that my testing so far has been quite limited, I recall at least having some previous success in sending basic outgoing messages.
Additionally, forwarded messages have reached their destinations, through the same channels.
I would like help resolving the cause of the 'SMTP Error".
Notes
It is possible that the more suitable category would be Support apps, in comparison to Support.
Additionally, the problem as reported seems to be a duplicate of the topic referenced below, but no resolution has been offered that preserves the model of low-level administration being subsumed under the broader automated framework of Yunohost.
Could you check that the domain setting mail_out is activated Web Admin > Domains > XXXX.tld > Outgoing emails ?
You probably should open the mail log (see bellow) and retry to send a mail with roundcube to see if something appears in the log:
tail -f /var/log/mail.log
(do CTRL + C to terminate this command)
I hope this answer was helpful. Please keep in mind that most of YunoHost’s development is done by volunteers, including this answer. Some of them earn less than the minimum wage in their country. If you can afford it, please consider donating to the 2026 fundraising campaign to help us keep this project going without putting anyone at risk.
I can confirm that outgoing mail is enabled for the domain, based on reviewing the configuration menus.
Thank you, also, for the suggestion to review the mail log.
Unfortunately, I find nothing of interest relating to my attempt to send a message through Roundcube:
As follows is a (redacted) excert of /var/log/mail.log:
postfix/submission/smtpd[146179]: connect from unknown[1234:abcd::]
postfix/submission/smtpd[146179]: TLS SNI yunohost.example.tld from unknown[1234:abcd::] not matched, using default chain
postfix/submission/smtpd[146179]: Anonymous TLS connection established from unknown[1234:abcd::]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
postfix/submission/smtpd[146179]: NOQUEUE: lost connection after STARTTLS from unknown[1234:abcd::]
postfix/submission/smtpd[146179]: disconnect from unknown[1234:abcd::] ehlo=1 starttls=1 commands=2
At the risk of challenging etiquette, I would like to bump the thread, in hope of its receiving some further consideration.
Over several tests, I have confirmed that lines as the ones I reproduced in the earlier comment are the only addition to the mail logs following any of the failed attempts to send a message through Roundcube.
Unfortunately, I lack the experience with mail stacks needed to identify any faults or omissions in the log entries.
I am naturally quite frustrated, because not only is the use case completely trivial, but also, I seem to recall its being successful previously.
I am beginning to wonder whether the recent upgrade on my site to Yunohost 13, based on Debian 13 (Trixie), has caused a functional regression. It has been reported that the mail stack has been heavily revised for the new release, and I have no sounder hypothesis, at present, for explaining the failure, than basic speculation that the new release may have some breakage.
If, by chance, the failures I experience may be traced to a regression in the software, then at least the discovery would serve as a basis for submitting a report.
Otherwise, I hope someone is successful in helping me find a resolution.
If mail.log only shows the connection and nothing else, Roundcube probably fails before even trying to authenticate. It keeps its own log, which should be under /var/www/roundcube/logs/errors.log: have a look right after a failed send. You can also set $config['smtp_debug'] = true; in config/config.inc.php to get the full SMTP exchange in there.
The Roundcube error log should show whether this is a refused connection or an SMTP authentication/TLS failure: check /var/log/roundcube/errors.log and the mail logs around the same send attempt (/var/log/mail.log). Also, “forwarded messages” can mean server-side forwarding, which doesn’t test Roundcube’s SMTP connection. If you share the matching log entries, redact addresses and credentials.
In the application log for Roundcube, I found repeated sequences of the following form:
<b23ed3ae> PHP Error: STARTTLS failed {enableCrypto: false; crypto_method: STREAM_CRYPTO_METHOD_TLS_CLIENT (121); attempts: 1; E_WARNING (2): stream_socket_enable_crypto(): Peer certificate subjectAltName did not match expected name `mydomain.tld'} in /var/www/roundcube/program/lib/Roundcube/bootstrap.php on line 101 (POST /mail/?_task=mail&_unlock=loading1793678655567&_framed=1&_action=send)
<b23ed3ae> PHP Error: Invalid response code received from server in /var/www/roundcube/program/lib/Roundcube/bootstrap.php on line 101 (POST /mail/?_task=mail&_unlock=loading1793678655567&_framed=1&_action=send)
<b23ed3ae> SMTP Error: STARTTLS failed: 2.0.0 Ready to start TLS (Code: 220) in /var/www/roundcube/program/lib/Roundcube/rcube.php on line 1833 (POST /mail/?_task=mail&_unlock=loading1793678655567&_framed=1&_action=send)
I find the situation overall quite confusing.
The log messages seem to be complaining about the domain of the remote certificate, though they refer to one of the local domains.
Is the problem clearly due to otherwise valid requests being rejected as unauthorized, or might it be due to a flaw in the software?
That log line is the actual cause: Postfix presents a certificate that doesn’t cover mydomain.tld, so Roundcube aborts the TLS handshake. The “SNI not matched, using default chain” line in your mail.log points the same way. I’d check yunohost domain cert status for that domain, and if it’s still self-signed, yunohost domain cert install mydomain.tld then systemctl reload postfix should sort it out.