Rôle antispam sur edge-mta : Redis local, worker proxy en mode milter auto-scan (:11332), signature DKIM sortante (clé générée idempotente, enregistrement DNS affiché pour l'Étape B). Config par local.d/. Postfix branché via smtpd_milters (option serveur_postfix_rspamd_milter, milter_default_action=accept = tolérant si rspamd down). Prouvé : courriel traversant le milter → scanné (rspamc stat: 1) + signé DKIM (DKIM-Signature d=...), livré, lu en IMAP. Étape A (courriel interne) complète : dovecot + postfix + rspamd. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.6 KiB
Django/Jinja
44 lines
1.6 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 %}
|
|
|
|
{% 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 %}
|
|
|
|
# --- Restrictions de base ---
|
|
smtpd_helo_required = yes
|
|
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
|