$arr_19 ), array( 3, false, $arr_20, $arr_24 ), array( 2, false, "\" />", $arr_25 ) ) ); ?> $arr_27 ), array( 3, false, $arr_28, $arr_30 ), array( 2, false, "\" />\n\n", $arr_31 ) ) ); ?> array( 2, false, false, $arr_9 ), array( 4, $arr_10, "if", $arr_245, $arr_248 ), array( 2, false, "\n", $arr_249 ) ) ); ?> rr_466 ), array( 4, $arr_467, "if", $arr_482, $arr_484 ), array( 2, false, "\n", $arr_485 ) ) ); ?> Leaner Letter » Linux Magazine
 

Mail at the command line

Leaner Letter

© Hao Wang, Fotolia

Author(s):

The simple mailx command-line mail client handles mail either interactively or via command-line options. Although it lacks the convenience of a GUI-based tool, mailx compares well in scripting.

Thunderbird, Evolution, or Kmail are not the only options as mail clients. Although the major graphical mail clients offer users a great deal of convenience, sometimes a command-line solution is an advantage – both Mutt [1] and the lean mailx [2] program support batch options in the shell.

Most distributions include mailx by default. OpenSUSE and Debian include the package on their installation media. On openSUSE, /bin/mail is a symlink that points to /usr/bin/mailx, whereas Debian systems do things the other way around: /usr/bin/mailx points to /usr/bin/mail. The following commands and command options were all tested on Debian 4.0 "Etch."

Launching the mail client with mailx at the shell prompt takes you into an interactive environment. The client shows the content of your inbox; the default setting for this on most systems is /var/mail/username. Then you will see an overview of the messages, including the sender, date, size, and subject line.

[...]

Read full article as PDF »

090-091_commandline.pdf  (241.07 kB)
comments powered by Disqus

Direct Download

Read full article as PDF »

090-091_commandline.pdf  (241.07 kB)

News