Originally created by @sherzinger on GitHub (Aug 1, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1077
### Subject of the issue
Apple SMTP server cannot be used because of certificate validation error.
### Your environment
* Bitwarden_rs version: 1.15.1-1e950c7d
* Install method: docker
### Steps to reproduce
Used the settings as described here (with and without TLS) https://support.apple.com/en-us/HT202304
Not much room for error.
### Relevant logs
<img width="897" alt="Screenshot 2020-08-01 at 16 14 14" src="https://user-images.githubusercontent.com/11333940/89103472-71aec380-d412-11ea-85a4-9a5c1aef73e3.png">
Or you can make sure the docker host has the CA installed correctly and do a read-only mount the /etc/ssl/certs folder within docker by using -v /etc/ssl/certs:/etc/ssl/certs:ro this should include all the ca certs your host allows within the docker container.
And you probably need to mount the following also as a read only: -v /usr/share/ca-certificates/mozilla:/usr/share/ca-certificates/mozilla:ro
<!-- gh-comment-id:674533197 -->
@BlackDex commented on GitHub (Aug 16, 2020):
As stated in #1045 already. You can try these options.
You can try to add the CA cert your self by using the startup script @jjlin created: https://github.com/dani-garcia/bitwarden_rs/wiki/Starting-a-Container#customizing-container-startup
Or you can make sure the docker host has the CA installed correctly and do a read-only mount the `/etc/ssl/certs` folder within docker by using `-v /etc/ssl/certs:/etc/ssl/certs:ro` this should include all the ca certs your host allows within the docker container.
And you probably need to mount the following also as a read only:
`-v /usr/share/ca-certificates/mozilla:/usr/share/ca-certificates/mozilla:ro`
@BlackDex I'm also running into this issue. Adding a script with 'update-ca-certificates" still prompts the same error. Vaultwarden really needs an easy way to just provide a Custom CA. Custom CA's are super common in airgap/enterprise environments.
<!-- gh-comment-id:1059851221 -->
@gaby commented on GitHub (Mar 5, 2022):
@BlackDex I'm also running into this issue. Adding a script with 'update-ca-certificates" still prompts the same error. Vaultwarden really needs an easy way to just provide a Custom CA. Custom CA's are super common in airgap/enterprise environments.
@gaby did you mounted the volumes from the host or added the CA via a script?
If using the Ubuntu (and i think even Alpine) image you could try to add the CA's to /usr/share/ca-certificates and run update-ca-certificates that should do the trick.
<!-- gh-comment-id:1059856006 -->
@BlackDex commented on GitHub (Mar 6, 2022):
@gaby did you mounted the volumes from the host or added the CA via a script?
If using the Ubuntu (and i think even Alpine) image you could try to add the CA's to `/usr/share/ca-certificates` and run `update-ca-certificates` that should do the trick.
<!-- gh-comment-id:1061283263 -->
@gaby commented on GitHub (Mar 8, 2022):
Got it working:
For future person with the same error:
init.sh
```
#!/bin/sh
set -e -x
update-ca-certificates
```
Mount `init.sh` to /etc/vaultwarden.sh
Copy your CA to a folder and then mount it to:
`/path/to/your/ca/:/usr/share/ca-certificates/extras`
<!-- gh-comment-id:1897982789 -->
@ch4r13 commented on GitHub (Jan 18, 2024):
> Got it working:
>
> For future person with the same error:
>
> init.sh
>
> ```
> #!/bin/sh
> set -e -x
>
> update-ca-certificates
> ```
>
> Mount `init.sh` to /etc/vaultwarden.sh
>
> Copy your CA to a folder and then mount it to:
>
> `/path/to/your/ca/:/usr/share/ca-certificates/extras`
It's not working for me. I've got everything I suppose as you.
```
Updating certificates in /etc/ssl/certs...
/usr/sbin/update-ca-certificates: 101: cannot create /etc/ssl/certs/ca-certificates.crt.new: Permission denied
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @sherzinger on GitHub (Aug 1, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1077
Subject of the issue
Apple SMTP server cannot be used because of certificate validation error.
Your environment
Steps to reproduce
Used the settings as described here (with and without TLS) https://support.apple.com/en-us/HT202304
Not much room for error.
Relevant logs
@sherzinger commented on GitHub (Aug 2, 2020):
Possible duplicate of #1037
@BlackDex commented on GitHub (Aug 16, 2020):
As stated in #1045 already. You can try these options.
You can try to add the CA cert your self by using the startup script @jjlin created: https://github.com/dani-garcia/bitwarden_rs/wiki/Starting-a-Container#customizing-container-startup
Or you can make sure the docker host has the CA installed correctly and do a read-only mount the
/etc/ssl/certsfolder within docker by using-v /etc/ssl/certs:/etc/ssl/certs:rothis should include all the ca certs your host allows within the docker container.And you probably need to mount the following also as a read only:
-v /usr/share/ca-certificates/mozilla:/usr/share/ca-certificates/mozilla:ro@BlackDex commented on GitHub (Nov 18, 2020):
@sherzinger Did you got this working? Or do you still have issues?
@gaby commented on GitHub (Mar 5, 2022):
@BlackDex I'm also running into this issue. Adding a script with 'update-ca-certificates" still prompts the same error. Vaultwarden really needs an easy way to just provide a Custom CA. Custom CA's are super common in airgap/enterprise environments.
@BlackDex commented on GitHub (Mar 6, 2022):
@gaby did you mounted the volumes from the host or added the CA via a script?
If using the Ubuntu (and i think even Alpine) image you could try to add the CA's to
/usr/share/ca-certificatesand runupdate-ca-certificatesthat should do the trick.@gaby commented on GitHub (Mar 6, 2022):
I'd give that a try. thanks
@gaby commented on GitHub (Mar 8, 2022):
Got it working:
For future person with the same error:
init.sh
Mount
init.shto /etc/vaultwarden.shCopy your CA to a folder and then mount it to:
/path/to/your/ca/:/usr/share/ca-certificates/extras@ch4r13 commented on GitHub (Jan 18, 2024):
It's not working for me. I've got everything I suppose as you.