> ## Content Index
> Fetch the complete content index at: https://www.bagz.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# Remove list of mail addresses from postfix queue
- URL: https://www.bagz.fr/remove-list-of-mail-addresses-from-postfix-queue/
- Published: 2017-05-15T15:18:37.000Z
- Updated: 2017-05-15T15:18:37.000Z
- Author: bgazui
- Tags: Linux, #Migrated-1790668826633, #wp, #wp-post, #Import 2026-09-29 08:00

There is no easy way to remove a list of mails in queue with a same sender or domain in Postfix. But you can use some standard commands to get this working.

First check the list of mails you want to remove with something like

postqueue -p |grep -e 'john.doe@domain.com|jon.doe@domain.com|john.do@domain.com' -B2 |grep "^\[A-Z0-9\]"

You're getting the list of mails that you will remove with the sender

FC0177DF1A0 8373 Thu May 6 11:24:56 sender@mywebsite.com  
F179A2C68AB 9469 Sun May 7 03:21:41 sender@mywebsite.com  
EAE217FB850 11049 Sat May 8 04:20:32 sender@mywebsite.com  

And now you can remove those mails from the queue by using **postsuper -d**

postqueue -p |grep -e 'john.doe@domain.com|jon.doe@domain.com|john.do@domain.com' -B2 |grep "^\[A-Z0-9\]{10}" |cut -d" " -f1 |postsuper -d -  

You will see the mails being removed

postsuper: FC0177DF1A0: removed  
postsuper: F179A2C68AB: removed  
postsuper: EAE217FB850: removed  
postsuper: Deleted: 3 messages