Réception :25, validation des boîtes par carte LDAP (attribut mail), remise LMTP réseau vers le mail-store Dovecot (virtual_transport lmtp), TLS via step_ca (pont de cert), aucune boîte locale. main.cf + ldap-mailboxes.cf, validé par postfix check. Bind LDAP: vault_openldap_admin. Validé statiquement (ansible-lint, syntax, rendu main.cf) ; déploiement à suivre. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
773 B
Django/Jinja
19 lines
773 B
Django/Jinja
#!/bin/sh
|
|
# Géré par Set-OPS (rôle serveur_postfix). Ne pas éditer à la main.
|
|
# Synchronise le certificat step_ca (client_pki, root:root 600) vers Postfix, puis recharge.
|
|
# Idempotent ; appelé au déploiement ET au renouvellement (unité path). La clé est lisible
|
|
# par le groupe postfix (smtpd tourne sous postfix).
|
|
set -eu
|
|
|
|
SRC_CERT="{{ serveur_postfix_tls_source_cert }}"
|
|
SRC_KEY="{{ serveur_postfix_tls_source_cle }}"
|
|
DST="{{ serveur_postfix_tls_dir }}"
|
|
|
|
[ -f "$SRC_CERT" ] && [ -f "$SRC_KEY" ] || exit 0
|
|
|
|
install -o root -g root -m 0644 "$SRC_CERT" "$DST/cert.pem"
|
|
install -o root -g postfix -m 0640 "$SRC_KEY" "$DST/key.pem"
|
|
|
|
if systemctl --quiet is-active postfix 2>/dev/null; then
|
|
systemctl reload postfix 2>/dev/null || systemctl restart postfix
|
|
fi
|