Preliminary Checks
Affected Component(s)
Dovecot errors when creating a filter rule to forward an email
What happened and when does this occur?
Logwatch reports the following (sanitized) error:
imap(<EMAIL_ADDRESS>)<1492788><5ivHyk/6QQSsOq3S>: Error: stat(/var/mail///.dovecot.lda-dupes/tmp) failed: Not a directory: 2 Time(s)
What did you expect to happen?
Clean log files in logwatch
How do we replicate the issue?
1.Using Roundcube I created a rule to forward specific emails from one local mail user to another mail user (error seems to have started when I did this)
2. This creates a file named .dovecot.lda-dupes in the users maildir folder
3. Dovecot appears to think this is an email folder because of it's location and because it starts with a dot
...
DMS version
v12.0
What operating system is DMS running on?
Linux
Which operating system version?
debian 11
What instruction set architecture is DMS running on?
AMD64 / x86_64
What container orchestration tool are you using?
Docker
docker-compose.yml
services:
mailserver:
image: docker.io/mailserver/docker-mailserver:latest
container_name: mailserver
# If the FQDN for your mail-server is only two labels (eg: example.com),
# you can assign this entirely to `hostname` and remove `domainname`.
hostname: mail
domainname: edmunds.email
env_file: mailserver.env
#dns:
# - 127.0.0.1
# More information about the mail-server ports:
# https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
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
- "10110:10110" # POP3 (explicit TLS with HAProxy)
- "10123:10123" # Dovecot auth port for radicale
- "10143:10143" # IMAP4 (explicit TLS with HAProxy)
- "10993:10993" # IMAP4 (implicit TLS with HAProxy)
- "10995:10995" # POP3S (implicit TLS with HAProxy)
- "11334:11334" # Rspamd web interface
- "14190:14190" # Manage sieve
volumes:
- ./docker-data/dms/mail-data/:/var/mail/
- ./docker-data/dms/mail-state/:/var/mail-state/
- ./docker-data/dms/mail-logs/:/var/log/mail/
- ./docker-data/dms/config/:/tmp/docker-mailserver/
- /etc/localtime:/etc/localtime:ro
- ./docker-data/dms/certs/:/tmp/dms/certs/:ro
# ./docker-data/dms/cron/sa-learn:/etc/cron.d/sa-learn
- ./docker-data/dms/config/dovecot/10-custom.conf:/etc/dovecot/conf.d/10-custom.conf
- ./docker-data/dms/config/rspamd/:/etc/rspamd/override.d/
restart: unless-stopped
stop_grace_period: 1m
cap_add:
- NET_ADMIN
healthcheck:
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
timeout: 3s
retries: 0
Relevant log output
imap([<EMAIL_ADDRESS>](mailto:<EMAIL_ADDRESS>))<1492788><5ivHyk/6QQSsOq3S>: Error: stat(/var/mail/<DOMAIN>/<USER>/.dovecot.lda-dupes/tmp) failed: Not a directory: 2 Time(s)
Other relevant information
According to this post the location of this file is an issue:
https://dovecot.dovecot.narkive.com/BRuWMv1g/problem-with-lda-dupes-file
Because it starts with a dot and is located where your Maildir-root
directory is and the IMAP demon tries to access a mailbox called
"dovecot.lda-dupes".
You should not (must not) have home == maildir root.
What level of experience do you have with Docker and mail servers?
Improvements to this form?
No response
Preliminary Checks
Affected Component(s)
Dovecot errors when creating a filter rule to forward an email
What happened and when does this occur?
Logwatch reports the following (sanitized) error:
imap(<EMAIL_ADDRESS>)<1492788><5ivHyk/6QQSsOq3S>: Error: stat(/var/mail///.dovecot.lda-dupes/tmp) failed: Not a directory: 2 Time(s)
What did you expect to happen?
Clean log files in logwatch
How do we replicate the issue?
1.Using Roundcube I created a rule to forward specific emails from one local mail user to another mail user (error seems to have started when I did this)
2. This creates a file named .dovecot.lda-dupes in the users maildir folder
3. Dovecot appears to think this is an email folder because of it's location and because it starts with a dot
...
DMS version
v12.0
What operating system is DMS running on?
Linux
Which operating system version?
debian 11
What instruction set architecture is DMS running on?
AMD64 / x86_64
What container orchestration tool are you using?
Docker
docker-compose.yml
Relevant log output
Other relevant information
According to this post the location of this file is an issue:
https://dovecot.dovecot.narkive.com/BRuWMv1g/problem-with-lda-dupes-file
What level of experience do you have with Docker and mail servers?
Improvements to this form?
No response