2004-06-13 13:38:30 +08:00
|
|
|
<?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">
|
2004-06-23 04:13:40 +08:00
|
|
|
<!ENTITY sendmail-size "2.0 MB">
|
|
|
|
<!ENTITY sendmail-buildsize "18 MB">
|
2004-06-13 13:38:30 +08:00
|
|
|
<!ENTITY sendmail-time "0.43 SBU">
|
|
|
|
|
|
|
|
]>
|
|
|
|
|
2003-09-27 03:39:35 +08:00
|
|
|
<sect1 id="sendmail" xreflabel="Sendmail-&sendmail-version;">
|
2004-05-07 10:32:10 +08:00
|
|
|
<?dbhtml filename="sendmail.html"?>
|
2003-09-27 03:39:35 +08:00
|
|
|
<title>Sendmail-&sendmail-version;</title>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
2004-06-13 13:38:30 +08:00
|
|
|
<sect2>
|
|
|
|
<title>Introduction to <application>Sendmail</application></title>
|
|
|
|
|
2004-06-23 04:13:40 +08:00
|
|
|
<para>The <application>Sendmail</application> package contains a Mail
|
|
|
|
Transport Agent (<acronym>MTA</acronym>).</para>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<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 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>
|
2004-06-23 04:13:40 +08:00
|
|
|
|
2004-06-13 13:38:30 +08:00
|
|
|
<sect4><title>Required</title>
|
|
|
|
<para><xref linkend="db"/> and <xref linkend="procmail"/>
|
|
|
|
</para></sect4>
|
2004-06-23 04:13:40 +08:00
|
|
|
|
|
|
|
<sect4><title>Optional</title>
|
|
|
|
<para><xref linkend="openssl"/>, <xref linkend="openldap"/>,
|
|
|
|
<xref linkend="tcpwrappers"/>, <xref linkend="pcre"/>,
|
2004-08-05 14:30:48 +08:00
|
|
|
<xref linkend="cyrus-sasl"/>,
|
|
|
|
<ulink url="http://www-dev.cites.uiuc.edu/ph/nph/">nph</ulink> and
|
2004-07-23 11:51:03 +08:00
|
|
|
<xref linkend="gs"/> (for creating <acronym>PDF</acronym> documentation)
|
2004-06-23 04:13:40 +08:00
|
|
|
</para></sect4>
|
2004-06-13 13:38:30 +08:00
|
|
|
</sect3>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Installation of <application>Sendmail</application></title>
|
|
|
|
|
2004-06-23 04:13:40 +08:00
|
|
|
<para>Before building <application>Sendmail</application>, create the users,
|
|
|
|
groups and directories that <application>Sendmail</application> requires
|
|
|
|
with the following commands:</para>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<screen><userinput><command>groupadd smmsp &&
|
|
|
|
groupadd mail &&
|
|
|
|
useradd -g smmsp -G mail smmsp &&
|
|
|
|
chmod 1777 /tmp &&
|
|
|
|
chmod 1777 /var/mail &&
|
|
|
|
mkdir /var/spool/mqueue</command></userinput></screen>
|
|
|
|
|
2004-06-23 04:13:40 +08:00
|
|
|
<para>Install <application>Sendmail</application> with the following
|
|
|
|
commands:</para>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<screen><userinput><command>cat > devtools/Site/site.config.m4 << "EOF"
|
|
|
|
define(`confMANGRP',`root')
|
|
|
|
define(`confMANOWN',`root')
|
|
|
|
define(`confSBINGRP',`root')
|
|
|
|
define(`confUBINGRP',`root')
|
|
|
|
define(`confUBINOWN',`root')
|
|
|
|
EOF
|
|
|
|
cd sendmail &&
|
|
|
|
sh Build &&
|
|
|
|
cd ../cf/cf &&
|
|
|
|
cp generic-linux.mc sendmail.mc &&
|
|
|
|
mkdir /etc/mail &&
|
2004-06-23 04:13:40 +08:00
|
|
|
sh Build sendmail.cf &&
|
2004-06-13 13:38:30 +08:00
|
|
|
sh Build install-cf &&
|
|
|
|
cd ../../ &&
|
2004-07-25 11:09:08 +08:00
|
|
|
sh Build install &&
|
|
|
|
for manpage in sendmail editmap mailstats makemap praliases smrsh
|
|
|
|
do
|
|
|
|
install -o root -g root -m444 $manpage/$manpage.8 /usr/share/man/man8
|
|
|
|
done &&
|
|
|
|
install -o root -g root -m444 sendmail/aliases.5 /usr/share/man/man5 &&
|
|
|
|
install -o root -g root -m444 sendmail/mailq.1 /usr/share/man/man1 &&
|
|
|
|
install -o root -g root -m444 sendmail/newaliases.1 /usr/share/man/man1 &&
|
|
|
|
install -o root -g root -m444 vacation/vacation.1 /usr/share/man/man1</command></userinput></screen>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
2004-07-23 11:51:03 +08:00
|
|
|
<para><emphasis>Note:</emphasis> See the source tree
|
|
|
|
<filename>sendmail/README</filename> file for information on linking optional
|
|
|
|
packages into the build.</para>
|
|
|
|
|
2004-06-23 04:13:40 +08:00
|
|
|
<para>Install the <application>Sendmail</application> Installation and
|
|
|
|
Operations Guide with the following commands:</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>cd doc/op &&
|
|
|
|
sed -i -e 's/groff/GROFF_NO_SGR=1 groff/' Makefile &&
|
|
|
|
make op.txt op.pdf &&
|
|
|
|
install -d -m 755 /usr/share/doc/sendmail/&sendmail-version; &&
|
|
|
|
install -m 644 op.ps op.txt op.pdf /usr/share/doc/sendmail/&sendmail-version; &&
|
|
|
|
cd ../../</command></userinput></screen>
|
|
|
|
|
2004-07-25 11:09:08 +08:00
|
|
|
<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 > devtools/Site/site.config.m4 << "EOF"</command>:
|
|
|
|
This creates a configuration file changing some of the default settings.</para>
|
|
|
|
|
|
|
|
<screen><userinput><command>sh Build
|
|
|
|
sh Build sendmail.cf
|
|
|
|
sh Build install-cf
|
|
|
|
sh Build install</command></userinput></screen>
|
|
|
|
|
|
|
|
<para><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>
|
|
|
|
|
|
|
|
<screen><userinput><command>for manpage in...;do...;done:
|
|
|
|
install ...
|
|
|
|
install ...</command></userinput></screen>
|
|
|
|
|
|
|
|
<para> 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>
|
|
|
|
|
2004-06-13 13:38:30 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Configuring <application>Sendmail</application></title>
|
|
|
|
|
|
|
|
<sect3><title>Config files</title>
|
|
|
|
<para><filename>/etc/mail/*</filename></para>
|
|
|
|
</sect3>
|
|
|
|
|
2004-06-23 04:13:40 +08:00
|
|
|
<sect3><title>Configuration Commands</title>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<screen><userinput><command>echo `hostname` > /etc/mail/local-host-names
|
|
|
|
cat > /etc/mail/aliases << "EOF"
|
|
|
|
postmaster: root
|
|
|
|
MAILER-DAEMON: root
|
|
|
|
EOF
|
|
|
|
cp -R cf/* /etc/mail &&
|
|
|
|
cp cf/cf/{submit,sendmail}.mc /etc/mail &&
|
|
|
|
newaliases -v</command></userinput></screen>
|
|
|
|
|
2004-07-23 11:51:03 +08:00
|
|
|
<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>
|
|
|
|
|
2004-06-23 04:13:40 +08:00
|
|
|
<para>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>
|
2004-07-23 11:51:03 +08:00
|
|
|
|
2004-06-13 13:38:30 +08:00
|
|
|
<screen><userinput><command>make install-sendmail</command></userinput></screen>
|
|
|
|
|
2004-06-23 04:13:40 +08:00
|
|
|
<note><para>The -qNm option to <command>sendmail</command>, where N is number
|
2004-07-23 11:51:03 +08:00
|
|
|
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>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2>
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<para>The <application>Sendmail</application> package contains
|
2004-06-23 04:13:40 +08:00
|
|
|
<command>hoststat</command>,
|
|
|
|
<command>purgestat</command>,
|
2004-06-13 13:38:30 +08:00
|
|
|
<command>smrsh</command>,
|
|
|
|
<command>editmap</command>,
|
|
|
|
<command>makemap</command>,
|
|
|
|
<command>mailq</command>,
|
|
|
|
<command>newaliases</command>,
|
|
|
|
<command>sendmail</command>,
|
|
|
|
<command>vacation</command>,
|
|
|
|
<command>praliases</command> and
|
|
|
|
<command>mailstats</command>.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2><title>Description</title>
|
|
|
|
|
2004-06-23 04:13:40 +08:00
|
|
|
<sect3><title>hoststat</title>
|
|
|
|
<para><command>hoststat</command> prints <application>Sendmail</application>'s
|
|
|
|
persistent host status.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
2004-06-23 04:19:56 +08:00
|
|
|
<sect3><title>purgestat</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>purgestat</command> causes <application>Sendmail</application>
|
|
|
|
to clear (purge) all its host-status information.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<sect3><title>smrsh</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>smrsh</command> is a restricted shell for
|
|
|
|
<application>Sendmail</application>.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<sect3><title>editmap</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>editmap</command> queries and edits
|
|
|
|
<application>Sendmail</application> map files.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<sect3><title>makemap</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>makemap</command> creates
|
|
|
|
<application>Sendmail</application> map files.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<sect3><title>mailq</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>mailq</command> prints a summary of outbound mail messages
|
|
|
|
waiting for delivery.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<sect3><title>newaliases</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>newaliases</command> rebuilds
|
|
|
|
<filename>/etc/mail/aliases.db</filename>.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<sect3><title>sendmail</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>sendmail</command> is the <application>Sendmail</application>
|
|
|
|
mail transport agent.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<sect3><title>vacation</title>
|
|
|
|
<para><command>vacation</command> is an email auto responder.</para></sect3>
|
|
|
|
|
|
|
|
<sect3><title>praliases</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>praliases</command> displays current
|
|
|
|
<application>Sendmail</application> aliases.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
<sect3><title>mailstats</title>
|
2004-06-23 04:13:40 +08:00
|
|
|
<para><command>mailstats</command> displays
|
|
|
|
<application>Sendmail</application> statistics.</para></sect3>
|
2004-06-13 13:38:30 +08:00
|
|
|
|
|
|
|
</sect2>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|