SMTP E-Mail sending error still reports as success in UI #3152

Closed
opened 2026-04-06 04:34:19 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Zauberfisch on 1/1/2020

Subject of the issue

When bitwarden_rs tries to send emails via SMTP, not all errors will actually be recognised as errors.

Your environment

  • Bitwarden_rs version: 1.13.0
  • Install method: arch linux AUR package bitwarden_rs and bitwarden_rs-vault
  • Clients used: web vault
  • Reverse proxy and version: bitwarden (host A) <> stunnel (v5.56) (host A, self signed cert) <> nginx (v1.16) (host B, letsencrypt cert)
  • Version of mysql/postgresql: sqlite
  • Other relevant information: external SMTP server

Steps to reproduce

Started through systemd unit file from AUR package

Cause one of the following errors when sending via SMTP:

  • connection timeout
  • invalid TLS handshake (presumably that was a protocol/port missmatch)
  • invalid credentials

Expected behaviour

UI should tell the user that sending an email failed

Actual behaviour

Green notification pops up saying it was sent

Relevant logs

Jan 01 00:22:39 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:39][_][INFO] Matched: POST /api/accounts/verify-email (post_verify_email)
Jan 01 00:22:39 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:39][lettre::smtp::client][DEBUG] connecting to 10.20.30.40:465
Jan 01 00:22:54 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:54][bitwarden_rs::api::core::accounts][ERROR] Error sending delete account email: Error sending email. connection timed out
Jan 01 00:22:54 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:54][_][INFO] Outcome: Success
*Originally created by @Zauberfisch on 1/1/2020* <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unneccessary for your issue, feel free to remove them. Remember to hide/obfuscate personal and confidential information, such as names, global IP/DNS adresses and especially passwords, if neccessary. --> ### Subject of the issue When bitwarden_rs tries to send emails via SMTP, not all errors will actually be recognised as errors. ### Your environment <!-- The version number, obtained from the logs or the admin page --> * Bitwarden_rs version: 1.13.0 <!-- How the server was installed: Docker image / package / built from source --> * Install method: arch linux AUR package `bitwarden_rs` and `bitwarden_rs-vault` * Clients used: web vault<!-- if applicable --> * Reverse proxy and version: bitwarden (host A) <> stunnel (v5.56) (host A, self signed cert) <> nginx (v1.16) (host B, letsencrypt cert) * Version of mysql/postgresql: sqlite<!-- if applicable --> * Other relevant information: external SMTP server ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start bitwarden_rs? --> Started through systemd unit file from AUR package Cause one of the following errors when sending via SMTP: * connection timeout * invalid TLS handshake (presumably that was a protocol/port missmatch) * invalid credentials ### Expected behaviour UI should tell the user that sending an email failed ### Actual behaviour Green notification pops up saying it was sent ### Relevant logs <!-- Share some logfiles, screenshots or output of relevant programs with us. --> ``` Jan 01 00:22:39 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:39][_][INFO] Matched: POST /api/accounts/verify-email (post_verify_email) Jan 01 00:22:39 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:39][lettre::smtp::client][DEBUG] connecting to 10.20.30.40:465 Jan 01 00:22:54 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:54][bitwarden_rs::api::core::accounts][ERROR] Error sending delete account email: Error sending email. connection timed out Jan 01 00:22:54 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:54][_][INFO] Outcome: Success ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#3152