docker-mailserver: Cannot send mail `warning: SASL: Connect to /dev/shm/sasl-auth.sock failed: No such file or directory`

Preliminary Checks

  • I checked that all ports are open and not blocked by my ISP / hosting provider.
  • I know that SSL errors are likely the result of a wrong setup on the user side and not caused by DMS itself. I’m confident my setup is correct.
  • I searched the issue tracker but was unable to find my issue.
  • I read the extended documentation in general but found nothing to resolve the issue.
  • I read the documentation on debugging, tried the proposed steps to debug the problem, but was still unable to resolve the issue.

Affected Component(s)

Cannot send mails with Mail client

What happened and when does this occur?

If I send an E-mail (Tested with Thunderbird and K9Mail) I get a “connection to outgoing server timed out” error message in Thunderbird. I already recreated the container. The mailserver oujtputs the log output shown below.

This seems to be an issue with the upgrade to version 12.0.0 as it works with v11.3.1 (which I have downgraded to now)

Up until I upgraded the mailserver worked just fine.

What did you expect to happen?

The normal message delivery log output should haave been shown and the message should have been delivered.

How do we replicate the issue?

  1. Start the mailserver on v12.0.0
  2. Attempt to send an email

DMS version

v12.0.0 (latest tag)

What operating system is DMS running on?

Linux

Which operating system version?

Linux v2202206177067191920 4.19.0-23-amd64 #1 SMP Debian 4.19.269-1 (2022-12-20) x86_64 GNU/Linux

What instruction set architecture is DMS running on?

AMD64 / x86_64

What container orchestration tool are you using?

Docker Compose

docker-compose.yml

version: '3.8'

services:
  mailserver:
    image: docker.io/mailserver/docker-mailserver:latest
    hostname: mail # <-- CHANGE THIS
    domainname: cdaut.de # <-- CHANGE THIS
    container_name: mailserver
    env_file: mailserver.env
    # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
    # More information about the mailserver ports:
    # https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/
    ports:
      - "25:25"    # SMTP  (explicit TLS => STARTTLS)
      - "143:143"  # IMAP4 (explicit TLS => STARTTLS)
      - "465:465"  # ESMTP (implicit TLS)
      - "587:587"  # ESMTP (explicit TLS => STARTTLS)
      - "993:993"  # IMAP4 (implicit TLS)
      - "4190:4190" # Manage_sieve
    volumes:
      - ./data/maildata:/var/mail
      - ./data/mailstate:/var/mail-state
      - ./data/maillogs:/var/log/mail
      - /etc/localtime:/etc/localtime:ro
      - ./config/:/tmp/docker-mailserver/
      - /etc/letsencrypt:/etc/letsencrypt
      - ./dovecot:/etc/dovecot/
    restart: always
    stop_grace_period: 1m
    cap_add: [ "NET_ADMIN", "SYS_PTRACE" ]

Relevant log output

mailserver  | Apr 11 10:38:04 mail postfix/submission/smtpd[784]: Anonymous TLS connection established from <my IP>: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
mailserver  | Apr 11 10:38:04 mail postfix/submission/smtpd[784]: warning: SASL: Connect to /dev/shm/sasl-auth.sock failed: No such file or directory
mailserver  | Apr 11 10:38:04 mail postfix/submission/smtpd[784]: fatal: no SASL authentication mechanisms
mailserver  |
mailserver  | Apr 11 10:38:05 mail postfix/master[710]: warning: process /usr/lib/postfix/sbin/smtpd pid 784 exit status 1
mailserver  | Apr 11 10:38:05 mail postfix/master[710]: warning: /usr/lib/postfix/sbin/smtpd: bad command startup -- throttling

Other relevant information

No response

What level of experience do you have with Docker and mail servers?

  • I am inexperienced with docker
  • I am rather experienced with docker
  • I am inexperienced with mail servers
  • I am rather experienced with mail servers
  • I am uncomfortable with the CLI
  • I am rather comfortable with the CLI

Code of conduct

Improvements to this form?

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 15 (9 by maintainers)

Most upvoted comments

When removing the unnecessary volume and re-pulling the image it works. Thank you!

postfix/submission/smtpd[784]: warning: SASL: Connect to /dev/shm/sasl-auth.sock failed: No such file or directory

I’m curious why this is not existing.

https://github.com/docker-mailserver/docker-mailserver/blob/806d3efef9e64fc700ad7efd3943f7ee7fffd1af/target/dovecot/10-master.conf#L91

You are overriding /etc/dovecot though for some reason (we don’t support this officially): ./dovecot:/etc/dovecot/

Please view the diff of our target/dovecot/, our Dockerfile relocates content from there to locations such as /etc/dovecot/conf.d/:

https://github.com/docker-mailserver/docker-mailserver/blob/806d3efef9e64fc700ad7efd3943f7ee7fffd1af/Dockerfile#L56

Since you mount over that with a custom volume, content is not what v12 expects, thus no SASL socket is created at the expected location for Postfix to use (we moved it for v12).