Editorial review of Replacing MTA chapter.
Add needed periodic.conf entries and update mailer.conf with Postfix example. Sponsored by: iXsystems
This commit is contained in:
parent
5b0fafe3a3
commit
8a89a2d05e
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44809
1 changed files with 85 additions and 85 deletions
|
@ -539,7 +539,7 @@ postmaster@example.com postmaster@noc.example.net
|
|||
<authorgroup>
|
||||
<author><personname><firstname>Gregory</firstname><surname>Neil
|
||||
Shapiro</surname></personname><contrib>Information taken
|
||||
from emails written by</contrib></author>
|
||||
from emails written by </contrib></author>
|
||||
</authorgroup>
|
||||
</info>
|
||||
|
||||
|
@ -550,30 +550,22 @@ postmaster@example.com postmaster@noc.example.net
|
|||
|
||||
<para>&os; comes with <application>Sendmail</application> already
|
||||
installed as the <acronym>MTA</acronym> which is in charge of
|
||||
outgoing and incoming mail.</para>
|
||||
outgoing and incoming mail. However, the system administrator
|
||||
can change the system's <acronym>MTA</acronym>. A wide choice
|
||||
of alternative <acronym>MTA</acronym>s is available from the
|
||||
<literal>mail</literal> category of the &os; Ports
|
||||
Collection.</para>
|
||||
|
||||
<para>However, the system administrator can change the system's
|
||||
<acronym>MTA</acronym>. The reasons for doing so range from
|
||||
wanting to try out another <acronym>MTA</acronym> to needing a
|
||||
specific feature or package which relies on another
|
||||
<acronym>MTA</acronym>. Whatever the reason, &os; makes it
|
||||
easy to make the change.</para>
|
||||
<para>Once a new <acronym>MTA</acronym> is installed, configure
|
||||
and test the new software before replacing
|
||||
<application>Sendmail</application>. Refer to the documentation
|
||||
of the new <acronym>MTA</acronym> for information on how to
|
||||
configure the software.</para>
|
||||
|
||||
<sect2>
|
||||
<title>Install a New <acronym>MTA</acronym></title>
|
||||
|
||||
<para>A wide choice of <acronym>MTA</acronym>s is available
|
||||
from the <literal>mail</literal> category of the <link
|
||||
linkend="ports">&os; Ports Collection</link>.</para>
|
||||
|
||||
<para>Once a new <acronym>MTA</acronym> is installed, configure
|
||||
the new software and decide if it really fulfills your needs
|
||||
before replacing <application>Sendmail</application>.</para>
|
||||
|
||||
<para>Refer to the new chosen <acronym>MTA</acronym>'s
|
||||
documentation for information on how to configure the
|
||||
software.</para>
|
||||
</sect2>
|
||||
<para>Once the new <acronym>MTA</acronym> is working, use the
|
||||
instructions in this section to disable
|
||||
<application>Sendmail</application> and configure &os; to use
|
||||
the replacement <acronym>MTA</acronym>.</para>
|
||||
|
||||
<sect2 xml:id="mail-disable-sendmail">
|
||||
<title>Disable <application>Sendmail</application></title>
|
||||
|
@ -586,14 +578,13 @@ postmaster@example.com postmaster@noc.example.net
|
|||
their results by email. Many parts of the system expect a
|
||||
functional <acronym>MTA</acronym>. If applications continue
|
||||
to use <application>Sendmail</application>'s binaries to try
|
||||
to send email they are disabled, mail could go into an
|
||||
inactive <application>Sendmail</application> queue, and
|
||||
to send email after they are disabled, mail could go into an
|
||||
inactive <application>Sendmail</application> queue and
|
||||
never be delivered.</para>
|
||||
</warning>
|
||||
|
||||
<para>In order to completely disable
|
||||
<application>Sendmail</application>, including the outgoing
|
||||
mail service, add or edit the following lines in
|
||||
<application>Sendmail</application>, add or edit the following lines in
|
||||
<filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>sendmail_enable="NO"
|
||||
|
@ -602,90 +593,99 @@ sendmail_outbound_enable="NO"
|
|||
sendmail_msp_queue_enable="NO"</programlisting>
|
||||
|
||||
<para>To only disable <application>Sendmail</application>'s
|
||||
incoming mail service, set</para>
|
||||
incoming mail service, use only this entry in
|
||||
<filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>sendmail_enable="NO"</programlisting>
|
||||
|
||||
<para>in <filename>/etc/rc.conf</filename>. More information
|
||||
<para>More information
|
||||
on <application>Sendmail</application>'s startup options
|
||||
is available in &man.rc.sendmail.8;.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Running the New <acronym>MTA</acronym> on Boot</title>
|
||||
<title>Replace the Default <acronym>MTA</acronym></title>
|
||||
|
||||
<para>The new <acronym>MTA</acronym> can be started during
|
||||
boot by adding a configuration line to
|
||||
<filename>/etc/rc.conf</filename>. This example enables the
|
||||
<para>When a new <acronym>MTA</acronym> is installed using the
|
||||
Ports Collection, its startup script is also installed and
|
||||
startup instructions are mentioned in its package message.
|
||||
Before starting the new <acronym>MTA</acronym>, stop the
|
||||
running <application>Sendmail</application> processes. This
|
||||
example stops all of these services, then starts the
|
||||
<application>Postfix</application> service:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>service sendmail stop</userinput>
|
||||
&prompt.root; <userinput>service postfix start</userinput></screen>
|
||||
|
||||
<para>To start the replacement <acronym>MTA</acronym> at system boot,
|
||||
add its configuration line to
|
||||
<filename>/etc/rc.conf</filename>. This entry enables the
|
||||
Postfix <acronym>MTA</acronym>:</para>
|
||||
|
||||
<screen>&prompt.root; echo
|
||||
'<replaceable>postfix</replaceable>_enable=<quote>YES</quote>'
|
||||
>> /etc/rc.conf</screen>
|
||||
<programlisting>postfix_enable="YES"</programlisting>
|
||||
|
||||
<para>The specified <acronym>MTA</acronym> will now be
|
||||
automatically started during boot.</para>
|
||||
</sect2>
|
||||
<para>Some extra configuration is needed as
|
||||
<application>Sendmail</application> is so ubiquitous that some software assumes
|
||||
it is already installed and configured. Check
|
||||
<filename>/etc/periodic.conf</filename> and make sure that
|
||||
these values are set to <literal>NO</literal>. If this file
|
||||
does not exist, create it with these entries:</para>
|
||||
|
||||
<sect2>
|
||||
<title>Replacing <application>Sendmail</application> as
|
||||
the System's Default Mailer</title>
|
||||
<programlisting>daily_clean_hoststat_enable="NO"
|
||||
daily_status_mail_rejects_enable="NO"
|
||||
daily_status_include_submit_mailq="NO"
|
||||
daily_submit_queuerun="NO"</programlisting>
|
||||
|
||||
<para><application>Sendmail</application> is so ubiquitous as
|
||||
standard software on &unix; systems that some software assumes
|
||||
it is already installed and configured. For this reason, many
|
||||
alternative <acronym>MTA</acronym>s provide their own
|
||||
<para>Some alternative <acronym>MTA</acronym>s provide their own
|
||||
compatible implementations of the
|
||||
<application>Sendmail</application> command-line interface in
|
||||
order to facilitate using them as <quote>drop-in</quote>
|
||||
replacements for <application>Sendmail</application>.</para>
|
||||
order to facilitate using them as drop-in
|
||||
replacements for <application>Sendmail</application>.
|
||||
However, some <acronym>MUA</acronym>s may
|
||||
try to execute standard
|
||||
<application>Sendmail</application> binaries instead of the
|
||||
new <acronym>MTA</acronym>'s binaries. &os; uses
|
||||
<filename>/etc/mail/mailer.conf</filename> to map the expected
|
||||
<application>Sendmail</application> binaries to the location of the new
|
||||
binaries. More information about this mapping can be found in
|
||||
&man.mailwrapper.8;.</para>
|
||||
|
||||
<para>When using an alternative <acronym>MTA</acronym>,
|
||||
make sure that software trying to execute standard
|
||||
<application>Sendmail</application> binaries, such as
|
||||
<filename>/usr/bin/sendmail</filename>, actually execute
|
||||
the chosen mailer instead. Fortunately, &os; provides a
|
||||
system called &man.mailwrapper.8; for this purpose.</para>
|
||||
|
||||
<para>When <application>Sendmail</application> is operating
|
||||
as installed,
|
||||
<filename>/etc/mail/mailer.conf</filename> will look like
|
||||
<para>The default
|
||||
<filename>/etc/mail/mailer.conf</filename> looks like
|
||||
this:</para>
|
||||
|
||||
<programlisting>sendmail /usr/libexec/sendmail/sendmail
|
||||
send-mail /usr/libexec/sendmail/sendmail
|
||||
mailq /usr/libexec/sendmail/sendmail
|
||||
newaliases /usr/libexec/sendmail/sendmail
|
||||
hoststat /usr/libexec/sendmail/sendmail
|
||||
purgestat /usr/libexec/sendmail/sendmail</programlisting>
|
||||
<programlisting># $FreeBSD$
|
||||
#
|
||||
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
|
||||
#
|
||||
sendmail /usr/libexec/sendmail/sendmail
|
||||
send-mail /usr/libexec/sendmail/sendmail
|
||||
mailq /usr/libexec/sendmail/sendmail
|
||||
newaliases /usr/libexec/sendmail/sendmail
|
||||
hoststat /usr/libexec/sendmail/sendmail
|
||||
purgestat /usr/libexec/sendmail/sendmail</programlisting>
|
||||
|
||||
<para>When any of the commands listed on the left are run,
|
||||
the system actually executes the associated command shown on
|
||||
the right instead. This system makes it easy to change what
|
||||
the right. This system makes it easy to change what
|
||||
binaries are executed when these default
|
||||
<filename>Sendmail</filename> functions are invoked.</para>
|
||||
binaries are invoked.</para>
|
||||
|
||||
<para>As an example, to run
|
||||
<filename>/usr/local/supermailer/bin/sendmail-compat</filename>
|
||||
instead of <application>Sendmail</application>, specify the
|
||||
paths to the installed applications in
|
||||
<filename>/etc/mail/mailer.conf</filename>:</para>
|
||||
<para>Some <acronym>MTA</acronym>s, when installed using the
|
||||
Ports Collection, will prompt to update this file for the new
|
||||
binaries. For example, <application>Postfix</application>
|
||||
will update the file like this:</para>
|
||||
|
||||
<programlisting>sendmail /usr/local/supermailer/bin/sendmail-compat
|
||||
send-mail /usr/local/supermailer/bin/sendmail-compat
|
||||
mailq /usr/local/supermailer/bin/mailq-compat
|
||||
newaliases /usr/local/supermailer/bin/newaliases-compat
|
||||
hoststat /usr/local/supermailer/bin/hoststat-compat
|
||||
purgestat /usr/local/supermailer/bin/purgestat-compat</programlisting>
|
||||
</sect2>
|
||||
<programlisting>#
|
||||
# Execute the Postfix sendmail program, named /usr/local/sbin/sendmail
|
||||
#
|
||||
sendmail /usr/local/sbin/sendmail
|
||||
send-mail /usr/local/sbin/sendmail
|
||||
mailq /usr/local/sbin/sendmail
|
||||
newaliases /usr/local/sbin/sendmail</programlisting>
|
||||
|
||||
<sect2>
|
||||
<title>Finishing</title>
|
||||
|
||||
<para>Once everything is configured, either kill the
|
||||
unneeded <application>sendmail</application> processes and
|
||||
start the processes belonging to the new software, or
|
||||
reboot. Rebooting provides the opportunity to ensure that
|
||||
<para>Once everything is configured, it is recommended to
|
||||
reboot the system. Rebooting provides the opportunity to ensure that
|
||||
the system is correctly configured to start the new
|
||||
<acronym>MTA</acronym> automatically on boot.</para>
|
||||
</sect2>
|
||||
|
|
Loading…
Reference in a new issue