⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mail-using.html

📁 FreeBSD操作系统的详细使用手册
💻 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>Using Electronic Mail</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="Electronic Mail" href="mail.html" /><link rel="PREVIOUS" title="Electronic Mail" href="mail.html" /><link rel="NEXT" title="sendmail Configuration" href="sendmail.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></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 Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="mail.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 22 Electronic Mail</td><td width="10%" align="right" valign="bottom"><a href="sendmail.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="MAIL-USING" name="MAIL-USING">22.2 Using ElectronicMail</a></h1><p>There are five major parts involved in an email exchange. They are: <ahref="mail-using.html#MAIL-MUA">the user program</a>, <ahref="mail-using.html#MAIL-MTA">the server daemon</a>, <ahref="mail-using.html#MAIL-DNS">DNS</a>, <a href="mail-using.html#MAIL-RECEIVE">a remoteor local mailbox</a>, and of course, <a href="mail-using.html#MAIL-HOST">the mailhostitself</a>.</p><div class="SECT2"><h2 class="SECT2"><a id="MAIL-MUA" name="MAIL-MUA">22.2.1 The User Program</a></h2><p>This includes command line programs such as <b class="APPLICATION">mutt</b>, <bclass="APPLICATION">pine</b>, <b class="APPLICATION">elm</b>, and <ttclass="COMMAND">mail</tt>, and <acronym class="ACRONYM">GUI</acronym> programs such as <bclass="APPLICATION">balsa</b>, <b class="APPLICATION">xfmail</b> to name a few, andsomething more ``sophisticated'' like a WWW browser. These programs simply pass off theemail transactions to the local <a href="mail-using.html#MAIL-HOST">``mailhost''</a>,either by calling one of the <a href="mail-using.html#MAIL-MTA">server daemons</a>available, or delivering it over <acronym class="ACRONYM">TCP</acronym>.</p></div><div class="SECT2"><h2 class="SECT2"><a id="MAIL-MTA" name="MAIL-MTA">22.2.2 Mailhost Server Daemon</a></h2><p>FreeBSD ships with <b class="APPLICATION">sendmail</b> by default, but also supportnumerous other mail server daemons, just some of which include:</p><ul><li><p><b class="APPLICATION">exim</b>;</p></li><li><p><b class="APPLICATION">postfix</b>;</p></li><li><p><b class="APPLICATION">qmail</b>.</p></li></ul><p>The server daemon usually has two functions--it is responsible for receiving incomingmail as well as delivering outgoing mail. It is <span class="emphasis"><iclass="EMPHASIS">not</i></span> responsible for the collection of mail using protocolssuch as <acronym class="ACRONYM">POP</acronym> or <acronym class="ACRONYM">IMAP</acronym>to read your email, nor does it allow connecting to local <tt class="FILENAME">mbox</tt>or Maildir mailboxes. You may require an additional <ahref="mail-using.html#MAIL-RECEIVE">daemon</a> for that.</p><div class="WARNING"><blockquote class="WARNING"><p><b>Warning:</b> Older versions of <b class="APPLICATION">sendmail</b> have someserious security issues which may result in an attacker gaining local and/or remoteaccess to your machine. Make sure that you are running a current version to avoid theseproblems. Optionally, install an alternative <acronym class="ACRONYM">MTA</acronym> fromthe <a href="ports.html">FreeBSD Ports Collection</a>.</p></blockquote></div></div><div class="SECT2"><h2 class="SECT2"><a id="MAIL-DNS" name="MAIL-DNS">22.2.3 Email and DNS</a></h2><p>The Domain Name System (DNS) and its daemon <tt class="COMMAND">named</tt> play alarge role in the delivery of email. In order to deliver mail from your site to another,the server daemon will look up the remote site in the DNS to determine the host that willreceive mail for the destination. This process also occurs when mail is sent from aremote host to your mail server.</p><p><acronym class="ACRONYM">DNS</acronym> is responsible for mapping hostnames to IPaddresses, as well as for storing information specific to mail delivery, known as MXrecords. The MX (Mail eXchanger) record specifies which host, or hosts, will receive mailfor a particular domain. If you do not have an MX record for your hostname or domain, themail will be delivered directly to your host provided you have an A record pointing yourhostname to your IP address.</p><p>You may view the MX records for any domain by using the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=host&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">host</span>(1)</span></a> command, asseen in the example below:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbd class="USERINPUT">host -t mx FreeBSD.org</kbd>FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</pre></div><div class="SECT2"><h2 class="SECT2"><a id="MAIL-RECEIVE" name="MAIL-RECEIVE">22.2.4 Receiving Mail</a></h2><p>Receiving mail for your domain is done by the mail host. It will collect all mail sentto your domain and store it either in <tt class="FILENAME">mbox</tt> (the default methodfor storing mail) or Maildir format, depending on your configuration. Once mail has beenstored, it may either be read locally using applications such as <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=mail&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">mail</span>(1)</span></a> or <bclass="APPLICATION">mutt</b>, or remotely accessed and collected using protocols such as<acronym class="ACRONYM">POP</acronym> or <acronym class="ACRONYM">IMAP</acronym>. Thismeans that should you only wish to read mail locally, you are not required to install a<acronym class="ACRONYM">POP</acronym> or <acronym class="ACRONYM">IMAP</acronym>server.</p><div class="SECT3"><h3 class="SECT3"><a id="POP-AND-IMAP" name="POP-AND-IMAP">22.2.4.1 Accessing remotemailboxes using <acronym class="ACRONYM">POP</acronym> and <acronymclass="ACRONYM">IMAP</acronym></a></h3><p>In order to access mailboxes remotely, you are required to have access to a <acronymclass="ACRONYM">POP</acronym> or <acronym class="ACRONYM">IMAP</acronym> server. Theseprotocols allow users to connect to their mailboxes from remote locations with ease.Though both <acronym class="ACRONYM">POP</acronym> and <acronymclass="ACRONYM">IMAP</acronym> allow users to remotely access mailboxes, <acronymclass="ACRONYM">IMAP</acronym> offers many advantages, some of which are:</p><ul><li><p><acronym class="ACRONYM">IMAP</acronym> can store messages on a remote server as wellas fetch them.</p></li><li><p><acronym class="ACRONYM">IMAP</acronym> supports concurrent updates.</p></li><li><p><acronym class="ACRONYM">IMAP</acronym> can be extremely useful over low-speed linksas it allows users to fetch the structure of messages without downloading them; it canalso perform tasks such as searching on the server in order to minimize data transferbetween clients and servers.</p></li></ul><p>In order to install a <acronym class="ACRONYM">POP</acronym> or <acronymclass="ACRONYM">IMAP</acronym> server, the following steps should be performed:</p><div class="PROCEDURE"><ol type="1"><li><p>Choose an <acronym class="ACRONYM">IMAP</acronym> or <acronymclass="ACRONYM">POP</acronym> server that best suits your needs. The following <acronymclass="ACRONYM">POP</acronym> and <acronym class="ACRONYM">IMAP</acronym> servers arewell known and serve as some good examples:</p><ul><li><p><b class="APPLICATION">qpopper</b>;</p></li><li><p><b class="APPLICATION">teapop</b>;</p></li><li><p><b class="APPLICATION">imap-uw</b>;</p></li><li><p><b class="APPLICATION">courier-imap</b>;</p></li></ul></li><li><p>Install the <acronym class="ACRONYM">POP</acronym> or <acronymclass="ACRONYM">IMAP</acronym> daemon of your choosing from the ports collection.</p></li><li><p>Where required, modify <tt class="FILENAME">/etc/inetd.conf</tt> to load the <acronymclass="ACRONYM">POP</acronym> or <acronym class="ACRONYM">IMAP</acronym> server.</p></li></ol></div><div class="WARNING"><blockquote class="WARNING"><p><b>Warning:</b> It should be noted that both <acronym class="ACRONYM">POP</acronym>and <acronym class="ACRONYM">IMAP</acronym> transmit information, including username andpassword credentials in clear-text. This means that if you wish to secure thetransmission of information across these protocols, you should consider tunnelingsessions over <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=ssh&sektion=1&manpath=OpenBSD+3.4"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">ssh</span>(1)</span></a>. Tunnelingsessions is described in <a href="openssh.html#SECURITY-SSH-TUNNELING">Section14.12.7</a>.</p></blockquote></div></div><div class="SECT3"><h3 class="SECT3"><a id="LOCAL" name="LOCAL">22.2.4.2 Accessing local mailboxes</a></h3><p>Mailboxes may be accessed locally by directly utilizing <acronymclass="ACRONYM">MUA</acronym>s on the server on which the mailbox resides. This can bedone using applications such as <b class="APPLICATION">mutt</b> or <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=mail&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">mail</span>(1)</span></a>.</p></div></div><div class="SECT2"><h2 class="SECT2"><a id="MAIL-HOST" name="MAIL-HOST">22.2.5 The Mail Host</a></h2><p>The mail host is the name given to a server that is responsible for delivering andreceiving mail for your host, and possibly your network.</p></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="mail.html" accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="sendmail.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Electronic Mail</td><td width="34%" align="center" valign="top"><a href="mail.html" accesskey="U">Up</a></td><td width="33%" align="right" valign="top"><b class="APPLICATION">sendmail</b>Configuration</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting &#60;<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>&#62;.<br />For questions about this documentation, e-mail &#60;<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>&#62;.</small></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -