?? mail-agents.html
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Mail User Agents</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD 使用手冊" href="index.html" /><link rel="UP" title="電子郵件" href="mail.html" /><link rel="PREVIOUS" title="SMTP 驗證" href="smtp-auth.html" /><link rel="NEXT" title="Using fetchmail" href="mail-fetchmail.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /><meta http-equiv="Content-Type" content="text/html; charset=GB2312" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD 使用手冊</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="smtp-auth.html"accesskey="P">后退</a></td><td width="80%" align="center" valign="bottom">章 22. 電子郵件</td><td width="10%" align="right" valign="bottom"><a href="mail-fetchmail.html"accesskey="N">前進</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="MAIL-AGENTS" name="MAIL-AGENTS">22.11. Mail User Agents</a></h1><i class="AUTHORGROUP"><span class="CONTRIB">Contributed by</span> Marc Silver.</i> <p>A Mail User Agent (<acronym class="ACRONYM">MUA</acronym>) is an application that isused to send and receive email. Furthermore, as email ``evolves'' and becomes morecomplex, <acronym class="ACRONYM">MUA</acronym>'s are becoming increasingly powerful inthe way they interact with email; this gives users increased functionality andflexibility. FreeBSD contains support for numerous mail user agents, all of which can beeasily installed using the <a href="ports.html">FreeBSD Ports Collection</a>. Users maychoose between graphical email clients such as <b class="APPLICATION">evolution</b> or <bclass="APPLICATION">balsa</b>, console based clients such as <bclass="APPLICATION">mutt</b>, <b class="APPLICATION">pine</b> or <ttclass="COMMAND">mail</tt>, or the web interfaces used by some large organizations.</p><div class="SECT2"><h2 class="SECT2"><a id="MAIL-COMMAND" name="MAIL-COMMAND">22.11.1. mail</a></h2><p><span class="CITEREFENTRY"><span class="REFENTRYTITLE">mail</span>(1)</span> is thedefault Mail User Agent (<acronym class="ACRONYM">MUA</acronym>) in FreeBSD. It is aconsole based <acronym class="ACRONYM">MUA</acronym> that offers all the basicfunctionality required to send and receive text-based email, though it is limited ininteraction abilities with attachments and can only support local mailboxes.</p><p>Although <tt class="COMMAND">mail</tt> does not natively support interaction with<acronym class="ACRONYM">POP</acronym> or <acronym class="ACRONYM">IMAP</acronym>servers, these mailboxes may be downloaded to a local <tt class="FILENAME">mbox</tt> fileusing an application such as <b class="APPLICATION">fetchmail</b>, which will bediscussed later in this chapter (<a href="mail-fetchmail.html">µÚ 22.12節</a>).</p><p>In order to send and receive email, simply invoke the <tt class="COMMAND">mail</tt>command as per the following example:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbd class="USERINPUT">mail</kbd></pre><p>The contents of the user mailbox in <tt class="FILENAME">/var/mail</tt> areautomatically read by the <tt class="COMMAND">mail</tt> utility. Should the mailbox beempty, the utility exits with a message indicating that no mails could be found. Once themailbox has been read, the application interface is started, and a list of messages willbe displayed. Messages are automatically numbered, as can be seen in the followingexample:</p><pre class="SCREEN">Mail version 8.1 6/6/93. Type ? for help."/var/mail/marcs": 3 messages 3 new>N 1 root@localhost Mon Mar 8 14:05 14/510 "test" N 2 root@localhost Mon Mar 8 14:05 14/509 "user account" N 3 root@localhost Mon Mar 8 14:05 14/509 "sample"</pre><p>Messages can now be read by using the <b class="KEYCAP">t</b> <ttclass="COMMAND">mail</tt> command, suffixed by the message number that should bedisplayed. In this example, we will read the first email:</p><pre class="SCREEN">& <kbd class="USERINPUT">t 1</kbd>Message 1:From root@localhost Mon Mar 8 14:05:52 2004X-Original-To: marcs@localhostDelivered-To: marcs@localhostTo: marcs@localhostSubject: testDate: Mon, 8 Mar 2004 14:05:52 +0200 (SAST)From: root@localhost (Charlie Root)This is a test message, please reply if you receive it.</pre><p>As can be seen in the example above, the <b class="KEYCAP">t</b> key will cause themessage to be displayed with full headers. To display the list of messages again, the <bclass="KEYCAP">h</b> key should be used.</p><p>If the email requires a response, you may use <tt class="COMMAND">mail</tt> to reply,by using either the <b class="KEYCAP">R</b> or <b class="KEYCAP">r</b> <ttclass="COMMAND">mail</tt> keys. The <b class="KEYCAP">R</b> key instructs <ttclass="COMMAND">mail</tt> to reply only to the sender of the email, while <bclass="KEYCAP">r</b> replies not only to the sender, but also to other recipients of themessage. You may also suffix these commands with the mail number which you would likemake a reply to. Once this has been done, the response should be entered, and the end ofthe message should be marked by a single <b class="KEYCAP">.</b> on a new line. Anexample can be seen below:</p><pre class="SCREEN">& <kbd class="USERINPUT">R 1</kbd>To: root@localhostSubject: Re: test<kbd class="USERINPUT">Thank you, I did get your email..</kbd>EOT</pre><p>In order to send new email, the <b class="KEYCAP">m</b> key should be used, followedby the recipient email address. Multiple recipients may also be specified by separatingeach address with the <b class="KEYCAP">,</b> delimiter. The subject of the message maythen be entered, followed by the message contents. The end of the message should bespecified by putting a single <b class="KEYCAP">.</b> on a new line.</p><pre class="SCREEN">& <kbd class="USERINPUT">mail root@localhost</kbd>Subject: <kbd class="USERINPUT">I mastered mailNow I can send and receive email using mail ... :).</kbd>EOT</pre><p>While inside the <tt class="COMMAND">mail</tt> utility, the <b class="KEYCAP">?</b>command may be used to display help at any time, the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">mail</span>(1)</span> manual page should also be consulted for morehelp with <tt class="COMMAND">mail</tt>.</p><div class="NOTE"><blockquote class="NOTE"><p><b>注:</b> As previously mentioned, the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">mail</span>(1)</span> command was not originally designed to handleattachments, and thus deals with them very poorly. Newer <acronymclass="ACRONYM">MUA</acronym>s such as <b class="APPLICATION">mutt</b> handle attachmentsin a much more intelligent way. But should you still wish to use the <ttclass="COMMAND">mail</tt> command, the <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/converters/mpack/pkg-descr"><ttclass="FILENAME">converters/mpack</tt></a> port may be of considerable use.</p></blockquote></div></div><div class="SECT2"><h2 class="SECT2"><a id="MUTT-COMMAND" name="MUTT-COMMAND">22.11.2. mutt</a></h2><p><b class="APPLICATION">mutt</b> is a small yet very powerful Mail User Agent, withexcellent features, just some of which include:</p><ul><li><p>The ability to thread messages;</p></li><li><p>PGP support for digital signing and encryption of email;</p></li><li><p>MIME Support;</p>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -