Our systems support three different text-only mail clients. Some users prefer these clients because they are snappy, and can be used while connected remotely to their account using SSH.
Mutt
To invoke this client, use the command mutt. (If you just want to send a message, you can also use mutt soandso@somewhere.) It is already configured correctly. However, every time you use it, it will ask for your username and password (so that it can connect to the mailserver).
How to avoid the username/password queries:
First execute these commands:
touch .muttrc chmod 600 .muttrc(This prevents others from looking at your .muttrc file.) Now use your favorite text editor to put the following into your .muttrc file:
set imap_user=accountname set imap_pass=accountpass
How to customize mutt in other ways:
Mutt is quite powerful, both in the way it handles your mail, and in the way it displays it to you. To learn more, check out the MuttWiki.
Pine
To invoke this client, use the command pine. (If you just want to send a message, you can also use pine soandso@somewhere.) It is already configured correctly. However, every time you use it, it will ask for your username and password (so that it can connect to the mailserver), and it will ask again for your username and password to send messages.
How to avoid the password queries:
Unfortunately, pine is legacy software and the standard version (which is the one we have installed) can not be told to remember your password between invocations of pine. When you launch pine, you'll be asked for your password to access your INBOX, and the first time you send a message, you'll be asked for your password to access our outgoing server. But if you leave pine running, pine will not keep asking you for the password for subsequent work. Once you quit pine, however, it will again ask for passwords the next time you launch pine.
How to avoid the username queries:
Even though pine won't remember your password, at least you can avoid being asked for your username, by editing your .pinerc file as follows. First off, you must invoke pine at least once, so that your .pinerc file is created for you. (To obtain a fresh copy of this file, quit pine, delete .pinerc and re-launch pine.) Now edit your .pinerc as follows:
...
smtp-server=smtp.math.arizona.edu/tls/novalidate-cert/user=accountname
...
inbox-path={imap.math.arizona.edu/tls/novalidate-cert/user=accountname}INBOX
...
folder-collections=AccountFolders {imap.math.arizona.edu/tls/novalidate-cert/user=accountname}[]
...
Command-line mail
To invoke this client, use the command mail. It is already configured correctly. There are two ways to use this client. By itself, the command mail will give you access to your INBOX and other folders. (It will ask for your username and password, so that it can connect to the mailserver.) But if invoked as mail address@somewhere.edu, it will instead send an outgoing e-mail to the specified address. (It will ask for your username and password at the end, so that it can deposit a copy of the message into your Sent folder.)
How to avoid the various username/password queries:
Two different files with similar spellings are mentioned in the following instructions: .mailrc and .nailrc. Pay careful attention to the spelling.
First put the following into the file .mailrc in your home directory:
set NAIL_EXTRA_RC=~/.nailrcThen, issue the following commands:
touch .nailrc chmod 600 .nailrc(This ensures other users won't be able to read your .nailrc file.) Now use your favorite text editor to put the following into .nailrc, replacing accountname and accountpass throughout with your account name and password:
set smtp-use-starttls set smtp-auth=login set smtp-auth-user=accountname set smtp-auth-password=accountpass set folder=imap://accountname@imap.math.arizona.edu/ set password-accountname@imap.math.arizona.edu=accountpassFor example, if the account name is “joe” and joe's password is “shmoe”, the file contents would be as follows:
set smtp-use-starttls set smtp-auth=login set smtp-auth-user=joe set smtp-auth-password=schmoe set folder=imap://joe@imap.math.arizona.edu/ set password-joe@imap.math.arizona.edu=shmoe
Note: If you only use command-line mail to send outgoing messages, but never to check your mail, and if you don't care about depositing a copy of your message in your Sent folder, then you can simply put the line
unset recordin your .nailrc, instead of the contents displayed above. This way your password does not appear in plaintext in one of your files.
How to customize command-line mail in other ways:
Command-line mail is actually quite powerful. Although it maintains the traditional look and feel and interface of the old Unix mail command, it is actually implemented by the modern program “nail”, which supports many modern features, such as Bayesian spam filtering, and S/MIME signing of messages. To learn more, try man nail, or check out the nail homepage.