mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[PR #3147] [MERGED] add support for system mta though sendmail #3232
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#3232
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?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/3147
Author: @soruh
Created: 1/16/2023
Status: ✅ Merged
Merged: 2/12/2023
Merged by: @dani-garcia
Base:
main← Head:main📝 Commits (4)
b7c4316Add support for sendmail as a mail transport8cc6daccheck if SENDMAIL_COMMAND is valid using 'which' crate9e3d7eaadd EXE_SUFFIX to sendmail executable when not specifiedf92efdaMerge branch 'main' into main📊 Changes
5 files changed (+135 additions, -46 deletions)
View changed files
📝
.env.template(+6 -1)📝
Cargo.lock(+12 -0)📝
Cargo.toml(+2 -1)📝
src/config.rs(+52 -12)📝
src/mail.rs(+63 -32)📄 Description
This PR enables using
lettre'sSendmailTransportin Vaultwarden.It adds two configuration options:
-
USE_SENDMAILwether to use sendmail instead of directly connecting to a SMTP server-
SENDMAIL_COMMANDwhat sendmail command to use. By default the one from the$PATHis used, but I think there are cases where it makes sense to specify a different oneSupporting the system MTA allows for more flexible mail configuration without too much effort and does not require packaging any sendmail client as assumed in #2198.
While there are other usecases like sending through a local mailserver without having to create a dedicated SMTP Account as mentioned in #2198, my specific usecase for this is the following:
I have msmtp configured with an account that all applications use without me having to paste the SMTP configuration and credentials into each of their configs and allows me to only have to maintain the one SMTP configuration instead of potentially forgetting one (not fun).
Testing can be done as follows:
log into vaultwarden, click
User icon in top right > account settings > security > Two-step login > Email > Manage > Send Email
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.