mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-16 04:09:03 +00:00
only validate SMTP_FROM if necessary (#5442)
Some checks failed
Build / Build and Test ${{ matrix.channel }} (msrv) (push) Has been cancelled
Build / Build and Test ${{ matrix.channel }} (rust-toolchain) (push) Has been cancelled
Hadolint / Validate Dockerfile syntax (push) Has been cancelled
Release / skip_check (push) Has been cancelled
trivy / Check (push) Has been cancelled
Release / docker-build (alpine) (push) Has been cancelled
Release / docker-build (debian) (push) Has been cancelled
Some checks failed
Build / Build and Test ${{ matrix.channel }} (msrv) (push) Has been cancelled
Build / Build and Test ${{ matrix.channel }} (rust-toolchain) (push) Has been cancelled
Hadolint / Validate Dockerfile syntax (push) Has been cancelled
Release / skip_check (push) Has been cancelled
trivy / Check (push) Has been cancelled
Release / docker-build (alpine) (push) Has been cancelled
Release / docker-build (debian) (push) Has been cancelled
This commit is contained in:
parent
952992c85b
commit
2903a3a13a
@ -942,7 +942,7 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !is_valid_email(&cfg.smtp_from) {
|
if (cfg.smtp_host.is_some() || cfg.use_sendmail) && !is_valid_email(&cfg.smtp_from) {
|
||||||
err!(format!("SMTP_FROM '{}' is not a valid email address", cfg.smtp_from))
|
err!(format!("SMTP_FROM '{}' is not a valid email address", cfg.smtp_from))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user