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

📄 outgoing-only.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>Setting up to send only</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 与 UUCP" href="smtp-uucp.html" /><link rel="NEXT" title="拨号连接时使用邮件传送" href="smtp-dialup.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-uucp.html"accesskey="P">后退</a></td><td width="80%" align="center" valign="bottom">章 22. 电子邮件</td><td width="10%" align="right" valign="bottom"><a href="smtp-dialup.html"accesskey="N">前进</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="OUTGOING-ONLY" name="OUTGOING-ONLY">22.8. Setting up to sendonly</a></h1><i class="AUTHORGROUP"><span class="CONTRIB">Contributed by</span> Bill Moran.</i> <p>There are many instances where you may only want to send mail through a relay. Someexamples are:</p><ul><li><p>Your computer is a desktop machine, but you want to use programs such as <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">send-pr</span>(1)</span>. To do so, youshould use your ISP's mail relay.</p></li><li><p>The computer is a server that does not handle mail locally, but needs to pass off allmail to a relay for processing.</p></li></ul><p>Just about any <acronym class="ACRONYM">MTA</acronym> is capable of filling thisparticular niche. Unfortunately, it can be very difficult to properly configure afull-featured <acronym class="ACRONYM">MTA</acronym> just to handle offloading mail.Programs such as <b class="APPLICATION">sendmail</b> and <bclass="APPLICATION">postfix</b> are largely overkill for this use.</p><p>Additionally, if you are using a typical Internet access service, your agreement mayforbid you from running a ``mail server''.</p><p>The easiest way to fulfill those needs is to install the <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/mail/ssmtp/pkg-descr"><ttclass="FILENAME">mail/ssmtp</tt></a> port. Execute the following commands as <ttclass="USERNAME">root</tt>:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">cd /usr/ports/mail/ssmtp</kbd><samp class="PROMPT">#</samp> <kbd class="USERINPUT">make install replace clean</kbd></pre><p>Once installed, <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/mail/ssmtp/pkg-descr"><ttclass="FILENAME">mail/ssmtp</tt></a> can be configured with a four-line file located at<tt class="FILENAME">/usr/local/etc/ssmtp/ssmtp.conf</tt>:</p><pre class="PROGRAMLISTING">root=yourrealemail@example.commailhub=mail.example.comrewriteDomain=example.comhostname=_HOSTNAME_</pre><p>Make sure you use your real email address for <tt class="USERNAME">root</tt>. Enteryour ISP's outgoing mail relay in place of <tt class="HOSTID">mail.example.com</tt> (someISPs call this the ``outgoing mail server'' or ``SMTP server'').</p><p>Make sure you disable <b class="APPLICATION">sendmail</b> by setting <varclass="LITERAL">sendmail_enable="NONE"</var> in <ttclass="FILENAME">/etc/rc.conf</tt>.</p><p><a href="http://www.FreeBSD.org/cgi/url.cgi?ports/mail/ssmtp/pkg-descr"><ttclass="FILENAME">mail/ssmtp</tt></a> has some other options available. See the exampleconfiguration file in <tt class="FILENAME">/usr/local/etc/ssmtp</tt> or the manual pageof <b class="APPLICATION">ssmtp</b> for some examples and more information.</p><p>Setting up <b class="APPLICATION">ssmtp</b> in this manner will allow any software onyour computer that needs to send mail to function properly, while not violating yourISP's usage policy or allowing your computer to be hijacked for spamming.</p></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="smtp-uucp.html"accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">起点</a></td><td width="33%" align="right" valign="top"><a href="smtp-dialup.html"accesskey="N">前进</a></td></tr><tr><td width="33%" align="left" valign="top">SMTP 与 UUCP</td><td width="34%" align="center" valign="top"><a href="mail.html"accesskey="U">上一级</a></td><td width="33%" align="right" valign="top">拨号连接时使用邮件传送</td></tr></table></div></body></html>

⌨️ 快捷键说明

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