sendmail -q
postfix flush
OR
postfix -f
To see mail queue, enter:
mailq
To remove all mail from the queue, enter:
postsuper -d ALL
To remove all mails in the deferred queue, enter:
postsuper -d ALL deferred
mailq | tail -n 1
If you just want to know the number of messages sitting in the deferred queue, then the following should get you a quick answer:
find /var/spool/postfix/deferred -type f | wc -l