« Info:: apsi.net: INDEX » : différence entre les versions

De wiki_pcwiki2
Aller à la navigationAller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
 
Ligne 1 : Ligne 1 :
KEYWORDS: MAIL, SERVER, APSI.NET, OVH1, MAIL.APSI.NET, OVH2, BACKUP.APSI.NET, INDEX
KEYWORDS: MAIL, SERVER, APSI.NET, OVH1, MAIL.APSI.NET, OVH2, BACKUP.APSI.NET, INDEX


  '''Le 02/01/2026:'''
  '''Le 04/01/2026:'''
<span id="index-complet---documentation-serveur-mail"></span>
= INDEX COMPLET - Documentation Serveur Mail =


<span id="configuration-actuelle-du-serveur-mail"></span>
'''Infrastructure:''' ovh1 (mail.apsi.net) + ovh2 (backup.apsi.net) '''Domaines:''' apsi.net, voilou.nl, thabard.com '''Dernière mise à jour:''' 04 Janvier 2026
= 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>
<span id="comment-utiliser-cette-documentation"></span>
== Infrastructure ==
== 📖 COMMENT UTILISER CETTE DOCUMENTATION ==


<span id="serveur-principal-ovh1"></span>
<span id="je-suis-nouveau---par-où-commencer"></span>
=== Serveur Principal (ovh1) ===
=== Je suis nouveau - Par où commencer? ===


'''Hostname:''' ovh1.pcstreet.org '''Domaine public:''' mail.apsi.net '''IP:''' 51.83.2.131 '''Rôle:''' Serveur mail principal (MX priorité 10)
# '''README.md''' - Commencez ici! Vue d’ensemble et démarrage rapide
# '''DOCUMENTATION_MAIL_SERVER.md''' - Comprendre l’architecture
# '''GUIDE_GESTION_MAIL.md''' - Apprendre les commandes de base
# '''TROUBLESHOOTING.md''' - Résoudre les problèmes courants


'''Services actifs:''' - Postfix (SMTP) - Dovecot (IMAP/POP3) - OpenDKIM (signatures DKIM) - Apache2 (webmail Roundcube) - Fail2ban (protection brute-force)
<span id="je-veux-faire-quelque-chose-de-spécifique"></span>
=== Je veux faire quelque chose de spécifique ===


<span id="serveur-backup-ovh2"></span>
{| class="wikitable"
=== Serveur Backup (ovh2) ===
|-
 
! Tâche
'''Hostname:''' ovh2.pcstreet.org '''Domaine public:''' backup.apsi.net '''IP:''' 51.89.160.133 '''Rôle:''' Serveur relay backup (MX priorité 20)
! Document
 
|-
'''Services actifs:''' - Postfix (relay SMTP uniquement) - Fail2ban
| Ajouter une adresse email
| '''GUIDE_AJOUT_COMPTE.md'''
|-
| Ajouter un nouveau domaine
| '''GUIDE_AJOUT_DOMAINE.md'''
|-
| Gérer les mails au quotidien
| '''GUIDE_GESTION_MAIL.md'''
|-
| Configurer le filtrage anti-spam
| '''080-GUIDE_RSPAMD.md'''
|-
| Résoudre un problème
| '''TROUBLESHOOTING.md'''
|-
| Configurer le DNS
| '''DNS_RECORDS_SPF_DKIM_DMARC.txt'''
|-
| Utiliser les scripts
| '''/root/scripts/README-SCRIPTS.md'''
|}




-----
-----


<span id="domaines-configurés"></span>
<span id="documents-disponibles"></span>
== Domaines Configurés ==
== 📚 DOCUMENTS DISPONIBLES ==


=== apsi.net ===
<span id="guides-principaux"></span>
=== 🎯 Guides Principaux ===


