Where are my emails stored on CentOS 5.6

18,228

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.
Share:
18,228

Related videos on Youtube

crmpicco
Author by

crmpicco

Senior Analyst Developer (MoodleCloud) at Moodle, AWS Solutions Architect (Associate), Zend Certified Engineer and Google Analytics Qualified Individual

Updated on September 18, 2022

Comments

  • crmpicco
    crmpicco almost 2 years

    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 [email protected]  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/.

  • John K. N.
    John K. N. almost 8 years
    In @crmpicco 's example root's unread and/or unhandled mail is stored in /var/spool/mail/root where root is a file.