mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 17:23:04 +03:00
Error sending SMTP test email LetreErr #1764
Reference in New Issue
Block a user
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 @baahver on GitHub.
I'm having trouble with the configuration of smtp. Sending mail was working before. I was using localhost smtp on port 25 without tls ssl.
But now unsecure smtp is changed to opportunistc if I understand it well.
https://github.com/dani-garcia/bitwarden_rs/pull/901
I used unsecure port 25 because I had problems with setting up tls or ssl.
Now I use:
-e SMTP_HOST=smtp.example.com \ -e SMTP_SSL=true \ -e SMTP_PORT=587 \ -e SMTP_FROM=info@example.com \ -e SMTP_USERNAME=info@example.com \ -e SMTP_PASSWORD=<mypassword> \If I try to send a test mail I get: "Error sending SMTP test email LetreErr"
and:
tail -fn20 /bw-data/bitwarden.log shows me this:
2020-03-19 12:16:10][request][INFO] POST /admin/test/smtp/ [2020-03-19 12:16:11][lettre::smtp][INFO] connection established to <Serversaddress>:587 [2020-03-19 12:16:11][error][ERROR] LetreErr. [CAUSE] Io( Custom { kind: Other, error: Failure( Ssl( Error { code: ErrorCode( 1, ), cause: Some( Ssl( ErrorStack( [ Error { code: 337047686, library: "SSL routines", function: "tls_process_server_certificate", reason: "certificate verify failed", file: "../ssl/statem/statem_clnt.c", line: 1915, }, ], ), ), ), }, X509VerifyResult { code: 62, error: "Hostname mismatch", }, ), ), }, ) [2020-03-19 12:16:11][response][INFO] POST /admin/test/smtp (test_smtp) => 400 Bad RequestI'm using postfix on Ubuntu server with bitwarden in a docker on Apache2 with proxy installed. All was woring well before.
Anyone does have a clue what my problem is here?
@baahver commented on GitHub:
Ok thank you. I will try it later after an update then.
It would be better if I managed to activate a ssl/tls connection then.
If you have some suggestions on that, that would be great.
Thanks a lot Dani-Garcia for all the good work!
@baahver commented on GitHub:
Ok. I just pulled the 'new' version. And all is working well now.
Stil do not know why smtp over ssl or tls is not working in my system.
@dani-garcia commented on GitHub:
As the issue is fixed I'm closing this, about why the certificate isn't working, I'm assuming the certificate provided by the server doesn't match the host name in the config, and that's why you get a "Hostname mismatch" there.
@dani-garcia commented on GitHub:
Yeah the change to opportunistic TLS has broken a couple of configs before, so I've reverted it for now. In some hours the new builds will be available.