Move relay-domains section from Troubleshooting to Sendmail Config Files.

Sponsored by:	iXsystems
This commit is contained in:
Dru Lavigne 2014-05-12 13:17:55 +00:00
parent 180dfb388b
commit cb19dea373
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44812

View file

@ -525,6 +525,42 @@ postmaster@example.com postmaster@noc.example.net
&prompt.root; <userinput>service sendmail restart</userinput></screen>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>/etc/mail/relay-domains</filename></term>
<listitem>
<para>In a default &os; installation,
<application>Sendmail</application> is configured to only
send mail from the host it is running on. For example,
if a <acronym>POP</acronym> server is available, users
will be able to check mail from remote locations but they
will not be able to send outgoing emails from outside
locations. Typically, a few moments after the attempt, an
email will be sent from <literal>MAILER-DAEMON</literal>
with a <errorname>5.7 Relaying Denied</errorname> message.</para>
<para>The most straightforward solution is to add the
<acronym>ISP</acronym>'s <acronym>FQDN</acronym> to
<filename>/etc/mail/relay-domains</filename>. If multiple
addresses are needed, add them one per
line:</para>
<programlisting>your.isp.example.com
other.isp.example.net
users-isp.example.org
www.example.org</programlisting>
<para>After creating or editing this file, restart
<application>Sendmail</application> with
<command>service sendmail restart</command>.</para>
<para>Now any mail sent through the system by any host in
this list, provided the user has an account on the system,
will succeed. This allows users to send mail from the
system remotely without opening the system up to relaying
<acronym>SPAM</acronym> from the Internet.</para>
</listitem>
</varlistentry>
</variablelist>
</sect1>
@ -862,54 +898,6 @@ machine <quote>customer.com</quote> as well as
the DNS for <quote>customer.com</quote>.</programlisting>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>Why do I keep getting <errorname>Relaying
Denied</errorname> errors when sending mail from other
hosts?</para>
</question>
<answer>
<para>In a default &os; installation,
<application>Sendmail</application> is configured to only
send mail from the host it is running on. For example,
if a <acronym>POP</acronym> server is available, users
will be able to check mail from remote locations but they
will not be able to send outgoing emails from outside
locations. Typically, a few moments after the attempt, an
email will be sent from <literal>MAILER-DAEMON</literal>
with a <errorname>5.7 Relaying Denied</errorname>.</para>
<para>The most straightforward solution is to add the ISP's
FQDN to <filename>/etc/mail/relay-domains</filename>, as
seen in this example:</para>
<screen>&prompt.root; <userinput>echo "your.isp.example.com" &gt; /etc/mail/relay-domains</userinput></screen>
<para>After creating or editing this file, restart
<application>Sendmail</application>. This works great if
the server administrator does not wish to send mail
locally, would like to use a <acronym>MUA</acronym> on a
remote machine, or would like to use another
<acronym>ISP</acronym> for remote connections. It is also
useful when there is only one or two email accounts. If
there are a large number of addresses, add them one per
line:</para>
<programlisting>your.isp.example.com
other.isp.example.net
users-isp.example.org
www.example.org</programlisting>
<para>Now any mail sent through the system by any host in
this list, provided the user has an account on the system,
will succeed. This allows users to send mail from the
system remotely without opening the system up to relaying
SPAM from the Internet.</para>
</answer>
</qandaentry>
</qandaset>
</sect1>