'''Propriétaire:''' Pierre Chevalier '''Status:''' ✓ Actif '''MX Records:''' - 10 mail.apsi.net (51.83.2.131) - 20 backup.apsi.net (51.89.160.133)
{| class="wikitable"
 
|-
'''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>
! Document
 
! Taille
'''Services:''' - Webmail: https://apsi.net/roundcube/ - SMTP: mail.apsi.net:587 (STARTTLS) - IMAP: mail.apsi.net:143 (STARTTLS) ou :993 (SSL/TLS)
! Description
 
=== 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
| '''README.md'''
| pchevalier
| 17 KB
| /home/pchevalier/
| Point d’entrée, vue d’ensemble complète
| ~/Maildir/
| 168K (4 emails)
|-
|-
| contact@apsi.net
| '''DOCUMENTATION_MAIL_SERVER.md'''
| contact
| 14 KB
| /home/contact/
| Documentation technique complète
| ~/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
| '''GUIDE_GESTION_MAIL.md'''
| pchevalier-voilou
| 12 KB
| /home/pchevalier-voilou/
| Guide de gestion quotidienne
| ~/Maildir/
| 104K (5 emails)
|-
|-
| contact@voilou.nl
| '''TROUBLESHOOTING.md'''
| contact-voilou
| 18 KB
| /home/contact-voilou/
| Dépannage rapide des problèmes
| ~/Maildir/
| 76K (1 email)
|}
|}


'''Total:''' 4 comptes actifs
<span id="guides-pratiques"></span>
=== 🔧 Guides Pratiques ===


'''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>)
{| class="wikitable"
 
|-
'''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”
! Document
 
! Taille
 
-----
 
<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:'''
 
<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 = &lt;/etc/letsencrypt/live/mail.apsi.net/fullchain.pem
ssl_key = &lt;/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
! Description
|-
|-
| 22
| '''GUIDE_AJOUT_DOMAINE.md'''
| SSH
| 17 KB
| TCP
| Ajouter un nouveau domaine complet
| Administration
|-
|-
| 25
| '''GUIDE_AJOUT_COMPTE.md'''
| SMTP
| 14 KB
| TCP
| Ajouter un compte email rapidement
| Réception emails (MX)
|-
|-
| 80
| '''080-GUIDE_RSPAMD.md'''
| HTTP
| 25 KB
| TCP
| Filtrage anti-spam et DKIM avec rspamd
| Redirect HTTPS
|}
 
<span id="références-techniques"></span>
=== 📋 Références Techniques ===
 
{| class="wikitable"
|-
|-
| 143
! Document
| IMAP
! Taille
| TCP
! Description
| STARTTLS
|-
|-
| 443
| '''DNS_RECORDS_SPF_DKIM_DMARC.txt'''
| HTTPS
| 6.2 KB
| TCP
| Configuration DNS complète
| Roundcube
|-
| 587
| Submission
| TCP
| SMTP authentifié (STARTTLS)
|-
| 993
| IMAPS
| TCP
| IMAP SSL/TLS
|}
|}


<span id="ovh2-1"></span>
<span id="scripts"></span>
=== ovh2 ===
=== 🔍 Scripts ===


{|
{| class="wikitable"
! Port
|-
! Service
! Fichier
! Protocole
! Emplacement
! Description
! Description
|-
|-
| 22
| '''mail-diagnostic.sh'''
| SSH
| /root/scripts/
| TCP
| Diagnostic automatique complet
| Administration
|-
|-
| 25
| '''README-SCRIPTS.md'''
| SMTP
| /root/scripts/
| TCP
| Documentation des scripts
| Relay backup
|}
|}


Ligne 415 : Ligne 140 :
-----
-----


<span id="statistiques-système"></span>
<span id="organisation-des-fichiers"></span>
== Statistiques Système ==
== 🗂️ ORGANISATION DES FICHIERS ==


'''Date:''' 02 Janvier 2026
<pre>/root/IA/MAIL.APSI.NET/
├── 010-INDEX.md (ce fichier)
├── 020-README.md                      ← Commencez ici!
├── 030-DOCUMENTATION_MAIL_SERVER.md  ← Architecture
├── 040-CONFIGURATION_ACTUELLE.md      ← Config actuelle
├── 050-GUIDE_GESTION_MAIL.md          ← Gestion quotidienne
├── 052-GUIDE_AJOUT_DOMAINE.md        ← Ajouter domaine
├── 054-GUIDE_AJOUT_COMPTE.md          ← Ajouter compte
├── 080-GUIDE_RSPAMD.md                ← Anti-spam et DKIM
├── 100-GUIDE_CERTIFICATS_LETSENCRYPT  ← Certificats SSL
└── 110-TROUBLESHOOTING.md            ← Dépannage


<span id="ovh1-2"></span>
/root/scripts/
=== ovh1 ===
├── README-SCRIPTS.md                  ← Doc scripts
└── mail-diagnostic.sh                ← Diagnostic auto</pre>


