glfs/server/mail/sendmail.xml

338 lines
12 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY sendmail-download-ftp "ftp://ftp.sendmail.org/pub/sendmail/sendmail.&sendmail-version;.tar.gz">
<!ENTITY sendmail-download-http "http://www.sendmail.org/ftp/sendmail.&sendmail-version;.tar.gz">
<!ENTITY sendmail-md5sum "2809fbf9c8b067947b650d0128928d05">
<!ENTITY sendmail-size "1.9 MB">
<!ENTITY sendmail-buildsize "18.8 MB">
<!ENTITY sendmail-time "0.38 SBU">
]>
<sect1 id="sendmail" xreflabel="Sendmail-&sendmail-version;">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="sendmail.html"?>
<title>Sendmail-&sendmail-version;</title>
<indexterm zone="sendmail">
<primary sortas="a-Sendmail">Sendmail</primary></indexterm>
<sect2>
<title>Introduction to <application>Sendmail</application></title>
<para>The <application>Sendmail</application> package contains a Mail
Transport Agent (<acronym>MTA</acronym>).</para>
<sect3><title>Package information</title>
<itemizedlist spacing='compact'>
<listitem><para>Download (HTTP):
<ulink url="&sendmail-download-http;"/></para></listitem>
<listitem><para>Download (FTP):
<ulink url="&sendmail-download-ftp;"/></para></listitem>
<listitem><para>Download MD5 sum: &sendmail-md5sum;</para></listitem>
<listitem><para>Download size: &sendmail-size;</para></listitem>
<listitem><para>Estimated disk space required:
&sendmail-buildsize;</para></listitem>
<listitem><para>Estimated build time:
&sendmail-time;</para></listitem></itemizedlist>
</sect3>
<sect3><title><application>Sendmail</application> dependencies</title>
<sect4><title>Required</title>
<para><xref linkend="db"/> and <xref linkend="procmail"/></para>
</sect4>
<sect4><title>Optional</title>
<para><xref linkend="openssl"/>,
<xref linkend="openldap"/>,
<xref linkend="tcpwrappers"/>,
<xref linkend="pcre"/>,
<xref linkend="cyrus-sasl"/>,
<ulink url="http://www-dev.cites.uiuc.edu/ph/nph/">nph</ulink>, and
<xref linkend="gs"/> or <xref linkend="espgs"/> (for creating
<acronym>PDF</acronym> documentation)</para>
</sect4>
</sect3>
</sect2>
<sect2>
<title>Installation of <application>Sendmail</application></title>
<para>Before building <application>Sendmail</application>, create the users,
groups and directories that <application>Sendmail</application> requires
with the following commands issued as the root user:</para>
<screen><userinput role='root'><command>groupadd smmsp &amp;&amp;
groupadd mail &amp;&amp;
useradd -c "Sendmail Daemon" -g smmsp -G mail smmsp &amp;&amp;
chmod 1777 /var/mail &amp;&amp;
mkdir /var/spool/mqueue</command></userinput></screen>
<para><emphasis>Note:</emphasis> See the source tree
<filename>sendmail/README</filename> file for information on linking optional
packages into the build. Use the example below, which adds support for
<application>tcpwrappers</application>, <acronym>SASL</acronym>,
Start<acronym>TLS</acronym>
(<application>Open<acronym>SSL</acronym></application>) and
<application>Open<acronym>LDAP</acronym></application>, as a starting point.
Of course, modify it to suit your particular needs.</para>
<screen><userinput><command>cat &gt;&gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"</command>
APPENDDEF(`confENVDEF',`-DSTARTTLS -DTCPWRAPPERS -DSASL -DLDAPMAP')
APPENDDEF(`confLIBS', `-lssl -lcrypto -lwrap -lsasl2 -lldap -llber')
APPENDDEF(`confINCDIRS', `-I/usr/include/sasl')
<command>EOF</command></userinput></screen>
<para>Install <application>Sendmail</application> with the following
commands:</para>
<screen><userinput><command>cat &gt;&gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"</command>
define(`confMANGRP',`root')
define(`confMANOWN',`root')
define(`confSBINGRP',`root')
define(`confUBINGRP',`root')
define(`confUBINOWN',`root')
<command>EOF
cd sendmail &amp;&amp;
sh Build &amp;&amp;
cd ../cf/cf &amp;&amp;
cp generic-linux.mc sendmail.mc &amp;&amp;
sh Build sendmail.cf</command></userinput></screen>
<para>Now, as the root user:</para>
<screen><userinput role='root'><command>install -v -d -m755 /etc/mail &amp;&amp;
sh Build install-cf &amp;&amp;
cd ../../ &amp;&amp;
sh Build install &amp;&amp;
cp -v -R cf/* /etc/mail &amp;&amp;
cp -v cf/cf/{submit,sendmail}.mc /etc/mail &amp;&amp;
for manpage in sendmail editmap mailstats makemap praliases smrsh
do
install -v -m444 $manpage/$manpage.8 /usr/share/man/man8
done &amp;&amp;
install -v -m444 sendmail/aliases.5 /usr/share/man/man5 &amp;&amp;
install -v -m444 sendmail/mailq.1 /usr/share/man/man1 &amp;&amp;
install -v -m444 sendmail/newaliases.1 /usr/share/man/man1 &amp;&amp;
install -v -m444 vacation/vacation.1 /usr/share/man/man1</command></userinput></screen>
<para>Install the <application>Sendmail</application> Installation and
Operations Guide with the following commands:</para>
<screen><userinput><command>cd doc/op &amp;&amp;
sed -i -e 's/groff/GROFF_NO_SGR=1 groff/' Makefile &amp;&amp;
make op.txt op.pdf</command></userinput></screen>
<para>Now, as the root user:</para>
<screen><userinput role='root'><command>install -v -d -m755 /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
install -v -m644 op.ps op.txt op.pdf \
/usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
cd ../../</command></userinput></screen>
<para><emphasis>Note:</emphasis> remove <filename>op.pdf</filename> from the
<command>make</command> and <command>install</command> commands if you don't
have <application>Ghostscript</application> installed.</para>
</sect2>
<sect2>
<title>Command explanations</title>
<para><command>cat &gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"</command>:
This creates a configuration file changing some of the default settings.</para>
<para><command>sh Build; sh Build sendmail.cf; sh Build install-cf;
sh Build install</command>: <application>Sendmail</application> uses an
<application>m4</application> based build script to create the various
<filename>Makefile</filename>'s. These commands build and install the
package.</para>
<para><command>for manpage in...;do...;done; install ...</command>: The man
pages are installed already formatted and <command>man</command> displays them
somewhat garbled. These commands replace the formatted pages with
pages <command>man</command> can display properly.</para>
</sect2>
<sect2>
<title>Configuring <application>Sendmail</application></title>
<sect3 id="sendmail-config"><title>Config files</title>
<para><filename>/etc/mail/*</filename></para>
<indexterm zone="sendmail sendmail-config">
<primary sortas="e-etc-mail">/etc/mail/*</primary></indexterm>
</sect3>
<sect3><title>Configuration information</title>
<para>Create the <filename>/etc/mail/local-host-names</filename> and
<filename>/etc/mail/aliases</filename> files using the following
commands as the root user:</para>
<screen><userinput role='root'><command>echo $(hostname) > /etc/mail/local-host-names
cat &gt; /etc/mail/aliases &lt;&lt; "EOF"</command>
postmaster: root
MAILER-DAEMON: root
<command>EOF
newaliases -v</command></userinput></screen>
<para><application>Sendmail</application>'s primary configuration file,
<filename>/etc/mail/sendmail.cf</filename>, is complex and not meant to be
directly edited. The recommended method to make changes is to modify
<filename>/etc/mail/sendmail.mc</filename>, and various
<application>m4</application> files, then run the <command>m4</command>
macro processor from within <filename class='directory'>/etc/mail</filename>
as follows:</para>
<screen><userinput><command>m4 m4/cf.m4 sendmail.mc > sendmail.cf</command></userinput></screen>
<para>A full explanation of the files to modify, and the available parameters
can be found in <filename>/etc/mail/README</filename>.</para>
<para id="sendmail-init">To automate the running of
<application>Sendmail</application> at startup, install the
<filename>/etc/rc.d/init.d/sendmail</filename> init script included in the
<xref linkend="intro-important-bootscripts"/> package.</para>
<indexterm zone="sendmail sendmail-init">
<primary sortas="f-sendmail-init">sendmail</primary></indexterm>
<screen><userinput role='root'><command>make install-sendmail</command></userinput></screen>
<note><para>The -qNm option to <command>sendmail</command>, where N is number
of minutes, controls how often <application>Sendmail</application> will process
the mail queue. A default of 5 minutes is used in the init script. Individual
workstation users may want to set this as low as 1 minute, large installations
handling more mail may want to set it higher.</para></note>
</sect3>
</sect2>
<sect2>
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>editmap, hoststat, mailstats, mailq, makemap, newaliases, praliases,
purgestat, sendmail, smrsh and vacation</seg>
<seg>None</seg>
<seg>/etc/mail and /usr/share/doc/sendmail-&sendmail-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<varlistentry id="editmap">
<term><command>editmap</command></term>
<listitem><para>queries and edits <application>Sendmail</application> map
files.</para>
<indexterm zone="sendmail editmap">
<primary sortas="b-editmap">editmap</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="hoststat">
<term><command>hoststat</command></term>
<listitem><para>prints <application>Sendmail</application>'s persistent host
status.</para>
<indexterm zone="sendmail hoststat">
<primary sortas="b-hoststat">hoststat</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="mailstats">
<term><command>mailstats</command></term>
<listitem><para>displays <application>Sendmail</application> statistics.</para>
<indexterm zone="sendmail mailstats">
<primary sortas="b-mailstats">mailstats</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="mailq-sendmail">
<term><command>mailq</command></term>
<listitem><para>prints a summary of outbound mail messages waiting for
delivery.</para>
<indexterm zone="sendmail mailq-sendmail">
<primary sortas="b-mailq">mailq</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="makemap">
<term><command>makemap</command></term>
<listitem><para>creates <application>Sendmail</application> map files.</para>
<indexterm zone="sendmail makemap">
<primary sortas="b-makemap">makemap</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="newaliases-sendmail">
<term><command>newaliases</command></term>
<listitem><para>rebuilds <filename>/etc/mail/aliases.db</filename> from the
contents of <filename>/etc/mail/aliases</filename>.</para>
<indexterm zone="sendmail newaliases-sendmail">
<primary sortas="b-newaliases">newaliases</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="praliases">
<term><command>praliases</command></term>
<listitem><para>displays current <application>Sendmail</application>
aliases.</para>
<indexterm zone="sendmail praliases">
<primary sortas="b-praliases">praliases</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="purgestat">
<term><command>purgestat</command></term>
<listitem><para> causes <application>Sendmail</application> to clear (purge)
all its host-status information.</para>
<indexterm zone="sendmail purgestat">
<primary sortas="b-purgestat">purgestat</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="sendmail-prog-sendmail">
<term><command>sendmail</command></term>
<listitem><para>is the <application>Sendmail</application> mail transport
agent.</para>
<indexterm zone="sendmail sendmail-prog-sendmail">
<primary sortas="b-sendmail">sendmail</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="smrsh">
<term><command>smrsh</command></term>
<listitem><para>is a restricted shell for
<application>Sendmail</application>.</para>
<indexterm zone="sendmail smrsh">
<primary sortas="b-smrsh">smrsh</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="vacation-sendmail">
<term><command>vacation</command></term>
<listitem><para>is an email auto responder.</para>
<indexterm zone="sendmail vacation-sendmail">
<primary sortas="b-vacation">vacation</primary></indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>