Cannot send email #1622

Closed
opened 2025-10-09 17:23:00 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @JunfXiao on GitHub.

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. <!-- 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
Author
Owner

@BlackDex commented on GitHub:

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?

@BlackDex commented on GitHub: 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:

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.

@JunfXiao commented on GitHub: > 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.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1622