Flushing the Postfix mail queue

This command...

# postfix flush

...will flush the queue, but only if postfix is currently running. From experience, this may not work in time if a large unplanned deferred send in in progress ;)

You can also use postfix -f

While postfix is down, force-emptying the entire deferred queue can be done like so:

# postsuper -d ALL deferred

while ALL mail can be flushed with the following:

# postsuper -d ALL

See also