# Postfix — relay-only — géré par Ansible (rôle postfix_relay) # Ne pas éditer manuellement compatibility_level = 2 myhostname = {{ postfix_myhostname }} myorigin = {{ postfix_myorigin }} # Relay SMTP externe relayhost = [{{ postfix_relay_host }}]:{{ postfix_relay_port }} # Écouter sur toutes les interfaces pour permettre au cluster de relayer inet_interfaces = all inet_protocols = ipv4 # Réseaux autorisés à relayer (pas un open relay) mynetworks = {{ postfix_mynetworks | join(' ') }} # Désactiver la livraison locale mydestination = local_recipient_maps = local_transport = error:local delivery disabled # TLS sortant smtp_tls_security_level = encrypt smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt smtp_tls_loglevel = 1 # Authentification SASL vers le relay smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous # Réécriture expéditeur — remplace root@lab.local par une adresse réelle {% if postfix_sender_email %} smtp_generic_maps = hash:/etc/postfix/generic {% endif %}