mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 17:23:04 +03:00
Error building email. invalid email address #1819
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 @kevdogg on GitHub.
I've seen previous thread addressing this issue however no solution was presented except upgrade to latest version.
I'm using bitwarden_rs from container. BW 2.12.1
Here is my docker-compose.yml file (with selected parts redacted)
On the host running docker, I ran a similar test -- I set up a postfix server to relay mail through the LAN postfix server which then relays through gmail. Setup looks like:
Arch Linux (postfix)-------------->| Arch Linx VM (Reverse Proxy)
docker image --------------------| -->Postfix server ----------------->Gmail ------> user
So I can send mail from the bw host, relayed through postfix running on Arch Linux VM, relayed through Gmail and then sent to user
I configured BW to relay mail through the Reverse Proxy Postfix server (however clearly it didn't work).
I'm not sure what email address it having a problem building
To trigger Bitwarden to send the email -- I'm clicking on box on main page enabled (Verify Email).
I'll provide more information as needed -- thanks for any help.
@jjlin commented on GitHub:
Unless you're particularly interested in setting up your own mail server, it would probably be a lot easier just to use a service like SendGrid, Mailjet, etc. These offer a free tier that let you send a small amount of emails per day.
@kevdogg commented on GitHub:
@hiyan
Thanks a lot for your comments. You pointed me in the right direction
Valid email address -- you were totally correct. I didn't enter a valid email address. Once I corrected this, things proceeded past the error of invalid email address
SSL related
I'm using postfix as my smtp relay. Here are my postfix settings that pertain to SSL for smtpd:
Many of these settings corresponded to those recommended by the Mozilla Generator: https://ssl-config.mozilla.org/#server=postfix&version=3.4.8&config=modern&openssl=1.1.1d&guideline=5.4
In terms of Use Explicit TLS setting
I know many users have asked about this one. Client settings are usually controlled with the directive:
smtp_explicit_tls = yes or smtp_explicit_tls = no (no is the default).
In terms of how this relates to postfix -- settings are found both in the /etc/master.cf and /etc/services file.
Within master.cf, you'll see two broad sections under the headings of
submission inet n - n - - smtpd
smtps inet n - n - - smtpd
Both submission and smtps are services controlled by the master daemon. submission refers to implicit TLS (where the connection is upgraded and encrypted after connecting and receiving TLS header) and smtps refers to explicit TLS (whereby the connection is encrypted from the start). Postfix by default has submission enabled, but smtps is not enabled. The master.cf needs to be modified to enable smtps (along with the various suboptions) to enable smtps. The /etc/services file links the name of the service with the various port. In my /etc/services file submission was:
submission 587/tcp
submission 587/udp
smtps was not even listed. I needed to add an entry into the file for smtps
smtps 465/tcp
smtps 465/udp
So once the changes on the postfix side where made -- on the bitwarden side you could choose either
Implicit TLS with port 465 (In admin console: Check box that says Use Explicit TLS and select 465)
Or
Explicit TLS with port 587 (In admin console: Do not check box that says Use Explicit TLS and select 587)
Sorry about the long post but I hope this works. I also posting my master_cf file here for reference in case it helps someone:
@hiyan commented on GitHub:
Glad to help. Unfortunately, I have zero experience with setting up a SMTP so cant really help you there, just a thought for you to check on your setup.
Hope it's working for you.
@hiyan commented on GitHub:
Shot in the dark here...
Also, is SSL enable in your SMTP server?
@kevdogg commented on GitHub:
I further tried this experiment going through Bitwarden Admin panel and then trying to send an email through the Invite User dialog
I popped open F12 and under network tab this is what I found:
@dani-garcia commented on GitHub:
Closed due to inactivity.