# Runbook serveur mail - scijoly.fr (HestiaCP)
Serveur : mail.scijoly.fr (Debian + HestiaCP), VM Proxmox 192.168.202.12
Derriere pfSense (NAT), AdGuard (DNS local), Nginx Proxy Manager (reverse proxy)
Internet -> pfSense (NAT, redirige 25/465/587/993 vers la VM)
-> VM Debian + HestiaCP (Exim4 = SMTP, Dovecot = IMAP/POP3)
-> NPM (reverse proxy HTTPS pour webmail.scijoly.fr)
- Certbot + OVH DNS validation (car NPM occupe le port 80)
- Renouvellement auto 2x/jour via certbot.timer
- Deploy hook : /root/deploy-hook-mail.sh
- Copie cert vers /usr/local/hestia/ssl/
- Permissions : root:Debian-exim, 644/640
- Restart exim4 + dovecot
- Cles API OVH : /root/.secrets/certbot/ovh.ini
- Permissions cle privee : chmod 640 (PAS 600) + chown root:Debian-exim
- DNS resolv.conf : doit pointer vers 8.8.8.8 et 1.1.1.1 (pas AdGuard local)
- NPM webmail : Scheme = https, Forward Port = 443
- openssl x509 -in /usr/local/hestia/ssl/certificate.crt -noout -dates
- ls -la /usr/local/hestia/ssl/certificate.key (attendu: -rw-r----- root Debian-exim)
- systemctl status exim4
- tail -f /var/log/exim4/mainlog