mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[GH-ISSUE #4528] Panic if temporary SMTP-Problem #1910
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#1910
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 @Subito on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4528
Subject of the issue
Sometimes on trying to send a 2FA-Mail, the SMTP Server replies with
454: 4.7.0 Temporary authentication failure, which should indicate to the sender "please try later, this is a temporary problem". However vaultwarden panics if it receives this error and the server stops.Deployment environment
Install method: FreeBSD pkg
Clients used: happens on all clients on Login
Reverse proxy and version: nginx
Other relevant details:
Expected behaviour
Server does not crash if it receives a temporary SMTP-Failure.
Actual behaviour
Server crashes and needs restarting.
Troubleshooting data
@BlackDex commented on GitHub (Apr 29, 2024):
Vaultwarden does not have a retry mechanisch for these kind of scenarios. The message indicates a connection error.
Most of the time temp errors should be tried again after a few minutes, but this is not something Vaultwarden handles. I also do not thing Vaultwarden should handle those and try again actually. That kind of functionality belongs to mail servers, not clients.
We probably can catch this error and return an error instead of a panic though, that is probably nicer then a panic.
@Subito commented on GitHub (Apr 30, 2024):
Of course, just catching the error would be great. As you said: Any sort of queue-and-retry should be handled on a mailserver. But panicing on a simple SMTP-Error is probably not great. Just logging an error would be perfect.