Archives pour l'étiquette qmail

Qmail – Suppression de messages – une solution a coup de rm, j’aime bien rm

Suppression de messages en queue de qmail.

Les commandes suivantes peuvent supprimer tous les courriels de votre serveur de messagerie qmail qui se trouvent en queue.

qmailctl stop <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>queue<span style="color: #000000; font-weight: bold;">/</span>mess -<span style="color: #7a0874; font-weight: bold;">type</span> f -<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>queue<span style="color: #000000; font-weight: bold;">/</span>info -<span style="color: #7a0874; font-weight: bold;">type</span> f -<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>queue<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span> -<span style="color: #7a0874; font-weight: bold;">type</span> f -<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>queue<span style="color: #000000; font-weight: bold;">/</span>intd -<span style="color: #7a0874; font-weight: bold;">type</span> f -<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>queue<span style="color: #000000; font-weight: bold;">/</span>todo -<span style="color: #7a0874; font-weight: bold;">type</span> f -<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>queue<span style="color: #000000; font-weight: bold;">/</span>remote -<span style="color: #7a0874; font-weight: bold;">type</span> f -<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; qmailctl start

Testé et approuvé pour supprimer les 45k emails d’erreur envoyer par une tache cron. Rappel pour développeur en herbe, on place l’envoie du mail d’erreur sur le test de connexion DB pas à l’exécution de la routine de traitement de chaque enregistrement !! Vous risquez de perdre plusieurs point d’audition en très peu de temps.