Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.

Clearing Postfix Mail Queue in Ubuntu

I installed postfix on my Ubuntu box so as to test my developmental emails. This ran me into a slight problem few days ago. I developed one application that notifys the administrator of the application on number of issues. Whenever I am offline postfix queue all the emails till I connect to the internet. Yes, I have this ISP that allows my local box to send emails to live emails. Anytime I connect to the internet all queued emails fly out.

Here is the challenge. I tried reusing this application code. While settting it up for another use I forgot to change the client's email and I have so many emails queued to be sent to this client. See what my negligence has caused me. Never, I don't want this emails to get to him so I have to clear my postfix mail queue. Below is how to get it done in one line. Open your terminal and type:


sudo postsuper -d ALL


comments powered by Disqus