Trouvés au premier flux réel : - lmtp_host_lookup = native (Postfix faisait du DNS-only, ignorant le plancher /etc/hosts → « Host not found » pour le mail-store) ; - copie de /etc/hosts, resolv.conf, nsswitch.conf, services dans le chroot Postfix (/var/spool/postfix/etc) pour la résolution en chroot. Résultat : Postfix atteint bien le mail-store en LMTP. Reste un nœud de config Dovecot 2.4 (userdb LMTP renvoie NOTFOUND via auth-master) à résoudre pour clore le flux interne. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
1.4 KiB
Django/Jinja
36 lines
1.4 KiB
Django/Jinja
# Géré par Set-OPS (rôle serveur_postfix). Ne pas éditer à la main.
|
|
compatibility_level = 3.6
|
|
myhostname = {{ serveur_postfix_nom_hote }}
|
|
mydomain = {{ serveur_postfix_domaine }}
|
|
myorigin = $mydomain
|
|
inet_interfaces = all
|
|
inet_protocols = ipv4
|
|
biff = no
|
|
append_dot_mydomain = no
|
|
readme_directory = no
|
|
smtpd_banner = $myhostname ESMTP
|
|
mynetworks = {{ serveur_postfix_reseaux_confiance }}
|
|
|
|
# Aucune remise locale : ce MTA ne fait QUE des boîtes virtuelles (via LDAP + LMTP).
|
|
mydestination =
|
|
local_recipient_maps =
|
|
|
|
# --- Boîtes virtuelles : validation LDAP + remise LMTP vers le nœud mail-store (Dovecot) ---
|
|
virtual_mailbox_domains = {{ serveur_postfix_domaine }}
|
|
virtual_mailbox_maps = ldap:/etc/postfix/ldap-mailboxes.cf
|
|
virtual_transport = lmtp:inet:[{{ serveur_postfix_mailstore_hote }}]:{{ serveur_postfix_lmtp_port }}
|
|
# Résolution via le plancher /etc/hosts (indépendant du DNS) pour la remise interne.
|
|
lmtp_host_lookup = native
|
|
|
|
{% if serveur_postfix_tls_actif %}
|
|
# --- TLS (certificat step_ca) ---
|
|
smtpd_tls_cert_file = {{ serveur_postfix_tls_dir }}/cert.pem
|
|
smtpd_tls_key_file = {{ serveur_postfix_tls_dir }}/key.pem
|
|
smtpd_tls_security_level = may
|
|
smtpd_tls_protocols = >=TLSv1.2, !SSLv2, !SSLv3
|
|
smtp_tls_security_level = may
|
|
{% endif %}
|
|
|
|
# --- Restrictions de base ---
|
|
smtpd_helo_required = yes
|
|
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
|