mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #706] Set sensible SMTP timeout #477
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#477
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Kidswiss on GitHub (Nov 5, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/706
When SMTP is enabled it will send a "new device" mail to the user's configured mail address. If that mail server is unreachable for some reason, or misconfigured, it will hang indefinitely with following log entries on the server:
On the client (Chrome):

Enabling debugging I saw that the server is hanging trying to connect to the SMTP host to send the "new device" mail, seemingly forever.
As discussed in #687 with @BlackDex there was already a discussion about this on the matrix chat on October 18.
@dani-garcia commented on GitHub (Nov 5, 2019):
I think by default the timeout is 60 seconds, but it makes sense to reduce it, and maybe allow it to be configurable too.
@Kidswiss commented on GitHub (Nov 6, 2019):
You're right after some time it prints something about login success in the log (sorry currently at work can't get you the exact logs...).
But that may be too long as the client will never receive that information and gets stuck.
@dani-garcia commented on GitHub (Nov 8, 2019):
Resolved in #711, you can use SMTP_TIMEOUT=xx to set the timeout in seconds.
@Kidswiss commented on GitHub (Nov 9, 2019):
Awesome! Thanks for the quick fix!