Error 400 when setting up SMTP #1025

Closed
opened 2026-04-06 01:34:10 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Javihache on 7/28/2024

Hi,

I am using docker compose to start vaultwarden on Ubuntu 24.04 with the following config.

services:
  bitwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: always
#    ports:
#      - 3012:3012
#      - 1080:80
#      - 1443:443
    environment:
      - ADMIN_TOKEN=${VAULTWARDEN_ADMIN_TOKEN}
      - SIGNUPS_ALLOWED=false
      - WEBSOCKET_ENABLED=true
      - SMTP_HOST=smtp.mail.me.com
      - SMTP_FROM=xxxx@zzz.com
      - SMTP_PORT=587
      - SMTP_USERNAME=xxxx@xxx.com
      - SMTP_PASSWORD=password
      - SMTP_AUTH_MECHANISM=
      - SMTP_SECURITY=force_tls
      - LOG_FILE=/var/log/bitwarden.log
    volumes:
      - ./bw-data:/data
    networks:
      nginx:
    dns:
      - "1.1.1.1"
networks:
  nginx:
    external: true

When I try to send a test e-mail I get: [2024-07-28 22:02:53.489][vaultwarden::mail][ERROR] SMTP error: Connection error: failed to lookup address information: Name or service not known

I am running a Pi Hole using a macvlan network in order to work as DHCP server too.

I can resolve URLs from within the container without an issue and I have network connectivity. However I was still getting that error.

However, in a last effort I tried to type in the IP address resolved for smtp.mail.me.com... I got an SSL error due to the certificates. But once I reverted to smtp.mail.me.com of iCloud's SMTP server, then the test e-mail was sent correctly.

I am not sure if someone else could be able to reproduce this issue, but I'll leave it here in case that it helps someone else.

*Originally created by @Javihache on 7/28/2024* Hi, I am using docker compose to start vaultwarden on Ubuntu 24.04 with the following config. ``` services: bitwarden: image: vaultwarden/server:latest container_name: vaultwarden restart: always # ports: # - 3012:3012 # - 1080:80 # - 1443:443 environment: - ADMIN_TOKEN=${VAULTWARDEN_ADMIN_TOKEN} - SIGNUPS_ALLOWED=false - WEBSOCKET_ENABLED=true - SMTP_HOST=smtp.mail.me.com - SMTP_FROM=xxxx@zzz.com - SMTP_PORT=587 - SMTP_USERNAME=xxxx@xxx.com - SMTP_PASSWORD=password - SMTP_AUTH_MECHANISM= - SMTP_SECURITY=force_tls - LOG_FILE=/var/log/bitwarden.log volumes: - ./bw-data:/data networks: nginx: dns: - "1.1.1.1" networks: nginx: external: true ``` When I try to send a test e-mail I get: `[2024-07-28 22:02:53.489][vaultwarden::mail][ERROR] SMTP error: Connection error: failed to lookup address information: Name or service not known` I am running a Pi Hole using a macvlan network in order to work as DHCP server too. I can resolve URLs from within the container without an issue and I have network connectivity. However I was still getting that error. However, in a last effort I tried to type in the IP address resolved for `smtp.mail.me.com`... I got an SSL error due to the certificates. But once I reverted to `smtp.mail.me.com` of iCloud's SMTP server, then the test e-mail was sent correctly. I am not sure if someone else could be able to reproduce this issue, but I'll leave it here in case that it helps someone else.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1025