view · edit · print · history


Nail is a lightweight mail client for sending and receiving e-mail messages. Please note that around 2007 the nail changed it's name to Heirloom mailx. The Sourceforge says that:
Heirloom mailx (formerly known as "nail") is intended provide the functionality of the POSIX mailx command with additional support for MIME messages, IMAP (including caching), POP3?, SMTP, S/MIME, message threading/sorting, scoring, and filtering.

Reading messages.

To read mail (imap, imaps, pop3, pop3s), invoke:

  nail -f pop3://mylogin@server.myisp.example
  nail -f imaps://mylogin@server.myisp.example

However, fetchmail/procmail would do better job for automated e-mail receiving. This is how this chain can co-work:

  Mail Transport Agent (fetchmail) -> Mail Delivery Agent (procmail) -> Mail User Agent (nail?)

http://wiki.sourcemage.org/index.php?page=HOWTO-Setup+mutt%2Bprocmail%2Bfetchmail%2Bgnupg(approve sites)

Sending mail.

When sending, nail can pass the message to sendmail for further delivery (this option is not compiled in OpenSlug-2.6 and earlier) or use SMTP protocol to contact directly the recipient's mail server.

I made a .mailrc file in home directory (every user wishing to use nail has to create his/her own .mailrc configuration file) containing just two lines:

  set smtp=smtp-server.my.isp.com
  set from=user@my.isp.com

After that I can send automated messages from the command line or via script.

  > some_script.sh | nail -s "Script output" myemail@myisp.com

See also:

http://linux.die.net/man/1/nail(approve sites)

view · edit · print · history · Last edited by Darek Sliwa.
Based on work by Darek Sliwa, dB, willpost, and paulhar.
Originally by dyoung.
Page last modified on June 21, 2008, at 09:05 PM