[0931098] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY sendmail-download-ftp "ftp://ftp.sendmail.org/pub/sendmail/sendmail.&sendmail-version;.tar.gz">
|
---|
| 8 | <!ENTITY sendmail-download-http "http://www.sendmail.org/ftp/sendmail.&sendmail-version;.tar.gz">
|
---|
[65e6ea9] | 9 | <!ENTITY sendmail-size "2.0 MB">
|
---|
| 10 | <!ENTITY sendmail-buildsize "18 MB">
|
---|
[0931098] | 11 | <!ENTITY sendmail-time "0.43 SBU">
|
---|
| 12 | ]>
|
---|
| 13 |
|
---|
[547df0bc] | 14 | <sect1 id="sendmail" xreflabel="Sendmail-&sendmail-version;">
|
---|
[051a187] | 15 | <sect1info>
|
---|
[5cd0959d] | 16 | <othername>$LastChangedBy$</othername>
|
---|
| 17 | <date>$Date$</date>
|
---|
[051a187] | 18 | </sect1info>
|
---|
[00bb024c] | 19 | <?dbhtml filename="sendmail.html"?>
|
---|
[547df0bc] | 20 | <title>Sendmail-&sendmail-version;</title>
|
---|
[f45b1953] | 21 |
|
---|
[0931098] | 22 | <sect2>
|
---|
| 23 | <title>Introduction to <application>Sendmail</application></title>
|
---|
| 24 |
|
---|
[65e6ea9] | 25 | <para>The <application>Sendmail</application> package contains a Mail
|
---|
| 26 | Transport Agent (<acronym>MTA</acronym>).</para>
|
---|
[0931098] | 27 |
|
---|
| 28 | <sect3><title>Package information</title>
|
---|
| 29 | <itemizedlist spacing='compact'>
|
---|
| 30 | <listitem><para>Download (HTTP): <ulink url="&sendmail-download-http;"/></para></listitem>
|
---|
| 31 | <listitem><para>Download (FTP): <ulink url="&sendmail-download-ftp;"/></para></listitem>
|
---|
| 32 | <listitem><para>Download size: &sendmail-size;</para></listitem>
|
---|
| 33 | <listitem><para>Estimated Disk space required: &sendmail-buildsize;</para></listitem>
|
---|
| 34 | <listitem><para>Estimated build time: &sendmail-time;</para></listitem></itemizedlist>
|
---|
| 35 | </sect3>
|
---|
| 36 |
|
---|
| 37 | <sect3><title><application>Sendmail</application> dependencies</title>
|
---|
[65e6ea9] | 38 |
|
---|
[0931098] | 39 | <sect4><title>Required</title>
|
---|
| 40 | <para><xref linkend="db"/> and <xref linkend="procmail"/>
|
---|
| 41 | </para></sect4>
|
---|
[65e6ea9] | 42 |
|
---|
| 43 | <sect4><title>Optional</title>
|
---|
| 44 | <para><xref linkend="openssl"/>, <xref linkend="openldap"/>,
|
---|
| 45 | <xref linkend="tcpwrappers"/>, <xref linkend="pcre"/>,
|
---|
[957e607d] | 46 | <xref linkend="cyrus-sasl"/>,
|
---|
[051a187] | 47 | <ulink url="http://www-dev.cites.uiuc.edu/ph/nph/">nph</ulink>, and
|
---|
| 48 | <xref linkend="gs"/> or <xref linkend="espgs"/> (for creating
|
---|
| 49 | <acronym>PDF</acronym> documentation)
|
---|
[65e6ea9] | 50 | </para></sect4>
|
---|
[0931098] | 51 | </sect3>
|
---|
| 52 |
|
---|
| 53 | </sect2>
|
---|
| 54 |
|
---|
| 55 | <sect2>
|
---|
| 56 | <title>Installation of <application>Sendmail</application></title>
|
---|
| 57 |
|
---|
[65e6ea9] | 58 | <para>Before building <application>Sendmail</application>, create the users,
|
---|
| 59 | groups and directories that <application>Sendmail</application> requires
|
---|
| 60 | with the following commands:</para>
|
---|
[0931098] | 61 |
|
---|
| 62 | <screen><userinput><command>groupadd smmsp &&
|
---|
| 63 | groupadd mail &&
|
---|
| 64 | useradd -g smmsp -G mail smmsp &&
|
---|
| 65 | chmod 1777 /tmp &&
|
---|
| 66 | chmod 1777 /var/mail &&
|
---|
| 67 | mkdir /var/spool/mqueue</command></userinput></screen>
|
---|
| 68 |
|
---|
[65e6ea9] | 69 | <para>Install <application>Sendmail</application> with the following
|
---|
| 70 | commands:</para>
|
---|
[0931098] | 71 |
|
---|
| 72 | <screen><userinput><command>cat > devtools/Site/site.config.m4 << "EOF"
|
---|
| 73 | define(`confMANGRP',`root')
|
---|
| 74 | define(`confMANOWN',`root')
|
---|
| 75 | define(`confSBINGRP',`root')
|
---|
| 76 | define(`confUBINGRP',`root')
|
---|
| 77 | define(`confUBINOWN',`root')
|
---|
| 78 | EOF
|
---|
| 79 | cd sendmail &&
|
---|
| 80 | sh Build &&
|
---|
| 81 | cd ../cf/cf &&
|
---|
| 82 | cp generic-linux.mc sendmail.mc &&
|
---|
| 83 | mkdir /etc/mail &&
|
---|
[65e6ea9] | 84 | sh Build sendmail.cf &&
|
---|
[0931098] | 85 | sh Build install-cf &&
|
---|
| 86 | cd ../../ &&
|
---|
[b40beacc] | 87 | sh Build install &&
|
---|
| 88 | for manpage in sendmail editmap mailstats makemap praliases smrsh
|
---|
| 89 | do
|
---|
| 90 | install -o root -g root -m444 $manpage/$manpage.8 /usr/share/man/man8
|
---|
| 91 | done &&
|
---|
| 92 | install -o root -g root -m444 sendmail/aliases.5 /usr/share/man/man5 &&
|
---|
| 93 | install -o root -g root -m444 sendmail/mailq.1 /usr/share/man/man1 &&
|
---|
| 94 | install -o root -g root -m444 sendmail/newaliases.1 /usr/share/man/man1 &&
|
---|
| 95 | install -o root -g root -m444 vacation/vacation.1 /usr/share/man/man1</command></userinput></screen>
|
---|
[0931098] | 96 |
|
---|
[12d871a] | 97 | <para><emphasis>Note:</emphasis> See the source tree
|
---|
| 98 | <filename>sendmail/README</filename> file for information on linking optional
|
---|
| 99 | packages into the build.</para>
|
---|
| 100 |
|
---|
[65e6ea9] | 101 | <para>Install the <application>Sendmail</application> Installation and
|
---|
| 102 | Operations Guide with the following commands:</para>
|
---|
| 103 |
|
---|
| 104 | <screen><userinput><command>cd doc/op &&
|
---|
| 105 | sed -i -e 's/groff/GROFF_NO_SGR=1 groff/' Makefile &&
|
---|
| 106 | make op.txt op.pdf &&
|
---|
| 107 | install -d -m 755 /usr/share/doc/sendmail/&sendmail-version; &&
|
---|
| 108 | install -m 644 op.ps op.txt op.pdf /usr/share/doc/sendmail/&sendmail-version; &&
|
---|
| 109 | cd ../../</command></userinput></screen>
|
---|
| 110 |
|
---|
[b40beacc] | 111 | <para><emphasis>Note:</emphasis> remove <filename>op.pdf</filename> from the
|
---|
| 112 | <command>make</command> and <command>install</command> commands if you don't
|
---|
| 113 | have <application>Ghostscript</application> installed.</para>
|
---|
| 114 |
|
---|
| 115 | </sect2>
|
---|
| 116 |
|
---|
| 117 | <sect2>
|
---|
| 118 | <title>Command explanations</title>
|
---|
| 119 |
|
---|
| 120 | <para><command>cat > devtools/Site/site.config.m4 << "EOF"</command>:
|
---|
| 121 | This creates a configuration file changing some of the default settings.</para>
|
---|
| 122 |
|
---|
| 123 | <screen><userinput><command>sh Build
|
---|
| 124 | sh Build sendmail.cf
|
---|
| 125 | sh Build install-cf
|
---|
| 126 | sh Build install</command></userinput></screen>
|
---|
| 127 |
|
---|
| 128 | <para><application>Sendmail</application> uses an <application>m4</application>
|
---|
| 129 | based build script to create the various <filename>Makefile</filename>'s. These
|
---|
| 130 | commands build and install the package.</para>
|
---|
| 131 |
|
---|
| 132 | <screen><userinput><command>for manpage in...;do...;done:
|
---|
| 133 | install ...
|
---|
| 134 | install ...</command></userinput></screen>
|
---|
| 135 |
|
---|
| 136 | <para> The man pages are installed already formatted and <command>man</command>
|
---|
| 137 | displays them somewhat garbled. These commands replace the formatted pages with
|
---|
| 138 | pages <command>man</command> can display properly.</para>
|
---|
| 139 |
|
---|
[0931098] | 140 | </sect2>
|
---|
| 141 |
|
---|
| 142 | <sect2>
|
---|
| 143 | <title>Configuring <application>Sendmail</application></title>
|
---|
| 144 |
|
---|
| 145 | <sect3><title>Config files</title>
|
---|
| 146 | <para><filename>/etc/mail/*</filename></para>
|
---|
| 147 | </sect3>
|
---|
| 148 |
|
---|
[65e6ea9] | 149 | <sect3><title>Configuration Commands</title>
|
---|
[0931098] | 150 |
|
---|
| 151 | <screen><userinput><command>echo `hostname` > /etc/mail/local-host-names
|
---|
| 152 | cat > /etc/mail/aliases << "EOF"
|
---|
| 153 | postmaster: root
|
---|
| 154 | MAILER-DAEMON: root
|
---|
| 155 | EOF
|
---|
| 156 | cp -R cf/* /etc/mail &&
|
---|
| 157 | cp cf/cf/{submit,sendmail}.mc /etc/mail &&
|
---|
| 158 | newaliases -v</command></userinput></screen>
|
---|
| 159 |
|
---|
[12d871a] | 160 | <para><application>Sendmail</application>'s primary configuration file,
|
---|
| 161 | <filename>/etc/mail/sendmail.cf</filename>, is complex and not meant to be
|
---|
| 162 | directly edited. The recommended method to make changes is to modify
|
---|
| 163 | <filename>/etc/mail/sendmail.mc</filename>, and various
|
---|
| 164 | <application>m4</application> files, then run the <command>m4</command>
|
---|
| 165 | macro processor from within <filename class='directory'>/etc/mail</filename>
|
---|
| 166 | as follows:</para>
|
---|
| 167 |
|
---|
| 168 | <screen><userinput><command>m4 m4/cf.m4 sendmail.mc > sendmail.cf</command></userinput></screen>
|
---|
| 169 |
|
---|
| 170 | <para>A full explanation of the files to modify, and the available parameters
|
---|
| 171 | can be found in <filename>/etc/mail/README</filename>.</para>
|
---|
| 172 |
|
---|
[65e6ea9] | 173 | <para>To automate the running of <application>Sendmail</application> at
|
---|
| 174 | startup, install the <filename>/etc/rc.d/init.d/sendmail</filename>
|
---|
| 175 | init script included in the
|
---|
| 176 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
[12d871a] | 177 |
|
---|
[0931098] | 178 | <screen><userinput><command>make install-sendmail</command></userinput></screen>
|
---|
| 179 |
|
---|
[65e6ea9] | 180 | <note><para>The -qNm option to <command>sendmail</command>, where N is number
|
---|
[12d871a] | 181 | of minutes, controls how often <application>Sendmail</application> will process
|
---|
| 182 | the mail queue. A default of 5 minutes is used in the init script. Individual
|
---|
| 183 | workstation users may want to set this as low as 1 minute, large installations
|
---|
| 184 | handling more mail may want to set it higher.</para></note>
|
---|
[0931098] | 185 |
|
---|
| 186 | </sect3>
|
---|
| 187 | </sect2>
|
---|
| 188 |
|
---|
| 189 | <sect2>
|
---|
| 190 | <title>Contents</title>
|
---|
| 191 |
|
---|
| 192 | <para>The <application>Sendmail</application> package contains
|
---|
[65e6ea9] | 193 | <command>hoststat</command>,
|
---|
| 194 | <command>purgestat</command>,
|
---|
[0931098] | 195 | <command>smrsh</command>,
|
---|
| 196 | <command>editmap</command>,
|
---|
| 197 | <command>makemap</command>,
|
---|
| 198 | <command>mailq</command>,
|
---|
| 199 | <command>newaliases</command>,
|
---|
| 200 | <command>sendmail</command>,
|
---|
| 201 | <command>vacation</command>,
|
---|
| 202 | <command>praliases</command> and
|
---|
| 203 | <command>mailstats</command>.
|
---|
| 204 | </para>
|
---|
| 205 | </sect2>
|
---|
| 206 |
|
---|
| 207 | <sect2><title>Description</title>
|
---|
| 208 |
|
---|
[65e6ea9] | 209 | <sect3><title>hoststat</title>
|
---|
| 210 | <para><command>hoststat</command> prints <application>Sendmail</application>'s
|
---|
| 211 | persistent host status.</para></sect3>
|
---|
[0931098] | 212 |
|
---|
[a0ea7df] | 213 | <sect3><title>purgestat</title>
|
---|
[65e6ea9] | 214 | <para><command>purgestat</command> causes <application>Sendmail</application>
|
---|
| 215 | to clear (purge) all its host-status information.</para></sect3>
|
---|
[0931098] | 216 |
|
---|
| 217 | <sect3><title>smrsh</title>
|
---|
[65e6ea9] | 218 | <para><command>smrsh</command> is a restricted shell for
|
---|
| 219 | <application>Sendmail</application>.</para></sect3>
|
---|
[0931098] | 220 |
|
---|
| 221 | <sect3><title>editmap</title>
|
---|
[65e6ea9] | 222 | <para><command>editmap</command> queries and edits
|
---|
| 223 | <application>Sendmail</application> map files.</para></sect3>
|
---|
[0931098] | 224 |
|
---|
| 225 | <sect3><title>makemap</title>
|
---|
[65e6ea9] | 226 | <para><command>makemap</command> creates
|
---|
| 227 | <application>Sendmail</application> map files.</para></sect3>
|
---|
[0931098] | 228 |
|
---|
| 229 | <sect3><title>mailq</title>
|
---|
[65e6ea9] | 230 | <para><command>mailq</command> prints a summary of outbound mail messages
|
---|
| 231 | waiting for delivery.</para></sect3>
|
---|
[0931098] | 232 |
|
---|
| 233 | <sect3><title>newaliases</title>
|
---|
[65e6ea9] | 234 | <para><command>newaliases</command> rebuilds
|
---|
| 235 | <filename>/etc/mail/aliases.db</filename>.</para></sect3>
|
---|
[0931098] | 236 |
|
---|
| 237 | <sect3><title>sendmail</title>
|
---|
[65e6ea9] | 238 | <para><command>sendmail</command> is the <application>Sendmail</application>
|
---|
| 239 | mail transport agent.</para></sect3>
|
---|
[0931098] | 240 |
|
---|
| 241 | <sect3><title>vacation</title>
|
---|
| 242 | <para><command>vacation</command> is an email auto responder.</para></sect3>
|
---|
| 243 |
|
---|
| 244 | <sect3><title>praliases</title>
|
---|
[65e6ea9] | 245 | <para><command>praliases</command> displays current
|
---|
| 246 | <application>Sendmail</application> aliases.</para></sect3>
|
---|
[0931098] | 247 |
|
---|
| 248 | <sect3><title>mailstats</title>
|
---|
[65e6ea9] | 249 | <para><command>mailstats</command> displays
|
---|
| 250 | <application>Sendmail</application> statistics.</para></sect3>
|
---|
[0931098] | 251 |
|
---|
| 252 | </sect2>
|
---|
[f45b1953] | 253 |
|
---|
| 254 | </sect1>
|
---|
| 255 |
|
---|