📝 Preliminary Checks
👀 What Happened?
I had DMS set up and working with local users, succesfully sent an email to my personal email address. I used a MUA (Mozilla Thunderbird) and am able to authenticate with local users and send email, all works perfectly!
That was just for testing, in the end we need to use LDAP for authentication. I set all the LDAP settings, set ACCOUNT_PROVISIONER=LDAP, ENABLE_LDAP=1 and enabled SASLauthd using rimap. When I execute into the container and run doveadm auth test, authentication to the LDAP server is succesful.
Back to mozilla and IMAP authentication is succesful. However, when I try to send an email, Thunderbird says that the mail server reported an error, namely 'Error: queue file write error'. Strangely, I don't see any such error in the logs, only warnings. See the logs below.
Weirdly, the logs only report warnings, no errors. Googling any of the warnings does not give relevant results.
My problem is that it is unclear which of these (if any) are the cause of the email failing to send, and the warning Thunderbird reported doesn't give much insight either.
I'd gladly believe that this is user misconfiguration, but since there is no clear error logging, it feels like something is going wrong inside DMS, hence this bug report.
It's unclear to me from the documentation if SASLauthd is even necessary, I can't really find what postfix uses for authentication. Perhaps that's where things are going wrong.
As a footnote, since we are currently migrating our mailserver from a manual installation to DMS, so we have two parallel MX-records on the same domain that point to two different servers. This shouldn't be an issue for sending emails, but I'm no email expert so I'm not sure, so I figured I'd mention it anyways.
👟 Reproduction Steps
Use LDAP authentication, with SASLauthd configured to authenticate Dovecot (rimap).
🐋 DMS Version
v12.1.0
💻 Operating System and Architecture
Ubuntu 22.04 on a cloud-provided VPS
⚙️ Container configuration files
services:
mailserver:
image: docker.io/mailserver/docker-mailserver:12.1.0
hostname: mail2.sintjansbrug.nl
env_file: mailserver.env
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)
volumes:
- "/mnt/bigstorage/docker-mailserver/data/:/var/mail/"
- "/mnt/bigstorage/docker-mailserver/mail-state/:/var/mail-state/"
- "/mnt/bigstorage/docker-mailserver/logs/:/var/log/mail/"
- "./config/:/tmp/docker-mailserver/"
# https://github.com/docker-mailserver/docker-mailserver/issues/475#issuecomment-899652084
- "./dovecot-local.conf:/etc/dovecot/conf.d/99-local.conf"
- "/etc/localtime:/etc/localtime:ro"
restart: unless-stopped
stop_grace_period: 1m
📜 Relevant log output
Aug 30 16:24:39 mail2 postfix/smtps/smtpd[978]: warning: dict_ldap_open: /etc/postfix/ldap-aliases.cf: Fixed query_filter is probably useless
Aug 30 16:24:39 mail2 postfix/smtps/smtpd[978]: warning: dict_ldap_open: /etc/postfix/ldap-groups.cf: Fixed query_filter is probably useless
Aug 30 16:24:39 mail2 postfix/smtps/smtpd[978]: connect from <hostname>[<ip-address>]
Aug 30 16:24:39 mail2 postfix/smtps/smtpd[978]: Anonymous TLS connection established from <hostname>[<ip-address>]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
Aug 30 16:24:49 mail2 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=983, secured, session=<JLmpsCQEetJ/AAAB>
Aug 30 16:24:49 mail2 dovecot: imap([email protected])<983><JLmpsCQEetJ/AAAB>: Disconnected: Logged out in=16 out=496 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: dict_ldap_open: /etc/postfix/ldap-aliases.cf: Fixed query_filter is probably useless
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: dict_ldap_open: /etc/postfix/ldap-groups.cf: Fixed query_filter is probably useless
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: dict_ldap_open: /etc/postfix/ldap-domains.cf: Fixed query_filter is probably useless
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: dict_ldap_lookup: Search error 2: Protocol error
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: virtual_alias_domains: ldap:/etc/postfix/ldap-aliases.cf: table lookup problem
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: virtual_alias_domains lookup failure
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: dict_ldap_lookup: Search error 2: Protocol error
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: virtual_alias_domains: ldap:/etc/postfix/ldap-aliases.cf: table lookup problem
Aug 30 16:24:49 mail2 postfix/trivial-rewrite[984]: warning: virtual_alias_domains lookup failure
Aug 30 16:24:49 mail2 postfix/sender-cleanup/cleanup[985]: warning: dict_ldap_open: /etc/postfix/ldap-aliases.cf: Fixed query_filter is probably useless
Aug 30 16:24:49 mail2 postfix/sender-cleanup/cleanup[985]: warning: dict_ldap_open: /etc/postfix/ldap-groups.cf: Fixed query_filter is probably useless
Aug 30 16:24:49 mail2 postfix/smtps/smtpd[978]: D391AE0004E: client=<hostname>[<ip-address>], sasl_method=PLAIN, [email protected]
Aug 30 16:24:49 mail2 postfix/sender-cleanup/cleanup[985]: warning: dict_ldap_lookup: Search error 2: Protocol error
Aug 30 16:24:49 mail2 postfix/sender-cleanup/cleanup[985]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "[email protected]"
Aug 30 16:24:49 mail2 postfix/sender-cleanup/cleanup[985]: warning: D391AE0004E: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
### Improvements to this form?
_No response_
📝 Preliminary Checks
👀 What Happened?
I had DMS set up and working with local users, succesfully sent an email to my personal email address. I used a MUA (Mozilla Thunderbird) and am able to authenticate with local users and send email, all works perfectly!
That was just for testing, in the end we need to use LDAP for authentication. I set all the LDAP settings, set
ACCOUNT_PROVISIONER=LDAP,ENABLE_LDAP=1and enabled SASLauthd usingrimap. When I execute into the container and rundoveadm auth test, authentication to the LDAP server is succesful.Back to mozilla and IMAP authentication is succesful. However, when I try to send an email, Thunderbird says that the mail server reported an error, namely 'Error: queue file write error'. Strangely, I don't see any such error in the logs, only warnings. See the logs below.
Weirdly, the logs only report warnings, no errors. Googling any of the warnings does not give relevant results.
My problem is that it is unclear which of these (if any) are the cause of the email failing to send, and the warning Thunderbird reported doesn't give much insight either.
I'd gladly believe that this is user misconfiguration, but since there is no clear error logging, it feels like something is going wrong inside DMS, hence this bug report.
It's unclear to me from the documentation if SASLauthd is even necessary, I can't really find what postfix uses for authentication. Perhaps that's where things are going wrong.
As a footnote, since we are currently migrating our mailserver from a manual installation to DMS, so we have two parallel MX-records on the same domain that point to two different servers. This shouldn't be an issue for sending emails, but I'm no email expert so I'm not sure, so I figured I'd mention it anyways.
👟 Reproduction Steps
Use LDAP authentication, with SASLauthd configured to authenticate Dovecot (
rimap).🐋 DMS Version
v12.1.0
💻 Operating System and Architecture
Ubuntu 22.04 on a cloud-provided VPS
⚙️ Container configuration files
📜 Relevant log output