diff options
author | Julien Dessaux | 2021-03-12 18:12:41 +0100 |
---|---|---|
committer | Julien Dessaux | 2021-03-12 18:13:45 +0100 |
commit | ed8e2b9e9ed67097d4fdc7913df1c6cd2d96d3f7 (patch) | |
tree | cd93f66cd66f8ca6efe91882d8a46ca6b09bdc72 /content/blog/miscellaneous/purge-postfix-queue-based-content.md | |
parent | Improved home speech (diff) | |
download | www-ed8e2b9e9ed67097d4fdc7913df1c6cd2d96d3f7.tar.gz www-ed8e2b9e9ed67097d4fdc7913df1c6cd2d96d3f7.tar.bz2 www-ed8e2b9e9ed67097d4fdc7913df1c6cd2d96d3f7.zip |
Some more articles reformatting
Diffstat (limited to 'content/blog/miscellaneous/purge-postfix-queue-based-content.md')
-rw-r--r-- | content/blog/miscellaneous/purge-postfix-queue-based-content.md | 13 |
1 files changed, 9 insertions, 4 deletions
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 >}} - |