Originally created by @JunfXiao on GitHub (Sep 7, 2020).
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).
<!--
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
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 (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?
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 (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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @JunfXiao on GitHub (Sep 7, 2020).
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.
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
@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/diagnosticspage to see if that works or not?@JunfXiao commented on GitHub (Sep 8, 2020):
Thanks. Proved that SMTP Port is closed by ECS Server.