Reading message content on postfix queue
postcat -q MESSAGE_ID
To get "MESSAGE_ID" we can use "mailq" or "mailq | grep
" where is a e-mail address.
To delete a mail from queue use the command below:
postsuper -d MESSAGE_ID
To delete all deferred messages from queue:
postsuper -d ALL deferred
To get ALL the MESSAGE_IDS of a particular e-mail address from queue:
mailq|grep apache@vagrant2.vagrantweb.com|awk '{print $1}'
To delete ALL the mails from queue of a particular e-mail address:
for i in `mailq|grep apache@vagrant2.vagrantweb.com|awk '{print $1}'` ; do postsuper -d $i ; done
To delete ALL the mails from queue
postsuper -d ALL