next up previous contents
Next: Sending your mail: Up: Downloading from a server Previous: Downloading from a server   Contents

Getting your mail:

In this scenario, your ISP has provided you with a mailbox, and you download its contents and deal with your mail offline. If this is your situation, mutt expects to find your mail waiting for you on your system at the location /var/spool/mail/USERNAME, and you will use Fetchmail to retrieve it from the server.

First, Fetchmail: Fetchmail is included on all Linux distributions worth their salt these days. In your home directory you should create a dot file (configuration file) by the name of .fetchmailrc. In it, provide your download information. Fetchmail is well documented, so either start with your system's sample fetchmail file (/etc/fetchmailrc) or read the man page for fetchmail to get an idea of all the things fetchmail is capable of. For any POP3 account I've ever had, all I've needed has been something like the following. Replace the UPPERCASE terms with your own information; USERNAME is the name by which your ISP knows you; LOCALUSERNAME is the name by which you log onto your Linux box.

poll MAIL.MYISP.COM with protocol pop3 user USERNAME 
      with pass PASSWORD is LOCALUSERNAME here;

To get your mail, open up a terminal and download it by entering the command fetchmail. Some distros like SUSE set up your machine so your mail is automatically downloaded every time you establish an internet connection. When you sit down at your computer you can open up a terminal and first run fetchmail, then run mutt. Or you can start with mutt, and run fetchmail by entering ! fetchmail. The exclamation point is the mechanism for getting to a shell from within mutt. After ! you could easily input any shell command you like (less, sort, ls, vim, etc.)

Now, mutt: If your log-in name on your system is randymon, mutt expects to find a text file with appropriate permissions (that is, user can read and write) at /var/spool/mail/randymon. If that file doesn't exist, root will have to create it for you. Remember, it's a file, not a directory, so you can create it with the ``touch'' command and then set the permissions using ``chmod.''

mailboxes  /var/spool/mail/randymon
set spoolfile=/var/spool/mail/randymon
set folder="$HOME/Mail"
set record="$HOME/Mail/Sent"


next up previous contents
Next: Sending your mail: Up: Downloading from a server Previous: Downloading from a server   Contents
Randall Wood 2009-12-02