Bitwarden e-mail to localhost mailserver

Hi,

My docker system is running fine but I have one problem, mail.

I have the mailserver configured on the docker host correctly and everything is working. Now I have add the IP from the host to the global.override.env everything is working fine. But if I used the rebuild command (./bitwarden rebuild) the ip addresses from the docker containers are changed. What can I do?

Maybe any idea who can I route “localhost” or “127.0.0.1” to the docker host? I won’t use gmx or gmail with plain password in the config file. My docker host can send email without problems over my mailserver. But after rebuild config changed because ipadresses from Bitwarden docker containers are changed. How can I forward localhost or 127.0.0.1 to the docker host? Hope this change is always possible after the rebuild command.

Thanks,

Oliver

If your host listens on all interfaces for SMTP connections on the SMTP port, then I think you should be able to use the docker default network as all containers are connected to thatand it has the host as gateway. So, configure that as SMTP host and see if any emails are logged by your host email server.

[root@bitwarden ~]# docker network inspect docker_default
[
    {
        "Name": "docker_default",
        "Id": "5fafb2d2f5a54dde20c82efa23286bf15279052e416bd8dc8fda45bdfff15cdd",
        "Created": "2019-05-04T14:09:14.599099535+02:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.21.0.0/16",
                    "Gateway": "172.21.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "069b80e1d32c77c2d6ba0c7aab78e57bfdfc6f3d7c0d0f0c1c1a788f874caadc": {
                "Name": "bitwarden-api",
                "EndpointID": "1c9e63277f4c0019d7b6555cb93d712aa34a12e7a9955cc4c37c7fd6f2ba39a5",
                "MacAddress": "02:42:ac:15:00:04",
                "IPv4Address": "172.21.0.4/16",
                "IPv6Address": ""
            },
            "32a41e3daa82bec8fa048345b386e5e2f0b311aae1476b678529afe19c328d4b": {
                "Name": "bitwarden-web",
                "EndpointID": "a8b6a5850e577b1505a5b5c669d1bc770d78952705f76a98cf22720bf6be2844",
                "MacAddress": "02:42:ac:15:00:06",
                "IPv4Address": "172.21.0.6/16",
                "IPv6Address": ""
            },
            "3e35b4a3b87e5ef50e81f99f66e3b1373ba1fddf064d1eee319b54b7b91f74f5": {
                "Name": "bitwarden-attachments",
                "EndpointID": "ba25cb4ac5be94ca4ea7a0fde51f1500bc049f05aac2e25d54da8995748ec5e7",
                "MacAddress": "02:42:ac:15:00:02",
                "IPv4Address": "172.21.0.2/16",
                "IPv6Address": ""
            },
            "4d4594513b957e07f39ea38146ef5c376d55c749cd1fe58d5da3271f9c939d72": {
                "Name": "bitwarden-icons",
                "EndpointID": "fd1e44bc660e7abc97d5bf1111218748b938cd3172d92e3bcd63900f295f62e2",
                "MacAddress": "02:42:ac:15:00:03",
                "IPv4Address": "172.21.0.3/16",
                "IPv6Address": ""
            },
            "583448ef1b01095086918672a52e106ecd96cb634ca3e199e6b599bc81246925": {
                "Name": "bitwarden-nginx",
                "EndpointID": "71a999881d2ddf8e7cfea8737dbfcb4a43fd371380e18b5f231b03f53a96e305",
                "MacAddress": "02:42:ac:15:00:0a",
                "IPv4Address": "172.21.0.10/16",
                "IPv6Address": ""
            },
            "61b588cbe5e23d5362f851b391f0fab9f2681a4d6165d04007e99f395d120424": {
                "Name": "bitwarden-mssql",
                "EndpointID": "0c16ef4bf9ab66aef5f6fadbdbce990925e7cb5795a11143e4815f620e765c1b",
                "MacAddress": "02:42:ac:15:00:09",
                "IPv4Address": "172.21.0.9/16",
                "IPv6Address": ""
            },
            "69995ab45c119a1e4202ea64c2fbcd554e0e8e519e853957ea71e38c53e95b20": {
                "Name": "bitwarden-identity",
                "EndpointID": "f8d070d90146db3ed97f99e9ddf59a03b3a7b09a66a099965673e7601408ea1b",
                "MacAddress": "02:42:ac:15:00:07",
                "IPv4Address": "172.21.0.7/16",
                "IPv6Address": ""
            },
            "809809950b35c123355d34cd3c55357ec010d187b17b3682b3ccd840ecc57ade": {
                "Name": "bitwarden-notifications",
                "EndpointID": "79a1b57d8860c47578acd4498573a0109793e05d354e6a6836d074c6f5e92403",
                "MacAddress": "02:42:ac:15:00:05",
                "IPv4Address": "172.21.0.5/16",
                "IPv6Address": ""
            },
            "c0b90132a1d8749894b487c6eed3c9e69320777645935cff28d1f85cceee34f1": {
                "Name": "bitwarden-admin",
                "EndpointID": "d564c4978dabfb0d09a2ce0a0cc576321cd5a334c782707c460eed94ca915c9e",
                "MacAddress": "02:42:ac:15:00:08",
                "IPv4Address": "172.21.0.8/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "default",
            "com.docker.compose.project": "docker",
            "com.docker.compose.version": "1.24.0"
        }
    }
]
[root@bitwarden ~]#