From ed8e2b9e9ed67097d4fdc7913df1c6cd2d96d3f7 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 12 Mar 2021 18:12:41 +0100 Subject: Some more articles reformatting --- .../blog/miscellaneous/purge-postfix-queue-based-content.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'content/blog/miscellaneous/purge-postfix-queue-based-content.md') diff --git a/content/blog/miscellaneous/purge-postfix-queue-based-content.md b/content/blog/miscellaneous/purge-postfix-queue-based-content.md index 2db52ac..d131af2 100644 --- a/content/blog/miscellaneous/purge-postfix-queue-based-content.md +++ b/content/blog/miscellaneous/purge-postfix-queue-based-content.md @@ -1,13 +1,18 @@ --- title: "Purge postfix queue based on email contents" -linkTitle: "Purge postfix queue based on email contents" date: 2009-04-27 -description: > - Purge postfix queue based on email contents +description: How to selectively purge a postfix queue based on email contents +tags: + - toolbox --- +## The problem +Sometimes a lot of spam can acacumulate in a postfix queue. + +## The solution + +Here is a command that can search through queued emails for a certain character string (here XXX as an example) and delete the ones that contain it : {{< highlight sh >}} find /var/spool/postfix/deferred/ -type f -exec grep -li 'XXX' '{}' \; | xargs -n1 basename | xargs -n1 postsuper -d {{< /highlight >}} - -- cgit v1.2.3