Delete all mail from one sender in the Postfix queue
remove spam from one mailbox from queue | postfix delete emails from sender | delete mail from hacked account | postfix | postsuper | spam | awkWarning, destructive. This command deletes, overwrites or changes data in a way that cannot easily be undone. Check every placeholder carefully and make a backup first.
postqueue -p | awk -v s="info@example.com" '/^[0-9A-Za-z]/ && $7 == s {print $1}' | tr -d '*!' | postsuper -d -Finds all messages in the queue with the given sender address and passes their queue IDs to postsuper -d. Useful after a single account was abused, when legitimate mail from other senders should stay in the queue.
Note: The address must be written exactly as it appears in postqueue -p. Run the part before | postsuper on its own first and check the IDs.
Also searched as
- remove spam from one mailbox from queue
- postfix delete emails from sender
- delete mail from hacked account