Funk-lab/ansible/roles/postfix_relay/templates/main.cf.j2
alkatrazz 8da92cb721 feat(postfix): relay SMTP Gmail + suppression règles Conan nftables
- postfix_relay: switch Brevo → Gmail SMTP (smtp.gmail.com:587, App Password)
- smtp_generic_maps: réécriture expéditeur root@lab.localaliyesilkaya93@gmail.com
- nftables: suppression DNAT/NAT Conan Exiles (ports 7777/7778/27015)
- gateway handler: reloaded → restarted (flush complet des règles nft)
- hermes_agent: pip → uv pour installation qdrant-client (venv sans pip binaire)
- CLAUDE.md: corrections funk-cluster, hermes-switch, RAID5, postfix
- docs: admin/infra/email.md — procédure complète relay Gmail

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 16:46:42 +02:00

38 lines
1.1 KiB
Django/Jinja

# 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 %}