Bitwarden e-mail verification problems with lets encrypt and local mail server


#1

Hello everyone,

  1. I can ping my SMTP server from bitwarden-api container, also I can telnet the mailserver on port 25 and port 587. I tested the mail account via thunderbird and everything is working. If I use the mailserver in Bitwarden config I have the error message:

System.Net.Mail.SmtpException: Failure sending mail. —> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

But why? Letencrypt is valid certification and no other programs have problems with it.

  1. Second strange thing is, i have another test installation scenario. From the docker container e.g. bitwarden-api I can ping the docker host ip. On the docker host is installed an postfix server which allows to relay from the Bitwarden container network. So I can send mails without any problem and everything work. BUT after I restarted the docker container or use the command ./bitwarden rebuild and ./bitwarden start, the IPs and the hole network from the docker containers are changed. (bevor rebuild or restart the container e.g. have 172.20.0.0/24 and after this the container have 172.21.0.0/24). Each reboot change the IPs from the container one IP range up but why?

I can see that the ./bitwarden start delete docker default_network card. I have also two docker network cards.

docker0, this network card have always the same static ip no changes after reboot, start or rebuild

br-29a2b1f877c5, this network card changed every reboot, start or rebuild, the network card have than another name e.g. br-xxxxx and other IPs / network. Every rebuild, reboot or start +1 the IP range from this network card. (I tested it several times).

My problem is that I can not allow relay the docker containers via postfix on docker host because IP is always changing.

Regards,

Oliver