2026-07-02 15:34:24 -04:00
|
|
|
# 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 }}
|
2026-07-02 17:31:22 -04:00
|
|
|
# Résolution via le plancher /etc/hosts (indépendant du DNS) pour la remise interne.
|
|
|
|
|
lmtp_host_lookup = native
|
2026-07-02 15:34:24 -04:00
|
|
|
|
|
|
|
|
{% 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 %}
|
|
|
|
|
|
2026-07-02 18:04:44 -04:00
|
|
|
{% if serveur_postfix_rspamd_milter %}
|
|
|
|
|
# --- Milter rspamd (antispam + signature DKIM), co-localisé sur edge-mta ---
|
|
|
|
|
smtpd_milters = inet:localhost:{{ serveur_postfix_rspamd_milter_port }}
|
|
|
|
|
non_smtpd_milters = $smtpd_milters
|
|
|
|
|
milter_protocol = 6
|
|
|
|
|
milter_default_action = accept
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
2026-07-02 15:34:24 -04:00
|
|
|
# --- Restrictions de base ---
|
|
|
|
|
smtpd_helo_required = yes
|
|
|
|
|
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
|