I need to recover an email that another user on my network sent a few days ago. I got the email ID using the grep
command on /var/log/mail.log
, but I don't know what to do right now with this.
How can I use the ID to view the contents of an email?
Have a look and see if its on the queue with
sudo postqueue -p
If it is, read it using
sudo postcat -q MESSAGE_ID
If you have large attachement, the message is at the top, so pipe it into head to have a look
sudo postcat -q MESSAGE_ID | head -n 100