'''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 (&gt; 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
<span id="parcours-dapprentissage"></span>
== 🎓 PARCOURS D’APPRENTISSAGE ==


'''Queue relay:''' - Emails en attente: 0 - Connectivité ovh1: ✓ OK
<span id="niveau-1-débutant-2-3-jours"></span>
=== Niveau 1: Débutant (2-3 jours) ===


'''Score de santé relay:''' 100/100 (100%)
# Lire '''README.md''' (30 min)
# Lire '''DOCUMENTATION_MAIL_SERVER.md''' sections 1-3 (1h)
# Pratiquer avec '''GUIDE_GESTION_MAIL.md''' sections 1-3 (2h)
# Ajouter un compte test avec '''GUIDE_AJOUT_COMPTE.md''' (30 min)


'''Compétences:''' Comprendre l’architecture, lire les logs, gérer la queue, créer un compte


-----
<span id="niveau-2-intermédiaire-1-semaine"></span>
=== Niveau 2: Intermédiaire (1 semaine) ===


<span id="erreurs-connues-non-critiques"></span>
# Lire '''GUIDE_GESTION_MAIL.md''' complet (3h)
== Erreurs Connues (Non-Critiques) ==
# Lire '''TROUBLESHOOTING.md''' (2h)
# Exécuter '''mail-diagnostic.sh''' et analyser (1h)
# Pratiquer dépannage sur cas réels (2h)


<span id="ssl-routines-errors-dovecot"></span>
'''Compétences:''' Diagnostiquer, gérer utilisateurs, Fail2ban, statistiques
=== SSL routines errors (Dovecot) ===


<pre>error:0A000102:SSL routines::unsupported protocol
<span id="niveau-3-avancé-2-semaines"></span>
error:0A00010B:SSL routines::wrong version number</pre>
=== Niveau 3: Avancé (2 semaines) ===
'''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>
# Lire '''GUIDE_AJOUT_DOMAINE.md''' complet (2h)
=== SASL LOGIN authentication failed ===
# Lire '''DNS_RECORDS_SPF_DKIM_DMARC.txt''' (1h)
# Lire '''080-GUIDE_RSPAMD.md''' - Anti-spam et DKIM (2h)
# Créer les scripts automatisés (4h)


<pre>SASL LOGIN authentication failed: Invalid authentication mechanism</pre>
'''Compétences:''' Ajouter domaine, SPF/DKIM/DMARC, rspamd, scripts, relay backup
'''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>
<span id="checklist-admin-quotidien"></span>
== Documentation Disponible ==
== ✅ CHECKLIST ADMIN QUOTIDIEN ==


<span id="guides-dans-rootiamail.apsi.net"></span>
<syntaxhighlight lang="bash"># 1. Diagnostic complet (2 min)
=== Guides (dans /root/IA/MAIL.APSI.NET/) ===
/root/scripts/mail-diagnostic.sh
 
{|
! 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>
# 2. Vérifier la queue (30 sec)
=== Scripts (dans /root/scripts/) ===
mailq


{|
# 3. Logs récents (1 min)
! Document
tail -50 /var/log/mail.log
! Description
|-
| README-SCRIPTS.md
| Documentation complète des scripts
|}


'''Total documentation:''' ~308K dans 11 fichiers markdown
# 4. Fail2ban (30 sec)
fail2ban-client status postfix-sasl


# Temps total: ~5 minutes</syntaxhighlight>


-----
-----


<span id="contacts-et-administration"></span>
<span id="aide-rapide"></span>
== Contacts et Administration ==
== 🆘 AIDE RAPIDE ==
 
'''Administrateur:''' Pierre Chevalier '''Email technique:''' pchevalier@pcstreet.fr (rapports de diagnostic) '''Email contact:''' contact@apsi.net


'''Hébergeur:''' - ovh1: OVH (France) - ovh2: OVH (France)
<span id="email-non-reçu"></span>
=== Email non reçu ===


'''DNS:''' Configuré chez le registrar du domaine
<syntaxhighlight lang="bash">grep "destinataire@domain.com" /var/log/mail.log | tail -20
postmap -q "destinataire@domain.com" hash:/etc/postfix/virtual</syntaxhighlight>
<span id="service-down"></span>
=== Service down ===


<syntaxhighlight lang="bash">systemctl restart postfix dovecot rspamd
/root/scripts/mail-diagnostic.sh</syntaxhighlight>
<span id="dkim-invalide-ou-problème-spam"></span>
=== DKIM invalide ou problème spam ===


-----
<syntaxhighlight lang="bash"># Vérifier DKIM DNS
dig +short TXT mail._domainkey.domaine.com


<span id="changelog-récent"></span>
# Vérifier rspamd
== Changelog Récent ==
systemctl status rspamd
tail -f /var/log/rspamd/rspamd.log


<span id="janvier-2026"></span>
# Interface web rspamd (via tunnel SSH)
=== 02 Janvier 2026 ===
ssh -L 11334:localhost:11334 root@mail.apsi.net
 
# Puis: http://localhost:11334</syntaxhighlight>
'''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
'''Voir TROUBLESHOOTING.md pour plus de détails'''
 
