Inspecting Postfix’s email queue.
دوشنبه, ۸ تیر ۱۳۹۴، ۰۲:۱۴ ب.ظ
1- Display a list of queued mail
mailq
or
postqueue -p
To save the output to a text file you can run
mailq > myfile.txt
or
postqueue -p > myfile.txt
2- View message (contents, header and body) in Postfix queue
Assuming the message has the ID XXXXXXX (you can see the ID form the QUEUE)
postcat -vq XXXXXXXXXX
Or to save it in a file
postcat -vq XXXXXXXXXX > themessage.txt
3- Tell Postfix to process the Queue now
postqueue -f
OR
postfix flush
4- Delete queued mail
Delete all queued mail
postsuper -d ALL
Delete differed mail queue messages
(The ones the system intends to retry later)
postsuper -d ALL deferred