From: Sahil Tandon (no email)
Date: Thu Nov 22 2007 - 10:48:56 EST
On Nov 22, 2007, at 6:57 AM, Jack Verdel wrote:
> using postfix, i know with the following command:
> "postsuper -d ALL deferred"
> all messages contained in deferred queue are deleted.
> ...
> but, is there a similar compact command to delete, from the deferred
> queue, only
> those messages that have a specific sender address (from field) ?
From the postsuper man page:
---
If a queue_id of - is specified, the program reads queue IDs
from standard input. For example, to delete all
mail with
exactly one recipient :
mailq | tail +2 | grep -v '^ *(' | awk 'BEGIN { RS =
"" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "" && $9 == "")
print $1 }
' | tr -d '*!' | postsuper -d -
---
You can modify the above example to search & delete mail from a
specific sender (variable $7 in the above example).
Sahil
|
|
|