I have a CentOS 5.6 VM installation and currently have a handful of emails that I would like to get access to.

When I run mail as root, I get:

[root@dev mail]# mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/root": 11 messages 11 unread
>U  1 logwatch@www.crmpicco.d  Mon Feb 17 10:06  44/1625  "Logwatch for dev.localdomain (Linux)"

Where is that file stored? I would like to send it on to someone for review.

I can't see it in /var/spool/mail/.


The /var/spool/mail/ is the folder that mail is saved as a file as /var/spool/mail/$USER.

  • when you call mail it will by default read that file.
  • all read mails will be stored in mbox file and you can access them using mail -f ~/mbox.
  • In @crmpicco 's example root's unread and/or unhandled mail is stored in /var/spool/mail/root where root is a file. – hot2use Sep 7 '16 at 7:45

But it should, indeed, be in there; try an "ls -al /var/spool/mail/root". That should show it to you. Note, however, that you will only have that one mail file; "mbox"-formatted mail (which is what's generally stored in /var/spool/mail/) compiles each folder into one aggregate ASCII file that the client then parses. This is notably different from the way that maildir works, where each e-mail is a different on-disk file, with folders being implemented by way of separate directories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.