Freedom IT Limited
MENU
  • Home
  • Company Profile
    • About Us
    • Manifesto
    • Eat Our Own Dogfood?
  • Products & Services
    • Business Solutions
    • Leasing / Finance
    • Support Agreements
    • Recommended Products
    • Website Design & Hosting
    • Online/Cloud Services Status Pages
  • Knowledgebase
    • Knowledgebase List
    • Knowledgebase Search
  • Contact

Clear mailq of a particular sender/recipient

Last Updated: 07 August 2019

To clear your postfix mail queue of a particular sender/recipient (n.b. doesn't/can't differentiate) use the following (as root):

 

mailq | tail +2 | awk 'BEGIN { RS = "" } / user@erehwown\.com$/ { print $1 }' | tr -d '*!' | postsuper -d -

Linux, email, SMTP, Postfix
logo and circlewhitebgFREEDOM IT  • address: 42 bryant road, brightwater, nelson • telephone: 64 3 929 5502 • cellular telephone: 64 27 246 3645