fix(mail): certificat TLS de poste.io synchronisé depuis CapRover

Le certificat de mail.sans.pub servi par poste.io avait expiré le
2021-02-06 : son renouvellement Let's Encrypt intégré ne peut pas
fonctionner derrière le nginx de CapRover. Le script mail/mail-cert-sync.sh
(cron quotidien) copie désormais le certificat renouvelé par CapRover
et recharge Dovecot/Haraka. L'alerte du backup n'a plus besoin de -k.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre Martin
2026-10-03 13:43:22 +02:00
co-authored by Claude Opus 5.5
parent f974203973
commit 3fc9ae52c9
4 changed files with 48 additions and 4 deletions
+1 -2
View File
@@ -21,8 +21,7 @@ notify_failure() {
pass=$(sed -n 's/^ *SMTP_PASS: *//p' /root/backup/docker-compose.yaml)
printf 'From: system@sans.pub\r\nTo: %s\r\nSubject: [sans.pub] ECHEC backup restic\r\n\r\n%s\r\n\r\nVoir %s sur le serveur.\r\n' \
"$MAIL_TO" "$(printf '%s\n' "${ERRORS[@]}")" "$LOG" |
# -k : le certificat de poste.io a expiré (2021-02-06) ; connexion vers ce même serveur
curl -sS -k --url smtps://smtp.sans.pub:465 --mail-from system@sans.pub --mail-rcpt "$MAIL_TO" \
curl -sS --url smtps://mail.sans.pub:465 --mail-from system@sans.pub --mail-rcpt "$MAIL_TO" \
--user "system@sans.pub:$pass" --upload-file - || echo "envoi du mail d'alerte impossible"
}