To send mail to one or more addresses, type at the Nail prompt mail address1 address2 and so on for each of the addresses or, at the command line, type nail address1 address2. After reading the message, enter z or h to get the subject list again. If the mail fits onto the screen, it’s displayed there, otherwise it’s displayed with your $PAGER. To read messages, enter the number shown alongside the mail subject. To read old mail, you can start it with nail -f ~/mbox or just use the folder command in the Nail prompt to switch to your mbox or any other account. When exiting, it saves all read mails to your local mbox file and won’t display them again when it’s started next time. Note that Nail shows new or unread mails only. For example, to reply to message 12, type reply 12 and press Enter. Nail uses these numbers to specify the target message for an action. If you start Nail without command-line arguments, it tries to fetch new mail from your mail account and shows you a list of the subjects with a number for each one.
The last two lines specify the login and the password to use for SMTP authentication. Most mail providers support both, so just choose the one you like more. Nail knows the methods login and cram-md5. The smtp-auth option tells Nail what authentication method to use. This is the sender address shown to the recipient of your mail. The from option should be your mail address, optionally followed by a nick or real name. The smtp option specifies the SMTP host, which Nail will use to send the mail. The rest of the folder string consists of your login name and server address. Possible values beside imaps are imap, pop3, and pop3s.
The string starts with the protocol used to fetch your mail. The folder option tells Nail where to get the mail from. This configuration should be usable with almost all common mail providers - just change the host names and login information:
Here is how I set up my mail account at web.de, a popular German free mail provider. Some options for Nail only should be placed in a ~/.nailrc file if you want the ~/.mailrc to be read by other mail clients. Most of the configuration is done in your ~/.mailrc file, so other mail clients you use that comply to the POSIX.2 and Single Unix Specification version 3 (SUSv3) mailx specifications can use it, too.
Set the UCBINSTALL variable to the correct path, since the default Makefile assumes that install is located in /usr/ucb/. Make install PREFIX=/usr CFLAGS=-Os UCBINSTALL=/usr/bin/install I like to optimize binaries for size, so I installed Nail with the command: For most people just typing make should install it. Unpack it and change into the new directory.
Most Linux distributions provide a package for Nail, but if yours doesn’t, or if you’re unhappy with it (some distributions provide Nail without SSL support), go to the Nail SourceForge page and download the source tarball. It also has a built-in Bayesian spam filter, so you don’t need external tools like SpamAssassin. Nail supports POP3, IMAP, and SMTP out of the box, so there’s no need for further programs like Fetchmail or Postfix. It’s fully compatible with mailx, but has a lot more features, which makes it appropriate for everyday use. Nail is a lightweight console-based mail client, made to be a modern replacement for the ancient mailx command. I use Firefox to browse the Web, but finally I found a good tool to quickly access my mail in text mode. Some tasks - such as browsing the Web and reading email - are harder to do satisfactorily at the console. I do almost everything in text mode when working with Linux.