Monthly Archives: Juli 2014

How delete single mails from the mail queue of postfix (PLESK)

If you like to delete mails from the mail queue of postfix on a given pattern (from/sender email) you can use this command:


postqueue -p | grep "name@sender.toplevel" | cut -f 1 -d ' ' | xargs -n 1 postsuper -d

 

  • postqueue -p you’ll get the queue.
  • grep just selects the line with the sender AND the message id.
  • cut extracts the message id.
  • xargs/postsuper will delete the message