mail (Unix)
mail is a command line email client for Unix and Unix-like operating systems.
History[edit]
A very rudimentary mail command was in Unix by the time of the 1st Edition.[1] Doug McIlroy later wrote, "to this day a simple postmark is all that it adds to what you write. Old Unix hands groan at the monstrous headers that come from latter-day mailer and at the fatness of their manuals."[2]
In 1978 a new mail user agent for Unix was written by Kurt Shoens; referred to as Berkeley Mail. Although initially installed at /usr/ucb/Mail, (with the earlier Unix mail still available at /bin/mail), on most modern Unix and Linux systems the commands Mail, mail or xmail all invoke a descendant of this Berkley Mail.[3]
Example usage[edit]
mail -s "You've got mail" -c cc.rider@example.org somebody@example.com anotherbody@example.net
This sends a message with the subject "You've got mail" to two recipients, somebody@example.com and anotherbody@example.net, and CCs (copies) a third, cc.rider@example.org. The message will be typed after the command is entered and will be ended with Control-D.
Any Unix command sequence that generates text can be used to send a message in one line. For example:
echo "Some message" | mail -s "meeting today" somebody@example.com
This is especially useful for having a system report its status automatically through email.
See also[edit]
References[edit]
- ^ [1], UNIX PROGRAMMER’S MANUAL, K. Thompson & D. M. Ritchie, November 3, 1971
- ^ McIlroy, M. D. (1987). A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 (Technical report). CSTR. Bell Labs. 139.
- ^ "mail, Mail, mailx, nail—history notes", Heirloom Project
External links[edit]
|
||||||||||||||||||||||||||||||||||||||||||
| This Unix-related article is a stub. You can help Wikipedia by expanding it. |