Files
server_cloud_ladkau_de/ansible/roles/mail/templates/dovecot.conf.j2
T
ml 393cfd4060 Fix fetchmail syntax errors for fetchmail 6.6.x on Alpine
fetchmailrc.j2:
- Move `ssl` to user section (inline after password); in 6.6.x it is a
  user-level keyword, not a server-level one — placing it after `proto pop3`
  caused 'unexpected USERNAME at user' syntax error
- Move `interval` before user section (it is server-level)
- Replace `smtphost dovecot` + `smtpport 24` with `smtphost dovecot/24`;
  `smtpport` is not a valid rcfile keyword in 6.6.x — port must be given
  as host/port in the smtphost value

dovecot.conf.j2:
- Add `auth_username_format = %Ln` to protocol lmtp block so that the
  LMTP recipient address `ml@dovecot` (appended by fetchmail) is stripped
  to just `ml` for userdb lookup
2026-07-01 06:58:33 +02:00

49 lines
1.0 KiB
Django/Jinja

# Managed by Ansible — do not edit manually
protocols = imap lmtp
# Plaintext auth is fine — connections come from within Docker or via
# Traefik TLS termination, never plain from the internet
disable_plaintext_auth = no
auth_mechanisms = plain login
passdb {
driver = passwd-file
args = /etc/dovecot/passwd
}
userdb {
driver = passwd-file
args = /etc/dovecot/passwd
default_fields = uid=5000 gid=5000 home=/var/mail/%u
}
mail_location = maildir:/var/mail/%u/Maildir
mail_uid = 5000
mail_gid = 5000
service imap-login {
inet_listener imap {
port = 143
}
# IMAPS disabled — Traefik terminates TLS on port 993 and forwards plain IMAP
inet_listener imaps {
port = 0
}
}
# LMTP listener for fetchmail delivery — reachable on mail_internal network only
service lmtp {
inet_listener lmtp {
address = *
port = 24
}
}
# Strip domain from LMTP recipient so fetchmail's "ml@dovecot" resolves to user "ml"
protocol lmtp {
auth_username_format = %Ln
}
# SSL disabled — Traefik handles TLS
ssl = no