Docker newbie here. This is only my second successful container after the bw host. SMTP from VW is very flakey. It will silently fail email(test or invitation), to 13/18 of my domains. The only pattern I can discern is that the domain that is used for Caddy(certbot email), seems to work. I also think the five domains that work are on different DDNS provider(ZoneEdit). The DDNS that doesn’t seems to work is NameCheap. Both have email catch-alls in place. I think this may be close to the issue.
I am using the GMail SMTP server in VW because I’m lazy and behind Comcast. Don’t feel like peeling back SASL, dovecot, etc. Of course, I have less secure access on in Gmail account. Anyway, it works, only to 5 domains. I also suspect it might be a TLD thing as some of my domain TLDs are .network, .technology, .expert. But then .us works.
I’m running it on an openSuSE Leap 15.2 server. I have bind, apache2, postfix, dovecot and fail2ban running. All of this running behind Comcast using DDNS(shhhh!).
Since proper SMTP is the gateway to VW, you can understand my concern. I think all of this might be solved if I could point VW DNS.
As you use the Google SMTP server:
When you login to your Google account in the browser, are you able to send emails to these domains? If yes, maybe something with Vaultwarden is botched, if no Google does not like the recipients’ domains.
Try enabling SMTP_DEBUG and send mails to those domains which do not work. It should provide info of the mail has been delivered or not.
If the mail has been delivered at google then it’s out of your hands.
Vaultwarden only sends out normal email’s which pass the rfc, though some spamfilters could be triggered of course for some reason which you never get returned while sending the email.
I just confirmed all 18 domains work correctly from the my SMTP sending Gmail account. Another member suggested turning on SMTP debugging. Now, previously working domains do not work after a power outage.
[2021-05-19 22:14:19.973][request][INFO] POST /admin/test/smtp/
[2021-05-19 22:14:30.033][error][ERROR] SmtpError.
[CAUSE] lettre::transport::smtp::Error {
kind: Connection,
source: Custom {
kind: Other,
error: “failed to lookup address information: Temporary failure in name resolution”,
},
}
[2021-05-19 22:14:30.033][response][INFO] POST /admin/test/smtp (test_smtp) => 400 Bad Request
[2021-05-19 22:15:34.114][request][INFO] POST /admin/test/smtp/
[2021-05-19 22:15:44.134][error][ERROR] SmtpError.
[CAUSE] lettre::transport::smtp::Error {
kind: Connection,
source: Custom {
kind: Other,
error: “failed to lookup address information: Temporary failure in name resolution”,
},
}
[2021-05-19 22:15:44.134][response][INFO] POST /admin/test/smtp (test_smtp) => 400 Bad Request
Now I have answers. I knew it was DNS related. The domain that I built VW on, now no longer works. In the log below, the first attempt was the domain that I used to build VW & certbot. Else, I would have never been able to build my vault and organization. The 2nd attempt is a domain that never worked.
[2021-05-19 22:14:19.973][request][INFO] POST /admin/test/smtp/
[2021-05-19 22:14:30.033][error][ERROR] SmtpError.
[CAUSE] lettre::transport::smtp::Error {
kind: Connection,
source: Custom {
kind: Other,
error: “failed to lookup address information: Temporary failure in name resolution”,
},
}
[2021-05-19 22:14:30.033][response][INFO] POST /admin/test/smtp (test_smtp) => 400 Bad Request
[2021-05-19 22:15:34.114][request][INFO] POST /admin/test/smtp/
[2021-05-19 22:15:44.134][error][ERROR] SmtpError.
[CAUSE] lettre::transport::smtp::Error {
kind: Connection,
source: Custom {
kind: Other,
error: “failed to lookup address information: Temporary failure in name resolution”,
},
}
[2021-05-19 22:15:44.134][response][INFO] POST /admin/test/smtp (test_smtp) => 400 Bad Request
Bueller? Caddy DNS configurable? Point DNS to hosts system running DNS? Bueller?
Is there anything I can do to fix this? Is this caddy or Vaultwarden? Was it something I said?
Hi, sorry I do not have more advice. Never used Caddy (I use k3s with traefik) and only have 3 accounts on my raspberrypi and had no problems with sending mail to them 
This was just the generic advice to check with another SMTP client.