Linux – Viewing emails with mailq and postcat

Installing and using postfix will give you ability to view mails processed by it:

#  print a list of all queued mail

# print a particular message, by ID (you can see the ID along in mailq's output)
postcat -vq [message-id]

# process the queued mail immediately
postqueue -f 

# delete ALL queued mail (use with caution—but handy if you have a mail send going awry!)
postsuper -d ALL


Leave a Reply

Your email address will not be published. Required fields are marked *