Files
server_cloud_ladkau_de/ansible/roles/mail/templates/fetchmailrc.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

20 lines
653 B
Django/Jinja

# Managed by Ansible — do not edit manually
set postmaster "postmaster"
set bouncemail
set logfile /dev/stdout
# Wake up every 60 seconds; each server's 'interval' is a multiplier of this
set daemon 60
{% for account in fetchmail_accounts | default([]) %}
poll {{ account.server }} proto {{ account.protocol | default('pop3') }}
interval {{ account.poll_minutes | default(10) }}
user "{{ account.username }}" password "{{ account.password }}"{% if account.ssl | default(true) %} ssl{% endif %}
is {{ account.local_user }} here
smtphost dovecot/24
lmtp
fetchall
{{ 'keep' if account.keep | default(true) else 'no keep' }}
{% endfor %}