mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
SMTP e-mails no longer working #714
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 @obs0lete on GitHub (May 29, 2020).
Subject of the issue
SMTP e-mails no longer working
Your environment
Steps to reproduce
Create a new docker container as shown below:
After image is deployed, I go to the Admin page and enter my SMTP details, using Office 365 credentials, then save the changes.
Expected behaviour
I should get an e-mail to let me know it is working.
Actual behaviour
I get a pop-up that says:
The e-mails are being sent as
user1@email.com, but are actually sent fromuser2@email.com.user1@email.comdoes have the Send As permission enabled.This was also working just fine in the previous release of Bitwarden_rs.
Relevant logs
@BlackDex commented on GitHub (May 29, 2020):
Seems like office is blocking this message.
Could you try to use TLS instead of SSL?
@obs0lete commented on GitHub (May 29, 2020):
Changing to TLS gives the following results:
Using this page as a reference (https://support.office.com/en-us/article/pop-and-imap-email-settings-for-outlook-8361e398-8af4-4e97-b147-6c6c4ac95353) I also tried using the following scenarios:
@dprobinson commented on GitHub (Jun 2, 2020):
I'm wondering if this might be due to the VRFY command not being supported.
@obs0lete, to help debug this, can you try sending an email with this curl command, and paste us the output (don't forget to replace the PLACEHOLDERS and remove your password from the output!)
curl --url 'smtps://smtp.office365.com:465' --ssl-reqd --mail-from 'FROMUSER@YOURDOMAIN.TLD' --mail-rcpt 'RECIPIENT@YOURDOMAIN.TLD' --user 'SMTPUSERNAME:YOURPASSWORD' -v@obs0lete commented on GitHub (Jun 2, 2020):
Thanks for the reply!
The output was quite large, so I've shortened it a bit.
It starts:
...which eventually leads to:
I noticed that this commaned was using port 465, but it should be 587 as per https://support.office.com/en-us/article/pop-and-imap-email-settings-for-outlook-8361e398-8af4-4e97-b147-6c6c4ac95353.
So I adjusted the command as follows:
...and I get this result:
@dprobinson commented on GitHub (Jun 3, 2020):
The server is using Explicit TLS (STARTTLS) on port 587, so I believe the correct settings should be:
N.B. The label for Explicit TLS is actually supposed to be Implicit TLS, as per bug #851
According to the link below, it appears there might be a bug at Microsoft's end preventing you sending from another email address: https://hi.service-now.com/kb_view.do?sysparm_article=KB0778441
@obs0lete commented on GitHub (Jun 3, 2020):
I tired your suggestion but I still get the same result. Even if I try sending email from the same account I still get the same results. Like I mentioned in my initial post, it was working just fine in the previous release.
On the same server, I have sSMTP running as my MTA and it is able to send e-mail from user2@email.com just fine using smtp.office365.com. Not exactly sure what's going on.
I just tried using a Gmail account and it seems to be working, meaning I'm getting the test e-mails. I'll have to leave it like this for now so at least I'm getting notifications.
@BlackDex commented on GitHub (Jun 4, 2020):
@obs0lete I have tested it with my own office365.com account and it worked for me using the following settings (As configured via the /admin panel).
I Tested this twice, and worked without any issues.
@obs0lete commented on GitHub (Jun 4, 2020):
Look at that, it's working! Thank you.
I think the problem I was having was that I was using an e-mail address in the
From Namefield. When I just changed this to another value it worked.Thanks everyone for your help!
@vdias commented on GitHub (Jul 11, 2024):
Outlook not working.
@BlackDex commented on GitHub (Jul 11, 2024):
@vdias i would suggest to read this: https://github.com/dani-garcia/vaultwarden/discussions/4518#discussioncomment-9211666
Outlook stopped supporting plain logins.