Mailboxes

Mailboxes (or folders) are the location at which your e-mail is stored. All the e-mail files are concatenated into one file with no special formatting. The MDA puts the mail in the mailbox, and the MUA lets you read the mail in the mailboxes.

Unix systems have a “default” mailbox where mail is usually stored; on Linux systems this mailbox is /var/spool/mail/username.

Your mailbox must be set up correctly. As root, to set up the mail box of a user named “barney”, type the following commands:

touch /var/spool/mail/barney
chown barney:mail /var/spool/mail/barney
chmod 660 /var/spool/barney

The touch command creates a mailbox for barney, if one doesn't exist. The chown command makes barney the owner of the mailbox (otherwise, he'll get an error when fetchpop tries to stuff mail in it). Finally, the chmod command makes sure that only barney and those users in the “mail” group can read his mailbox.

In a pinch, you could read your mail by typing the command: cat /var/spool/mail/username |more or just use mail, the original Unix e-mail program.

After being sorted and delivered by the MDA, your mail usually resides in folders in either the ~/mail or ~/Mail directories. Your MUA then looks in those directories to let you read the folders there and reply to your mail.