[GH-ISSUE #1128] Cannot send email #798

Closed
opened 2026-03-03 02:03:19 +03:00 by kerem · 2 comments
Owner

Originally created by @JunfXiao on GitHub (Sep 7, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1128

Subject of the issue

When I try to send tow-factor email, smtp error occurs. See log for details.

Your environment

Ubuntu 20.04 with docker.

  • Bitwarden_rs version: bitwardenrs/server:latest
  • Install method: Docker image with docker-compose
  • Clients used:
  • Reverse proxy and version: Nginx
  • Version of mysql/postgresql:
  • Other relevant information:
    Environment:
    _ENABLE_SMTP: "true"
    SMTP_HOST: "smtp.qiye.aliyun.com"
    SMTP_PORT: 465
    SMTP_SSL: "true"
    SMTP_FROM: "bitwarden@***"
    SMTP_USERNAME: "bitwarden@***"
    SMTP_PASSWORD: "***"
    SMTP_AUTH_MECHANISM: "Plain"
    Mail Server is provided by Aliyun.

Expected behaviour

Email should be sent.

Relevant logs

bitwarden | [2020-09-07 09:31:27.202][request][INFO] GET /api/two-factor
bitwarden | [2020-09-07 09:31:27.202][response][INFO] GET /api/two-factor (get_twofactor) => 200 OK
bitwarden | [2020-09-07 09:31:34.220][request][INFO] POST /api/two-factor/get-email
bitwarden | [2020-09-07 09:31:34.279][response][INFO] POST /api/two-factor/get-email (get_email) => 200 OK
bitwarden | [2020-09-07 09:31:36.076][request][INFO] POST /api/two-factor/send-email
bitwarden | [2020-09-07 09:31:51.279][error][ERROR] SmtpError.
bitwarden | [CAUSE] Io(
bitwarden | Os {
bitwarden | code: 11,
bitwarden | kind: WouldBlock,
bitwarden | message: "Resource temporarily unavailable",
bitwarden | },
bitwarden | )
bitwarden | [2020-09-07 09:31:51.279][response][INFO] POST /api/two-factor/send-email (send_email) => 400 Bad Request

Originally created by @JunfXiao on GitHub (Sep 7, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1128 <!-- 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 <!-- Describe your issue here.--> When I try to send tow-factor email, smtp error occurs. See log for details. ### Your environment <!-- The version number, obtained from the logs or the admin page --> Ubuntu 20.04 with docker. * Bitwarden_rs version: bitwardenrs/server:latest <!-- How the server was installed: Docker image / package / built from source --> * Install method: Docker image with docker-compose * Clients used: <!-- if applicable --> * Reverse proxy and version: <!-- if applicable --> Nginx * Version of mysql/postgresql: <!-- if applicable --> * Other relevant information: Environment: _ENABLE_SMTP: "true" SMTP_HOST: "smtp.qiye.aliyun.com" SMTP_PORT: 465 SMTP_SSL: "true" SMTP_FROM: "bitwarden@\*\*\*" SMTP_USERNAME: "bitwarden@\*\*\*" SMTP_PASSWORD: "***" SMTP_AUTH_MECHANISM: "Plain" Mail Server is provided by Aliyun. ### Expected behaviour <!-- Tell us what should happen --> Email should be sent. ### Relevant logs <!-- Share some logfiles, screenshots or output of relevant programs with us. --> bitwarden | [2020-09-07 09:31:27.202][request][INFO] GET /api/two-factor bitwarden | [2020-09-07 09:31:27.202][response][INFO] GET /api/two-factor (get_twofactor) => 200 OK bitwarden | [2020-09-07 09:31:34.220][request][INFO] POST /api/two-factor/get-email bitwarden | [2020-09-07 09:31:34.279][response][INFO] POST /api/two-factor/get-email (get_email) => 200 OK bitwarden | [2020-09-07 09:31:36.076][request][INFO] POST /api/two-factor/send-email bitwarden | [2020-09-07 09:31:51.279][error][ERROR] SmtpError. bitwarden | [CAUSE] Io( bitwarden | Os { bitwarden | code: 11, bitwarden | kind: WouldBlock, bitwarden | message: "Resource temporarily unavailable", bitwarden | }, bitwarden | ) bitwarden | [2020-09-07 09:31:51.279][response][INFO] POST /api/two-factor/send-email (send_email) => 400 Bad Request
kerem closed this issue 2026-03-03 02:03:19 +03:00
Author
Owner

@BlackDex commented on GitHub (Sep 7, 2020):

That looks like the server wasn't able to be reached.
Is DNS working?

Could you check the status within in the /admin/diagnostics page to see if that works or not?

<!-- gh-comment-id:688357238 --> @BlackDex commented on GitHub (Sep 7, 2020): That looks like the server wasn't able to be reached. Is DNS working? Could you check the status within in the `/admin/diagnostics` page to see if that works or not?
Author
Owner

@JunfXiao commented on GitHub (Sep 8, 2020):

That looks like the server wasn't able to be reached.
Is DNS working?

Could you check the status within in the /admin/diagnostics page to see if that works or not?

Thanks. Proved that SMTP Port is closed by ECS Server.

<!-- gh-comment-id:688803746 --> @JunfXiao commented on GitHub (Sep 8, 2020): > That looks like the server wasn't able to be reached. > Is DNS working? > > Could you check the status within in the `/admin/diagnostics` page to see if that works or not? Thanks. Proved that SMTP Port is closed by ECS Server.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#798
No description provided.