Delete Deferred Mails from a specific user on PMG 8.2

rrocha

New Member
Jun 11, 2025
3
0
1
Hi there.

One of our users was kind enough to provide her user/pass to a hacker, and we got about 500 emails in the deferred mail queue.
How do I delete all these e-mails from her? The threads about this procedure are all old and the commands are not working.

Thanks in advance
 
which threads are you referring to?

in general for selective deletion of postfix queue - I can recommend combining `postqueue -j` (JSON-output) with a `jq` filter e.g.:
Code:
postqueue -j |jq -r 'select( .sender == "address@of.hacked.sender" )|.queue_id'

check the outputs before and make sure that it only contains the mails you want to delete - as this process cannot be reverted!

then you can pipe this to `postsuper -d -` to delete the selected mails

I hope this helps!
 
This code is supposed to be entered in the linux machine? there I get -bash: jq: command not found
 
Ah, perfect. it works now.

Then the id shown by the queue_id query is what I must delete using the postsuper -d -XXXXYYZZZ command, correct?