« Info:: apsi.net: INDEX » : différence entre les versions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 3 : | Ligne 3 : | ||
'''Le 02/01/2026:''' | '''Le 02/01/2026:''' | ||
<span id="configuration-actuelle-du-serveur-mail"></span> | |||
= Configuration Actuelle du Serveur Mail = | |||
'''Date de ce snapshot:''' 02 Janvier 2026 '''Serveurs:''' ovh1 (mail.apsi.net) + ovh2 (backup.apsi.net) | |||
----- | |||
<span id="infrastructure"></span> | |||
== Infrastructure == | |||
<span id="serveur-principal-ovh1"></span> | |||
=== Serveur Principal (ovh1) === | |||
'''Hostname:''' ovh1.pcstreet.org '''Domaine public:''' mail.apsi.net '''IP:''' 51.83.2.131 '''Rôle:''' Serveur mail principal (MX priorité 10) | |||
--- | '''Services actifs:''' - Postfix (SMTP) - Dovecot (IMAP/POP3) - OpenDKIM (signatures DKIM) - Apache2 (webmail Roundcube) - Fail2ban (protection brute-force) | ||
<span id="serveur-backup-ovh2"></span> | |||
=== Serveur Backup (ovh2) === | |||
'''Hostname:''' ovh2.pcstreet.org '''Domaine public:''' backup.apsi.net '''IP:''' 51.89.160.133 '''Rôle:''' Serveur relay backup (MX priorité 20) | |||
'''Services actifs:''' - Postfix (relay SMTP uniquement) - Fail2ban | |||
----- | |||
<span id="domaines-configurés"></span> | |||
== Domaines Configurés == | |||
=== apsi.net === | |||
'''Propriétaire:''' Pierre Chevalier '''Status:''' ✓ Actif '''MX Records:''' - 10 mail.apsi.net (51.83.2.131) - 20 backup.apsi.net (51.89.160.133) | |||
'''SPF:''' <code>v=spf1 mx -all</code> '''DKIM:''' mail._domainkey.apsi.net (clé 1024-bit) '''DMARC:''' <code>v=DMARC1; p=quarantine; rua=mailto:postmaster@apsi.net</code> | |||
--- | '''Services:''' - Webmail: https://apsi.net/roundcube/ - SMTP: mail.apsi.net:587 (STARTTLS) - IMAP: mail.apsi.net:143 (STARTTLS) ou :993 (SSL/TLS) | ||
=== voilou.nl === | |||
'''Propriétaire:''' Pierre Chevalier '''Status:''' ✓ Actif '''MX Records:''' - 10 mail.voilou.nl (51.83.2.131) - 20 backup.voilou.nl (51.89.160.133) | |||
/ | '''SPF:''' <code>v=spf1 mx -all</code> '''DKIM:''' mail._domainkey.voilou.nl (clé 1024-bit) '''DMARC:''' <code>v=DMARC1; p=quarantine; rua=mailto:postmaster@voilou.nl</code> | ||
-- | '''Services:''' - SMTP: mail.voilou.nl:587 (STARTTLS) - IMAP: mail.voilou.nl:143 (STARTTLS) ou :993 (SSL/TLS) | ||
----- | |||
<span id="comptes-email-configurés"></span> | |||
== Comptes Email Configurés == | |||
<span id="domaine-apsi.net"></span> | |||
=== Domaine apsi.net === | |||
{| | |||
!width="29%"| Adresse Email | |||
!width="25%"| Compte Unix | |||
!width="11%"| Home | |||
!width="17%"| Maildir | |||
!width="15%"| Taille | |||
|- | |||
| pchevalier@apsi.net | |||
| pchevalier | |||
| /home/pchevalier/ | |||
| ~/Maildir/ | |||
| 168K (4 emails) | |||
|- | |||
| contact@apsi.net | |||
| contact | |||
| /home/contact/ | |||
| ~/Maildir/ | |||
| 104K (5 emails) | |||
|} | |||
<span id="domaine-voilou.nl"></span> | |||
=== Domaine voilou.nl === | |||
{| | |||
!width="29%"| Adresse Email | |||
!width="25%"| Compte Unix | |||
!width="11%"| Home | |||
!width="17%"| Maildir | |||
!width="15%"| Taille | |||
|- | |||
| pchevalier@voilou.nl | |||
| pchevalier-voilou | |||
| /home/pchevalier-voilou/ | |||
| ~/Maildir/ | |||
| 104K (5 emails) | |||
|- | |||
| contact@voilou.nl | |||
| contact-voilou | |||
| /home/contact-voilou/ | |||
| ~/Maildir/ | |||
| 76K (1 email) | |||
|} | |||
'''Total:''' 4 comptes actifs | |||
'''Convention de nommage actuelle:''' - Domaine apsi.net: Noms simples (<code>pchevalier</code>, <code>contact</code>) - Domaine voilou.nl: Suffixe <code>-voilou</code> (<code>pchevalier-voilou</code>, <code>contact-voilou</code>) | |||
'''Convention recommandée (future migration):''' - Format: <code>utilisateur.domaine.tld</code> - Exemples: <code>pchevalier.apsi.net</code>, <code>pchevalier.voilou.nl</code> - Voir: <code>/root/IA/MAIL.APSI.NET/GUIDE_AJOUT_COMPTE.md</code> section “Renommer un Compte Existant” | |||
----- | |||
<span id="alias-virtuels-etcpostfixvirtual"></span> | |||
== Alias Virtuels (/etc/postfix/virtual) == | |||
/ | |||
# | <pre># Domaine apsi.net | ||
pchevalier@apsi.net pchevalier | |||
contact@apsi.net contact | |||
# | # Domaine voilou.nl | ||
pchevalier@voilou.nl pchevalier-voilou | |||
contact@voilou.nl contact-voilou</pre> | |||
'''Total:''' 4 alias | |||
----- | |||
- | <span id="certificats-ssltls"></span> | ||
== Certificats SSL/TLS == | |||
'''Émetteur:''' Let’s Encrypt (E8) '''Certificat principal:''' <code>/etc/letsencrypt/live/mail.apsi.net/</code> | |||
'''Domaines couverts (SAN):''' - mail.apsi.net - mail.voilou.nl | |||
'''Expiration:''' 01 Avril 2026 (88 jours restants au 02/01/2026) '''Renouvellement automatique:''' ✓ Actif (certbot.timer) '''Prochaine vérification:''' 02/01/2026 à 18:11 | |||
/ | |||
'''Services utilisant le certificat:''' - Postfix (SMTP STARTTLS) - Dovecot (IMAP/IMAPS) - Apache2 (HTTPS Roundcube) | |||
--- | ----- | ||
<span id="configuration-postfix"></span> | |||
== Configuration Postfix == | |||
- | '''Fichiers principaux:''' - <code>/etc/postfix/main.cf</code> - Configuration principale - <code>/etc/postfix/master.cf</code> - Services - <code>/etc/postfix/virtual</code> - Alias virtuels - <code>/etc/postfix/virtual.db</code> - Alias compilés | ||
- | |||
- | |||
- | |||
- | |||
'''Paramètres clés:''' | |||
**Version:** | <pre>myhostname = ovh1.pcstreet.org | ||
** | mydomain = apsi.net | ||
** | myorigin = $mydomain | ||
mydestination = $myhostname, apsi.net, voilou.nl, localhost | |||
virtual_alias_domains = | |||
virtual_alias_maps = hash:/etc/postfix/virtual | |||
# SASL (authentification SMTP) | |||
smtpd_sasl_type = dovecot | |||
smtpd_sasl_path = private/auth | |||
smtpd_sasl_auth_enable = yes | |||
# TLS | |||
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.apsi.net/fullchain.pem | |||
smtpd_tls_key_file = /etc/letsencrypt/live/mail.apsi.net/privkey.pem | |||
smtpd_tls_security_level = may | |||
# DKIM | |||
milter_default_action = accept | |||
smtpd_milters = inet:localhost:8891 | |||
non_smtpd_milters = $smtpd_milters</pre> | |||
----- | |||
<span id="configuration-dovecot"></span> | |||
== Configuration Dovecot == | |||
'''Fichiers principaux:''' - <code>/etc/dovecot/dovecot.conf</code> - Configuration principale - <code>/etc/dovecot/conf.d/10-auth.conf</code> - Authentification - <code>/etc/dovecot/conf.d/10-mail.conf</code> - Maildir - <code>/etc/dovecot/conf.d/10-ssl.conf</code> - SSL/TLS | |||
'''Paramètres clés:''' | |||
<pre># Maildir | |||
mail_location = maildir:~/Maildir | |||
# Authentification | |||
auth_mechanisms = plain login | |||
disable_plaintext_auth = no (car STARTTLS utilisé) | |||
# SSL/TLS | |||
ssl = yes | |||
ssl_cert = </etc/letsencrypt/live/mail.apsi.net/fullchain.pem | |||
ssl_key = </etc/letsencrypt/live/mail.apsi.net/privkey.pem | |||
# Protocols | |||
protocols = imap pop3 lmtp</pre> | |||
'''Ports:''' - 143: IMAP (STARTTLS) - 993: IMAPS (SSL/TLS) - 110: POP3 (STARTTLS) - 995: POP3S (SSL/TLS) | |||
----- | |||
<span id="configuration-opendkim"></span> | |||
== Configuration OpenDKIM == | |||
'''Fichiers principaux:''' - <code>/etc/opendkim.conf</code> - Configuration - <code>/etc/opendkim/KeyTable</code> - Table des clés - <code>/etc/opendkim/SigningTable</code> - Table de signature - <code>/etc/opendkim/TrustedHosts</code> - Hôtes de confiance | |||
'''Clés DKIM:''' | |||
<span id="apsi.net-1"></span> | |||
=== apsi.net === | |||
* Sélecteur: <code>mail</code> | |||
* Clé privée: <code>/etc/opendkim/keys/apsi.net/mail.private</code> | |||
* Clé publique (DNS): <code>mail._domainkey.apsi.net</code> | |||
* Taille: 1024-bit (pour compatibilité PowerAdmin) | |||
* Status: ✓ Valide | |||
<pre>p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDoDc7b7mrS9IEkE331OW/1wYAoCWfaSoU9orNrEm7zclCCYh62hjYJMbQT5rVcISH/hU3uOTUyGjUwqFw/emYw3CnwJwwOSgqM44n30cBwWP3+piy+DnPXFZpJDR4iBBYTygbKXu3X0BCAgX7pnD79kqLxaRjktn3sBYa/RP9ZZQIDAQAB</pre> | |||
<span id="voilou.nl-1"></span> | |||
=== voilou.nl === | |||
* Sélecteur: <code>mail</code> | |||
* Clé privée: <code>/etc/opendkim/keys/voilou.nl/mail.private</code> | |||
* Clé publique (DNS): <code>mail._domainkey.voilou.nl</code> | |||
* Taille: 1024-bit | |||
* Status: ✓ Valide | |||
<pre>p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMonQQKDHEUPkcQFr0Uxeaqpw0tF2pm/NiEIvPBM7TCmLZUJ9tu9yviBO9Mrrn2hDjdNSgAxWNWIzzRPIlpfCrRnUdqOOp+NeftiqsBP02pg8bQDQxgA+InGSgvQYhGd6BDF6yxA8lf7eNkVEDGrPfnNRLSJMWzJveTpzVIjIwfwIDAQAB</pre> | |||
----- | |||
<span id="configuration-roundcube"></span> | |||
== Configuration Roundcube == | |||
'''URL:''' https://apsi.net/roundcube/ '''Version:''' 1.6.x '''Emplacement:''' <code>/var/lib/roundcube/</code> | |||
'''Base de données:''' - Type: MySQL/MariaDB - Nom: <code>roundcube</code> - Utilisateur: <code>roundcube</code> - Socket: <code>/var/run/mysqld/mysqld.sock</code> | |||
'''Configuration:''' - Fichier: <code>/etc/roundcube/config.inc.php</code> - Serveur IMAP: localhost:143 - Serveur SMTP: localhost:587 - Authentification: Automatique (utilisateur Unix) | |||
'''Plugins actifs:''' - archive - zipdownload - password (changement de mot de passe) | |||
----- | |||
<span id="configuration-fail2ban"></span> | |||
== Configuration Fail2ban == | |||
'''Jails actifs:''' | |||
=== postfix-sasl === | |||
* Filtre: <code>/etc/fail2ban/filter.d/postfix-sasl.conf</code> | |||
* Log: <code>/var/log/mail.log</code> | |||
* Ban: 10 minutes | |||
* Findtime: 10 minutes | |||
* Maxretry: 5 | |||
* IP bannies actuellement: 0 | |||
=== dovecot === | |||
* Filtre: <code>/etc/fail2ban/filter.d/dovecot.conf</code> | |||
* Log: <code>/var/log/mail.log</code> | |||
* Ban: 10 minutes | |||
* Findtime: 10 minutes | |||
* Maxretry: 5 | |||
* IP bannies actuellement: 0 | |||
=== sshd === | |||
* Filtre: Défaut | |||
* Log: <code>/var/log/auth.log</code> | |||
* Ban: 10 minutes | |||
* IP bannies actuellement: 38 | |||
'''Actions:''' - <code>iptables-multiport</code> (bloc IP) - Email à admin (optionnel) | |||
----- | |||
<span id="configuration-relay-backup-ovh2"></span> | |||
== Configuration Relay Backup (ovh2) == | |||
'''Fonction:''' Relay backup pour ovh1 '''Configuration:''' <code>/etc/postfix/main.cf</code> | |||
'''Paramètres principaux:''' | |||
<pre>relay_domains = apsi.net, voilou.nl | |||
relay_transport = smtp:[mail.apsi.net]:25 | |||
myhostname = ovh2.pcstreet.org</pre> | |||
'''Comportement:''' - Reçoit les emails si ovh1 est inaccessible (MX 20) - Met les emails en queue - Transmet à ovh1 dès que disponible - Pas de boîtes locales | |||
'''Monitoring:''' <code>/root/scripts/checkOvh2.sh</code> (quotidien à 7h) | |||
----- | |||
<span id="scripts-de-diagnostic-actifs"></span> | |||
== Scripts de Diagnostic Actifs == | |||
<span id="checkovh1.sh"></span> | |||
=== checkOvh1.sh === | |||
* '''Serveur:''' ovh1 | |||
* '''Fréquence:''' Quotidien (7h00 via cron) | |||
* '''Email:''' pchevalier@pcstreet.fr | |||
* '''Rapports:''' <code>/var/log/check-ovh1/</code> | |||
* '''Fonction:''' Diagnostic complet (mail + SSL) | |||
<span id="checkovh2.sh"></span> | |||
=== checkOvh2.sh === | |||
* '''Serveur:''' ovh2 | |||
* '''Fréquence:''' Quotidien (7h00 via cron) | |||
* '''Email:''' pchevalier@pcstreet.fr | |||
* '''Rapports:''' <code>/var/log/check-ovh2/</code> | |||
* '''Fonction:''' Diagnostic relay | |||
<span id="sous-scripts"></span> | |||
=== Sous-scripts === | |||
* <code>mail-diagnostic.sh</code> - Diagnostic serveur mail | |||
* <code>test-certificates.sh</code> - Test certificats SSL | |||
* <code>renew-certificates.sh</code> - Renouvellement certificats | |||
'''Voir:''' <code>/root/scripts/README-SCRIPTS.md</code> pour détails | |||
----- | |||
<span id="tâches-cron-actives"></span> | |||
== Tâches Cron Actives == | |||
=== ovh1 === | |||
<syntaxhighlight lang="bash"># Diagnostic quotidien à 7h | |||
0 7 * * * /root/scripts/checkOvh1.sh | |||
# Renouvellement certificat (timer systemd + backup cron) | |||
0 0,12 * * * /usr/bin/certbot renew --quiet</syntaxhighlight> | |||
=== ovh2 === | |||
<syntaxhighlight lang="bash"># Diagnostic quotidien à 7h | |||
0 7 * * * /root/scripts/checkOvh2.sh</syntaxhighlight> | |||
----- | |||
<span id="ports-ouverts-firewall"></span> | |||
== Ports Ouverts (Firewall) == | |||
<span id="ovh1-1"></span> | |||
=== ovh1 === | |||
{| | |||
! Port | |||
! Service | |||
! Protocole | |||
! Description | |||
|- | |||
| 22 | |||
| SSH | |||
| TCP | |||
| Administration | |||
|- | |||
| 25 | |||
| SMTP | |||
| TCP | |||
| Réception emails (MX) | |||
|- | |||
| 80 | |||
| HTTP | |||
| TCP | |||
| Redirect HTTPS | |||
|- | |||
| 143 | |||
| IMAP | |||
| TCP | |||
| STARTTLS | |||
|- | |||
| 443 | |||
| HTTPS | |||
| TCP | |||
| Roundcube | |||
|- | |||
| 587 | |||
| Submission | |||
| TCP | |||
| SMTP authentifié (STARTTLS) | |||
|- | |||
| 993 | |||
| IMAPS | |||
| TCP | |||
| IMAP SSL/TLS | |||
|} | |||
<span id="ovh2-1"></span> | |||
=== ovh2 === | |||
{| | |||
! Port | |||
! Service | |||
! Protocole | |||
! Description | |||
|- | |||
| 22 | |||
| SSH | |||
| TCP | |||
| Administration | |||
|- | |||
| 25 | |||
| SMTP | |||
| TCP | |||
| Relay backup | |||
|} | |||
----- | |||
<span id="statistiques-système"></span> | |||
== Statistiques Système == | |||
'''Date:''' 02 Janvier 2026 | |||
<span id="ovh1-2"></span> | |||
=== ovh1 === | |||
'''Espace disque:''' - Partition: / - Taille: 3.6T - Utilisé: 2.4T (70%) - Disponible: 1.2T | |||
'''Services:''' - postfix: ✓ Actif - dovecot: ✓ Actif - opendkim: ✓ Actif - apache2: ✓ Actif - fail2ban: ✓ Actif | |||
'''Queue mail:''' - Emails en attente: 0 - Status: ✓ Queue vide | |||
'''Certificat SSL:''' - Jours restants: 88 - Status: ✓ OK (> 30 jours) | |||
'''Score de santé global:''' - Mail: 80/90 (88%) - SSL: 100/100 (100%) | |||
<span id="ovh2-2"></span> | |||
=== ovh2 === | |||
'''Services:''' - postfix: ✓ Actif - fail2ban: ✓ Actif | |||
'''Queue relay:''' - Emails en attente: 0 - Connectivité ovh1: ✓ OK | |||
'''Score de santé relay:''' 100/100 (100%) | |||
----- | |||
<span id="erreurs-connues-non-critiques"></span> | |||
== Erreurs Connues (Non-Critiques) == | |||
<span id="ssl-routines-errors-dovecot"></span> | |||
=== SSL routines errors (Dovecot) === | |||
<pre>error:0A000102:SSL routines::unsupported protocol | |||
error:0A00010B:SSL routines::wrong version number</pre> | |||
'''Cause:''' Scanners/bots utilisant de vieux protocoles SSL '''Impact:''' Aucun (connexions refusées comme prévu) '''Action:''' Aucune (comportement normal) | |||
<span id="sasl-login-authentication-failed"></span> | |||
=== SASL LOGIN authentication failed === | |||
<pre>SASL LOGIN authentication failed: Invalid authentication mechanism</pre> | |||
'''Cause:''' Tentatives d’authentification de spammers/scanners '''Impact:''' Aucun (fail2ban peut bannir si répété) '''Action:''' Aucune (comportement normal) | |||
<span id="http-requests-on-smtp-port"></span> | |||
=== HTTP requests on SMTP port === | |||
<pre>warning: non-SMTP command from unknown[x.x.x.x]: GET / HTTP/1.1</pre> | |||
'''Cause:''' Scanners web testant le port 25 '''Impact:''' Aucun (requêtes ignorées) '''Action:''' Aucune (comportement normal) | |||
----- | |||
<span id="documentation-disponible"></span> | |||
== Documentation Disponible == | |||
<span id="guides-dans-rootiamail.apsi.net"></span> | |||
=== Guides (dans /root/IA/MAIL.APSI.NET/) === | |||
{| | |||
! Document | |||
! Taille | |||
! Description | |||
|- | |||
| INDEX.md | |||
| 4.8K | |||
| Index et navigation | |||
|- | |||
| README.md | |||
| 14K | |||
| Vue d’ensemble et démarrage rapide | |||
|- | |||
| DOCUMENTATION_MAIL_SERVER.md | |||
| 14K | |||
| Architecture technique | |||
|- | |||
| GUIDE_GESTION_MAIL.md | |||
| 12K | |||
| Gestion quotidienne | |||
|- | |||
| GUIDE_AJOUT_COMPTE.md | |||
| 32K | |||
| Ajouter un compte email | |||
|- | |||
| GUIDE_AJOUT_DOMAINE.md | |||
| 17K | |||
| Ajouter un domaine | |||
|- | |||
| GUIDE_CERTIFICATS_LETSENCRYPT.md | |||
| 20K | |||
| Gestion certificats | |||
|- | |||
| TROUBLESHOOTING.md | |||
| 15K | |||
| Dépannage | |||
|- | |||
| DNS_RECORDS_SPF_DKIM_DMARC.txt | |||
| 6.2K | |||
| Configuration DNS | |||
|} | |||
<span id="scripts-dans-rootscripts"></span> | |||
=== Scripts (dans /root/scripts/) === | |||
{| | |||
! Document | |||
! Description | |||
|- | |||
| README-SCRIPTS.md | |||
| Documentation complète des scripts | |||
|} | |||
'''Total documentation:''' ~308K dans 11 fichiers markdown | |||
----- | |||
<span id="contacts-et-administration"></span> | |||
== Contacts et Administration == | |||
'''Administrateur:''' Pierre Chevalier '''Email technique:''' pchevalier@pcstreet.fr (rapports de diagnostic) '''Email contact:''' contact@apsi.net | |||
'''Hébergeur:''' - ovh1: OVH (France) - ovh2: OVH (France) | |||
'''DNS:''' Configuré chez le registrar du domaine | |||
----- | |||
<span id="changelog-récent"></span> | |||
== Changelog Récent == | |||
<span id="janvier-2026"></span> | |||
=== 02 Janvier 2026 === | |||
'''Scripts de diagnostic:''' - ✅ Création de <code>checkOvh1.sh</code> - Diagnostic ovh1 avec envoi email - ✅ Création de <code>checkOvh2.sh</code> - Diagnostic ovh2 relay - ✅ Amélioration <code>mail-diagnostic.sh</code> - Affichage clés DKIM, alertes certificats - ✅ Correction bug comptage alias virtuels | |||
'''Documentation:''' - ✅ Ajout section “Renommer un Compte Existant” dans GUIDE_AJOUT_COMPTE.md - ✅ Convention de nommage avec points (pchevalier.apsi.net) - ✅ Script <code>rename-accounts.sh</code> pour migration - ✅ Mise à jour README-SCRIPTS.md v2.0 - ✅ Création CONFIGURATION_ACTUELLE.md (ce document) | |||
'''Configuration:''' - ✅ Suppression codes couleur ANSI dans emails de diagnostic - ✅ Rapports sauvegardés dans /var/log/check-ovh[12]/ - ✅ Nettoyage automatique rapports > 30 jours | |||
----- | |||
<span id="à-faire-todo"></span> | |||
== À Faire (Todo) == | |||
<span id="court-terme-optionnel"></span> | |||
=== Court terme (optionnel) === | |||
* ☐ Migration vers nouvelle convention de nommage (pchevalier.apsi.net) | |||
* ☐ Configurer backup automatique des Maildir (optionnel) | |||
* ☐ Augmenter DKIM à 2048-bit (si PowerAdmin compatible) | |||
<span id="long-terme-optionnel"></span> | |||
=== Long terme (optionnel) === | |||
* ☐ Ajouter des domaines supplémentaires si nécessaire | |||
* ☐ Configurer SpamAssassin (anti-spam) | |||
* ☐ Configurer ClamAV (antivirus) | |||
----- | |||
'''Document créé le:''' 02 Janvier 2026 '''Dernière mise à jour:''' 02 Janvier 2026 '''Version:''' 1.0 | |||
Version du 2 janvier 2026 à 09:43
KEYWORDS: MAIL, SERVER, APSI.NET, OVH1, MAIL.APSI.NET, OVH2, BACKUP.APSI.NET, INDEX
Le 02/01/2026:
Configuration Actuelle du Serveur Mail
Date de ce snapshot: 02 Janvier 2026 Serveurs: ovh1 (mail.apsi.net) + ovh2 (backup.apsi.net)
Infrastructure
Serveur Principal (ovh1)
Hostname: ovh1.pcstreet.org Domaine public: mail.apsi.net IP: 51.83.2.131 Rôle: Serveur mail principal (MX priorité 10)
Services actifs: - Postfix (SMTP) - Dovecot (IMAP/POP3) - OpenDKIM (signatures DKIM) - Apache2 (webmail Roundcube) - Fail2ban (protection brute-force)
Serveur Backup (ovh2)
Hostname: ovh2.pcstreet.org Domaine public: backup.apsi.net IP: 51.89.160.133 Rôle: Serveur relay backup (MX priorité 20)
Services actifs: - Postfix (relay SMTP uniquement) - Fail2ban
Domaines Configurés
apsi.net
Propriétaire: Pierre Chevalier Status: ✓ Actif MX Records: - 10 mail.apsi.net (51.83.2.131) - 20 backup.apsi.net (51.89.160.133)
SPF: v=spf1 mx -all DKIM: mail._domainkey.apsi.net (clé 1024-bit) DMARC: v=DMARC1; p=quarantine; rua=mailto:postmaster@apsi.net
Services: - Webmail: https://apsi.net/roundcube/ - SMTP: mail.apsi.net:587 (STARTTLS) - IMAP: mail.apsi.net:143 (STARTTLS) ou :993 (SSL/TLS)
voilou.nl
Propriétaire: Pierre Chevalier Status: ✓ Actif MX Records: - 10 mail.voilou.nl (51.83.2.131) - 20 backup.voilou.nl (51.89.160.133)
SPF: v=spf1 mx -all DKIM: mail._domainkey.voilou.nl (clé 1024-bit) DMARC: v=DMARC1; p=quarantine; rua=mailto:postmaster@voilou.nl
Services: - SMTP: mail.voilou.nl:587 (STARTTLS) - IMAP: mail.voilou.nl:143 (STARTTLS) ou :993 (SSL/TLS)
Comptes Email Configurés
Domaine apsi.net
| Adresse Email | Compte Unix | Home | Maildir | Taille |
|---|---|---|---|---|
| pchevalier@apsi.net | pchevalier | /home/pchevalier/ | ~/Maildir/ | 168K (4 emails) |
| contact@apsi.net | contact | /home/contact/ | ~/Maildir/ | 104K (5 emails) |
Domaine voilou.nl
| Adresse Email | Compte Unix | Home | Maildir | Taille |
|---|---|---|---|---|
| pchevalier@voilou.nl | pchevalier-voilou | /home/pchevalier-voilou/ | ~/Maildir/ | 104K (5 emails) |
| contact@voilou.nl | contact-voilou | /home/contact-voilou/ | ~/Maildir/ | 76K (1 email) |
Total: 4 comptes actifs
Convention de nommage actuelle: - Domaine apsi.net: Noms simples (pchevalier, contact) - Domaine voilou.nl: Suffixe -voilou (pchevalier-voilou, contact-voilou)
Convention recommandée (future migration): - Format: utilisateur.domaine.tld - Exemples: pchevalier.apsi.net, pchevalier.voilou.nl - Voir: /root/IA/MAIL.APSI.NET/GUIDE_AJOUT_COMPTE.md section “Renommer un Compte Existant”
Alias Virtuels (/etc/postfix/virtual)
# Domaine apsi.net pchevalier@apsi.net pchevalier contact@apsi.net contact # Domaine voilou.nl pchevalier@voilou.nl pchevalier-voilou contact@voilou.nl contact-voilou
Total: 4 alias
Certificats SSL/TLS
Émetteur: Let’s Encrypt (E8) Certificat principal: /etc/letsencrypt/live/mail.apsi.net/
Domaines couverts (SAN): - mail.apsi.net - mail.voilou.nl
Expiration: 01 Avril 2026 (88 jours restants au 02/01/2026) Renouvellement automatique: ✓ Actif (certbot.timer) Prochaine vérification: 02/01/2026 à 18:11
Services utilisant le certificat: - Postfix (SMTP STARTTLS) - Dovecot (IMAP/IMAPS) - Apache2 (HTTPS Roundcube)
Configuration Postfix
Fichiers principaux: - /etc/postfix/main.cf - Configuration principale - /etc/postfix/master.cf - Services - /etc/postfix/virtual - Alias virtuels - /etc/postfix/virtual.db - Alias compilés
Paramètres clés:
myhostname = ovh1.pcstreet.org mydomain = apsi.net myorigin = $mydomain mydestination = $myhostname, apsi.net, voilou.nl, localhost virtual_alias_domains = virtual_alias_maps = hash:/etc/postfix/virtual # SASL (authentification SMTP) smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes # TLS smtpd_tls_cert_file = /etc/letsencrypt/live/mail.apsi.net/fullchain.pem smtpd_tls_key_file = /etc/letsencrypt/live/mail.apsi.net/privkey.pem smtpd_tls_security_level = may # DKIM milter_default_action = accept smtpd_milters = inet:localhost:8891 non_smtpd_milters = $smtpd_milters
Configuration Dovecot
Fichiers principaux: - /etc/dovecot/dovecot.conf - Configuration principale - /etc/dovecot/conf.d/10-auth.conf - Authentification - /etc/dovecot/conf.d/10-mail.conf - Maildir - /etc/dovecot/conf.d/10-ssl.conf - SSL/TLS
Paramètres clés:
# Maildir mail_location = maildir:~/Maildir # Authentification auth_mechanisms = plain login disable_plaintext_auth = no (car STARTTLS utilisé) # SSL/TLS ssl = yes ssl_cert = </etc/letsencrypt/live/mail.apsi.net/fullchain.pem ssl_key = </etc/letsencrypt/live/mail.apsi.net/privkey.pem # Protocols protocols = imap pop3 lmtp
Ports: - 143: IMAP (STARTTLS) - 993: IMAPS (SSL/TLS) - 110: POP3 (STARTTLS) - 995: POP3S (SSL/TLS)
Configuration OpenDKIM
Fichiers principaux: - /etc/opendkim.conf - Configuration - /etc/opendkim/KeyTable - Table des clés - /etc/opendkim/SigningTable - Table de signature - /etc/opendkim/TrustedHosts - Hôtes de confiance
Clés DKIM:
apsi.net
- Sélecteur:
mail - Clé privée:
/etc/opendkim/keys/apsi.net/mail.private - Clé publique (DNS):
mail._domainkey.apsi.net - Taille: 1024-bit (pour compatibilité PowerAdmin)
- Status: ✓ Valide
p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDoDc7b7mrS9IEkE331OW/1wYAoCWfaSoU9orNrEm7zclCCYh62hjYJMbQT5rVcISH/hU3uOTUyGjUwqFw/emYw3CnwJwwOSgqM44n30cBwWP3+piy+DnPXFZpJDR4iBBYTygbKXu3X0BCAgX7pnD79kqLxaRjktn3sBYa/RP9ZZQIDAQAB
voilou.nl
- Sélecteur:
mail - Clé privée:
/etc/opendkim/keys/voilou.nl/mail.private - Clé publique (DNS):
mail._domainkey.voilou.nl - Taille: 1024-bit
- Status: ✓ Valide
p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMonQQKDHEUPkcQFr0Uxeaqpw0tF2pm/NiEIvPBM7TCmLZUJ9tu9yviBO9Mrrn2hDjdNSgAxWNWIzzRPIlpfCrRnUdqOOp+NeftiqsBP02pg8bQDQxgA+InGSgvQYhGd6BDF6yxA8lf7eNkVEDGrPfnNRLSJMWzJveTpzVIjIwfwIDAQAB
Configuration Roundcube
URL: https://apsi.net/roundcube/ Version: 1.6.x Emplacement: /var/lib/roundcube/
Base de données: - Type: MySQL/MariaDB - Nom: roundcube - Utilisateur: roundcube - Socket: /var/run/mysqld/mysqld.sock
Configuration: - Fichier: /etc/roundcube/config.inc.php - Serveur IMAP: localhost:143 - Serveur SMTP: localhost:587 - Authentification: Automatique (utilisateur Unix)
Plugins actifs: - archive - zipdownload - password (changement de mot de passe)
Configuration Fail2ban
Jails actifs:
postfix-sasl
- Filtre:
/etc/fail2ban/filter.d/postfix-sasl.conf - Log:
/var/log/mail.log - Ban: 10 minutes
- Findtime: 10 minutes
- Maxretry: 5
- IP bannies actuellement: 0
dovecot
- Filtre:
/etc/fail2ban/filter.d/dovecot.conf - Log:
/var/log/mail.log - Ban: 10 minutes
- Findtime: 10 minutes
- Maxretry: 5
- IP bannies actuellement: 0
sshd
- Filtre: Défaut
- Log:
/var/log/auth.log - Ban: 10 minutes
- IP bannies actuellement: 38
Actions: - iptables-multiport (bloc IP) - Email à admin (optionnel)
Configuration Relay Backup (ovh2)
Fonction: Relay backup pour ovh1 Configuration: /etc/postfix/main.cf
Paramètres principaux:
relay_domains = apsi.net, voilou.nl relay_transport = smtp:[mail.apsi.net]:25 myhostname = ovh2.pcstreet.org
Comportement: - Reçoit les emails si ovh1 est inaccessible (MX 20) - Met les emails en queue - Transmet à ovh1 dès que disponible - Pas de boîtes locales
Monitoring: /root/scripts/checkOvh2.sh (quotidien à 7h)
Scripts de Diagnostic Actifs
checkOvh1.sh
- Serveur: ovh1
- Fréquence: Quotidien (7h00 via cron)
- Email: pchevalier@pcstreet.fr
- Rapports:
/var/log/check-ovh1/ - Fonction: Diagnostic complet (mail + SSL)
checkOvh2.sh
- Serveur: ovh2
- Fréquence: Quotidien (7h00 via cron)
- Email: pchevalier@pcstreet.fr
- Rapports:
/var/log/check-ovh2/ - Fonction: Diagnostic relay
Sous-scripts
mail-diagnostic.sh- Diagnostic serveur mailtest-certificates.sh- Test certificats SSLrenew-certificates.sh- Renouvellement certificats
Voir: /root/scripts/README-SCRIPTS.md pour détails
Tâches Cron Actives
ovh1
# Diagnostic quotidien à 7h
0 7 * * * /root/scripts/checkOvh1.sh
# Renouvellement certificat (timer systemd + backup cron)
0 0,12 * * * /usr/bin/certbot renew --quiet
ovh2
# Diagnostic quotidien à 7h
0 7 * * * /root/scripts/checkOvh2.sh
Ports Ouverts (Firewall)
ovh1
| Port | Service | Protocole | Description |
|---|---|---|---|
| 22 | SSH | TCP | Administration |
| 25 | SMTP | TCP | Réception emails (MX) |
| 80 | HTTP | TCP | Redirect HTTPS |
| 143 | IMAP | TCP | STARTTLS |
| 443 | HTTPS | TCP | Roundcube |
| 587 | Submission | TCP | SMTP authentifié (STARTTLS) |
| 993 | IMAPS | TCP | IMAP SSL/TLS |
ovh2
| Port | Service | Protocole | Description |
|---|---|---|---|
| 22 | SSH | TCP | Administration |
| 25 | SMTP | TCP | Relay backup |
Statistiques Système
Date: 02 Janvier 2026
ovh1
Espace disque: - Partition: / - Taille: 3.6T - Utilisé: 2.4T (70%) - Disponible: 1.2T
Services: - postfix: ✓ Actif - dovecot: ✓ Actif - opendkim: ✓ Actif - apache2: ✓ Actif - fail2ban: ✓ Actif
Queue mail: - Emails en attente: 0 - Status: ✓ Queue vide
Certificat SSL: - Jours restants: 88 - Status: ✓ OK (> 30 jours)
Score de santé global: - Mail: 80/90 (88%) - SSL: 100/100 (100%)
ovh2
Services: - postfix: ✓ Actif - fail2ban: ✓ Actif
Queue relay: - Emails en attente: 0 - Connectivité ovh1: ✓ OK
Score de santé relay: 100/100 (100%)
Erreurs Connues (Non-Critiques)
SSL routines errors (Dovecot)
error:0A000102:SSL routines::unsupported protocol error:0A00010B:SSL routines::wrong version number
Cause: Scanners/bots utilisant de vieux protocoles SSL Impact: Aucun (connexions refusées comme prévu) Action: Aucune (comportement normal)
SASL LOGIN authentication failed
SASL LOGIN authentication failed: Invalid authentication mechanism
Cause: Tentatives d’authentification de spammers/scanners Impact: Aucun (fail2ban peut bannir si répété) Action: Aucune (comportement normal)
HTTP requests on SMTP port
warning: non-SMTP command from unknown[x.x.x.x]: GET / HTTP/1.1
Cause: Scanners web testant le port 25 Impact: Aucun (requêtes ignorées) Action: Aucune (comportement normal)
Documentation Disponible
Guides (dans /root/IA/MAIL.APSI.NET/)
| Document | Taille | Description |
|---|---|---|
| INDEX.md | 4.8K | Index et navigation |
| README.md | 14K | Vue d’ensemble et démarrage rapide |
| DOCUMENTATION_MAIL_SERVER.md | 14K | Architecture technique |
| GUIDE_GESTION_MAIL.md | 12K | Gestion quotidienne |
| GUIDE_AJOUT_COMPTE.md | 32K | Ajouter un compte email |
| GUIDE_AJOUT_DOMAINE.md | 17K | Ajouter un domaine |
| GUIDE_CERTIFICATS_LETSENCRYPT.md | 20K | Gestion certificats |
| TROUBLESHOOTING.md | 15K | Dépannage |
| DNS_RECORDS_SPF_DKIM_DMARC.txt | 6.2K | Configuration DNS |
Scripts (dans /root/scripts/)
| Document | Description |
|---|---|
| README-SCRIPTS.md | Documentation complète des scripts |
Total documentation: ~308K dans 11 fichiers markdown
Contacts et Administration
Administrateur: Pierre Chevalier Email technique: pchevalier@pcstreet.fr (rapports de diagnostic) Email contact: contact@apsi.net
Hébergeur: - ovh1: OVH (France) - ovh2: OVH (France)
DNS: Configuré chez le registrar du domaine
Changelog Récent
02 Janvier 2026
Scripts de diagnostic: - ✅ Création de checkOvh1.sh - Diagnostic ovh1 avec envoi email - ✅ Création de checkOvh2.sh - Diagnostic ovh2 relay - ✅ Amélioration mail-diagnostic.sh - Affichage clés DKIM, alertes certificats - ✅ Correction bug comptage alias virtuels
Documentation: - ✅ Ajout section “Renommer un Compte Existant” dans GUIDE_AJOUT_COMPTE.md - ✅ Convention de nommage avec points (pchevalier.apsi.net) - ✅ Script rename-accounts.sh pour migration - ✅ Mise à jour README-SCRIPTS.md v2.0 - ✅ Création CONFIGURATION_ACTUELLE.md (ce document)
Configuration: - ✅ Suppression codes couleur ANSI dans emails de diagnostic - ✅ Rapports sauvegardés dans /var/log/check-ovh[12]/ - ✅ Nettoyage automatique rapports > 30 jours
À Faire (Todo)
Court terme (optionnel)
- ☐ Migration vers nouvelle convention de nommage (pchevalier.apsi.net)
- ☐ Configurer backup automatique des Maildir (optionnel)
- ☐ Augmenter DKIM à 2048-bit (si PowerAdmin compatible)
Long terme (optionnel)
- ☐ Ajouter des domaines supplémentaires si nécessaire
- ☐ Configurer SpamAssassin (anti-spam)
- ☐ Configurer ClamAV (antivirus)
Document créé le: 02 Janvier 2026 Dernière mise à jour: 02 Janvier 2026 Version: 1.0