'''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 &gt; 30 jours




-----
-----


<span id="à-faire-todo"></span>
<span id="résumé-de-la-documentation"></span>
== À Faire (Todo) ==
== 📊 RÉSUMÉ DE LA DOCUMENTATION ==
 
<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
* '''Total:''' 16 fichiers, ~175 KB
* ☐ Configurer SpamAssassin (anti-spam)
* '''Guides:''' 7 fichiers (117 KB) - Nouveau: GUIDE_RSPAMD (25 KB)
* ☐ Configurer ClamAV (antivirus)
* '''Scripts:''' 2 fichiers (13 KB)
* '''Archives:''' 5 fichiers (34 KB)
* '''Références:''' 2 fichiers (15 KB)




-----
-----


'''Document créé le:''' 02 Janvier 2026 '''Dernière mise à jour:''' 02 Janvier 2026 '''Version:''' 1.0
'''Version:''' 1.1 '''Créé le:''' 02 Janvier 2026 '''Dernière modification:''' 04 Janvier 2026 (Ajout GUIDE_RSPAMD) '''Serveurs:''' ovh1 (mail.apsi.net) + ovh2 (backup.apsi.net)

Dernière version du 4 janvier 2026 à 08:33

KEYWORDS: MAIL, SERVER, APSI.NET, OVH1, MAIL.APSI.NET, OVH2, BACKUP.APSI.NET, INDEX

Le 04/01/2026:

INDEX COMPLET - Documentation Serveur Mail

Infrastructure: ovh1 (mail.apsi.net) + ovh2 (backup.apsi.net) Domaines: apsi.net, voilou.nl, thabard.com Dernière mise à jour: 04 Janvier 2026



📖 COMMENT UTILISER CETTE DOCUMENTATION

Je suis nouveau - Par où commencer?

  1. README.md - Commencez ici! Vue d’ensemble et démarrage rapide
  2. DOCUMENTATION_MAIL_SERVER.md - Comprendre l’architecture
  3. GUIDE_GESTION_MAIL.md - Apprendre les commandes de base
  4. TROUBLESHOOTING.md - Résoudre les problèmes courants

Je veux faire quelque chose de spécifique

Tâche Document
Ajouter une adresse email GUIDE_AJOUT_COMPTE.md
Ajouter un nouveau domaine GUIDE_AJOUT_DOMAINE.md
Gérer les mails au quotidien GUIDE_GESTION_MAIL.md
Configurer le filtrage anti-spam 080-GUIDE_RSPAMD.md
Résoudre un problème TROUBLESHOOTING.md
Configurer le DNS DNS_RECORDS_SPF_DKIM_DMARC.txt
Utiliser les scripts /root/scripts/README-SCRIPTS.md



📚 DOCUMENTS DISPONIBLES

🎯 Guides Principaux

Document Taille Description
README.md 17 KB Point d’entrée, vue d’ensemble complète
DOCUMENTATION_MAIL_SERVER.md 14 KB Documentation technique complète
GUIDE_GESTION_MAIL.md 12 KB Guide de gestion quotidienne
TROUBLESHOOTING.md 18 KB Dépannage rapide des problèmes

🔧 Guides Pratiques

Document Taille Description
GUIDE_AJOUT_DOMAINE.md 17 KB Ajouter un nouveau domaine complet
GUIDE_AJOUT_COMPTE.md 14 KB Ajouter un compte email rapidement
080-GUIDE_RSPAMD.md 25 KB Filtrage anti-spam et DKIM avec rspamd

📋 Références Techniques

Document Taille Description
DNS_RECORDS_SPF_DKIM_DMARC.txt 6.2 KB Configuration DNS complète

🔍 Scripts

Fichier Emplacement Description
mail-diagnostic.sh /root/scripts/ Diagnostic automatique complet
README-SCRIPTS.md /root/scripts/ Documentation des scripts



🗂️ ORGANISATION DES FICHIERS

/root/IA/MAIL.APSI.NET/
├── 010-INDEX.md (ce fichier)
├── 020-README.md                      ← Commencez ici!
├── 030-DOCUMENTATION_MAIL_SERVER.md   ← Architecture
├── 040-CONFIGURATION_ACTUELLE.md      ← Config actuelle
├── 050-GUIDE_GESTION_MAIL.md          ← Gestion quotidienne
├── 052-GUIDE_AJOUT_DOMAINE.md         ← Ajouter domaine
├── 054-GUIDE_AJOUT_COMPTE.md          ← Ajouter compte
├── 080-GUIDE_RSPAMD.md                ← Anti-spam et DKIM
├── 100-GUIDE_CERTIFICATS_LETSENCRYPT  ← Certificats SSL
└── 110-TROUBLESHOOTING.md             ← Dépannage

/root/scripts/
├── README-SCRIPTS.md                  ← Doc scripts
└── mail-diagnostic.sh                 ← Diagnostic auto

🎓 PARCOURS D’APPRENTISSAGE

Niveau 1: Débutant (2-3 jours)

  1. Lire README.md (30 min)
  2. Lire DOCUMENTATION_MAIL_SERVER.md sections 1-3 (1h)
  3. Pratiquer avec GUIDE_GESTION_MAIL.md sections 1-3 (2h)
  4. Ajouter un compte test avec GUIDE_AJOUT_COMPTE.md (30 min)

Compétences: Comprendre l’architecture, lire les logs, gérer la queue, créer un compte

Niveau 2: Intermédiaire (1 semaine)

  1. Lire GUIDE_GESTION_MAIL.md complet (3h)
  2. Lire TROUBLESHOOTING.md (2h)
  3. Exécuter mail-diagnostic.sh et analyser (1h)
  4. Pratiquer dépannage sur cas réels (2h)

Compétences: Diagnostiquer, gérer utilisateurs, Fail2ban, statistiques

Niveau 3: Avancé (2 semaines)

  1. Lire GUIDE_AJOUT_DOMAINE.md complet (2h)
  2. Lire DNS_RECORDS_SPF_DKIM_DMARC.txt (1h)
  3. Lire 080-GUIDE_RSPAMD.md - Anti-spam et DKIM (2h)
  4. Créer les scripts automatisés (4h)

Compétences: Ajouter domaine, SPF/DKIM/DMARC, rspamd, scripts, relay backup



✅ CHECKLIST ADMIN QUOTIDIEN

# 1. Diagnostic complet (2 min)
/root/scripts/mail-diagnostic.sh

# 2. Vérifier la queue (30 sec)
mailq

# 3. Logs récents (1 min)
tail -50 /var/log/mail.log

# 4. Fail2ban (30 sec)
fail2ban-client status postfix-sasl

# Temps total: ~5 minutes

🆘 AIDE RAPIDE

Email non reçu

grep "destinataire@domain.com" /var/log/mail.log | tail -20
postmap -q "destinataire@domain.com" hash:/etc/postfix/virtual

Service down

systemctl restart postfix dovecot rspamd
/root/scripts/mail-diagnostic.sh

DKIM invalide ou problème spam

# Vérifier DKIM DNS
dig +short TXT mail._domainkey.domaine.com

# Vérifier rspamd
systemctl status rspamd
tail -f /var/log/rspamd/rspamd.log

# Interface web rspamd (via tunnel SSH)
ssh -L 11334:localhost:11334 root@mail.apsi.net
# Puis: http://localhost:11334

Voir TROUBLESHOOTING.md pour plus de détails



📊 RÉSUMÉ DE LA DOCUMENTATION

  • Total: 16 fichiers, ~175 KB
  • Guides: 7 fichiers (117 KB) - Nouveau: GUIDE_RSPAMD (25 KB)
  • Scripts: 2 fichiers (13 KB)
  • Archives: 5 fichiers (34 KB)
  • Références: 2 fichiers (15 KB)



Version: 1.1 Créé le: 02 Janvier 2026 Dernière modification: 04 Janvier 2026 (Ajout GUIDE_RSPAMD) Serveurs: ovh1 (mail.apsi.net) + ovh2 (backup.apsi.net)