[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">
|
---|
[80ff2bf1] | 9 | <!ENTITY sendmail-size "1.9 MB">
|
---|
[22073e81] | 10 | <!ENTITY sendmail-buildsize "18.8 MB">
|
---|
| 11 | <!ENTITY sendmail-time "0.38 SBU">
|
---|
[0931098] | 12 | ]>
|
---|
| 13 |
|
---|
[cef3a2f] | 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>
|
---|
[cef3a2f] | 21 | <indexterm zone="sendmail">
|
---|
[6a2bce2] | 22 | <primary sortas="a-Sendmail">Sendmail</primary></indexterm>
|
---|
[f45b1953] | 23 |
|
---|
[0931098] | 24 | <sect2>
|
---|
| 25 | <title>Introduction to <application>Sendmail</application></title>
|
---|
| 26 |
|
---|
[65e6ea9] | 27 | <para>The <application>Sendmail</application> package contains a Mail
|
---|
| 28 | Transport Agent (<acronym>MTA</acronym>).</para>
|
---|
[0931098] | 29 |
|
---|
| 30 | <sect3><title>Package information</title>
|
---|
| 31 | <itemizedlist spacing='compact'>
|
---|
[80ff2bf1] | 32 | <listitem><para>Download (HTTP):
|
---|
| 33 | <ulink url="&sendmail-download-http;"/></para></listitem>
|
---|
| 34 | <listitem><para>Download (FTP):
|
---|
| 35 | <ulink url="&sendmail-download-ftp;"/></para></listitem>
|
---|
[0931098] | 36 | <listitem><para>Download size: &sendmail-size;</para></listitem>
|
---|
[80ff2bf1] | 37 | <listitem><para>Estimated disk space required:
|
---|
| 38 | &sendmail-buildsize;</para></listitem>
|
---|
| 39 | <listitem><para>Estimated build time:
|
---|
| 40 | &sendmail-time;</para></listitem></itemizedlist>
|
---|
[0931098] | 41 | </sect3>
|
---|
| 42 |
|
---|
| 43 | <sect3><title><application>Sendmail</application> dependencies</title>
|
---|
[65e6ea9] | 44 |
|
---|
[0931098] | 45 | <sect4><title>Required</title>
|
---|
| 46 | <para><xref linkend="db"/> and <xref linkend="procmail"/>
|
---|
| 47 | </para></sect4>
|
---|
[65e6ea9] | 48 |
|
---|
| 49 | <sect4><title>Optional</title>
|
---|
[cef3a2f] | 50 | <para><xref linkend="openssl"/>,
|
---|
[80ff2bf1] | 51 | <xref linkend="openldap"/>,
|
---|
| 52 | <xref linkend="tcpwrappers"/>,
|
---|
| 53 | <xref linkend="pcre"/>,
|
---|
[957e607d] | 54 | <xref linkend="cyrus-sasl"/>,
|
---|
[051a187] | 55 | <ulink url="http://www-dev.cites.uiuc.edu/ph/nph/">nph</ulink>, and
|
---|
| 56 | <xref linkend="gs"/> or <xref linkend="espgs"/> (for creating
|
---|
| 57 | <acronym>PDF</acronym> documentation)
|
---|
[65e6ea9] | 58 | </para></sect4>
|
---|
[0931098] | 59 | </sect3>
|
---|
| 60 |
|
---|
| 61 | </sect2>
|
---|
| 62 |
|
---|
| 63 | <sect2>
|
---|
| 64 | <title>Installation of <application>Sendmail</application></title>
|
---|
| 65 |
|
---|
[65e6ea9] | 66 | <para>Before building <application>Sendmail</application>, create the users,
|
---|
| 67 | groups and directories that <application>Sendmail</application> requires
|
---|
[d8614521] | 68 | with the following commands issued as the root user:</para>
|
---|
[0931098] | 69 |
|
---|
[d8614521] | 70 | <screen><userinput role='root'><command>groupadd smmsp &&
|
---|
[0931098] | 71 | groupadd mail &&
|
---|
[80ff2bf1] | 72 | useradd -c "Sendmail Daemon" -g smmsp -G mail smmsp &&
|
---|
[0931098] | 73 | chmod 1777 /var/mail &&
|
---|
| 74 | mkdir /var/spool/mqueue</command></userinput></screen>
|
---|
| 75 |
|
---|
[65e6ea9] | 76 | <para>Install <application>Sendmail</application> with the following
|
---|
| 77 | commands:</para>
|
---|
[0931098] | 78 |
|
---|
[80ff2bf1] | 79 | <screen><userinput><command>cat > devtools/Site/site.config.m4 << "EOF"</command>
|
---|
[0931098] | 80 | define(`confMANGRP',`root')
|
---|
| 81 | define(`confMANOWN',`root')
|
---|
| 82 | define(`confSBINGRP',`root')
|
---|
| 83 | define(`confUBINGRP',`root')
|
---|
| 84 | define(`confUBINOWN',`root')
|
---|
[80ff2bf1] | 85 | <command>EOF
|
---|
[0931098] | 86 | cd sendmail &&
|
---|
| 87 | sh Build &&
|
---|
| 88 | cd ../cf/cf &&
|
---|
| 89 | cp generic-linux.mc sendmail.mc &&
|
---|
[d8614521] | 90 | sh Build sendmail.cf</command></userinput></screen>
|
---|
| 91 |
|
---|
| 92 | <para>Now, as the root user:</para>
|
---|
| 93 |
|
---|
| 94 | <screen><userinput role='root'><command>install -v -d -m755 /etc/mail &&
|
---|
[0931098] | 95 | sh Build install-cf &&
|
---|
| 96 | cd ../../ &&
|
---|
[b40beacc] | 97 | sh Build install &&
|
---|
[d8614521] | 98 | cp -v -R cf/* /etc/mail &&
|
---|
| 99 | cp -v cf/cf/{submit,sendmail}.mc /etc/mail &&
|
---|
[b40beacc] | 100 | for manpage in sendmail editmap mailstats makemap praliases smrsh
|
---|
| 101 | do
|
---|
[d8614521] | 102 | install -v -m444 $manpage/$manpage.8 /usr/share/man/man8
|
---|
[b40beacc] | 103 | done &&
|
---|
[d8614521] | 104 | install -v -m444 sendmail/aliases.5 /usr/share/man/man5 &&
|
---|
| 105 | install -v -m444 sendmail/mailq.1 /usr/share/man/man1 &&
|
---|
| 106 | install -v -m444 sendmail/newaliases.1 /usr/share/man/man1 &&
|
---|
| 107 | install -v -m444 vacation/vacation.1 /usr/share/man/man1</command></userinput></screen>
|
---|
[0931098] | 108 |
|
---|
[12d871a] | 109 | <para><emphasis>Note:</emphasis> See the source tree
|
---|
| 110 | <filename>sendmail/README</filename> file for information on linking optional
|
---|
[22073e81] | 111 | packages into the build. Use the example below, which adds support for
|
---|
| 112 | <application>tcpwrappers</application>, <acronym>SASL</acronym> and
|
---|
| 113 | Start<acronym>TLS</acronym> as a starting point. Of course, modify it to suit
|
---|
| 114 | your particular needs.</para>
|
---|
| 115 |
|
---|
| 116 | <screen><userinput><command>cat >> devtools/Site/site.config.m4 << "EOF"</command>
|
---|
| 117 | APPENDDEF(`confENVDEF',`-DSTARTTLS -DTCPWRAPPERS -DSASL')
|
---|
| 118 | APPENDDEF(`confLIBS', `-lssl -lcrypto -lwrap -lsasl2')
|
---|
| 119 | APPENDDEF(`confINCDIRS', `-I/usr/include/sasl')
|
---|
| 120 | <command>EOF</command></userinput></screen>
|
---|
[12d871a] | 121 |
|
---|
[65e6ea9] | 122 | <para>Install the <application>Sendmail</application> Installation and
|
---|
| 123 | Operations Guide with the following commands:</para>
|
---|
| 124 |
|
---|
| 125 | <screen><userinput><command>cd doc/op &&
|
---|
| 126 | sed -i -e 's/groff/GROFF_NO_SGR=1 groff/' Makefile &&
|
---|
[d8614521] | 127 | make op.txt op.pdf</command></userinput></screen>
|
---|
| 128 |
|
---|
| 129 | <para>Now, as the root user:</para>
|
---|
| 130 |
|
---|
| 131 | <screen><userinput role='root'><command>install -v -d -m755 /usr/share/doc/sendmail-&sendmail-version; &&
|
---|
| 132 | install -v -m644 op.ps op.txt op.pdf \
|
---|
| 133 | /usr/share/doc/sendmail-&sendmail-version; &&
|
---|
[65e6ea9] | 134 | cd ../../</command></userinput></screen>
|
---|
| 135 |
|
---|
[b40beacc] | 136 | <para><emphasis>Note:</emphasis> remove <filename>op.pdf</filename> from the
|
---|
| 137 | <command>make</command> and <command>install</command> commands if you don't
|
---|
| 138 | have <application>Ghostscript</application> installed.</para>
|
---|
| 139 |
|
---|
| 140 | </sect2>
|
---|
| 141 |
|
---|
| 142 | <sect2>
|
---|
| 143 | <title>Command explanations</title>
|
---|
| 144 |
|
---|
| 145 | <para><command>cat > devtools/Site/site.config.m4 << "EOF"</command>:
|
---|
| 146 | This creates a configuration file changing some of the default settings.</para>
|
---|
| 147 |
|
---|
[80ff2bf1] | 148 | <para><command>sh Build; sh Build sendmail.cf; sh Build install-cf;
|
---|
| 149 | sh Build install</command>: <application>Sendmail</application> uses an
|
---|
| 150 | <application>m4</application> based build script to create the various
|
---|
| 151 | <filename>Makefile</filename>'s. These commands build and install the
|
---|
| 152 | package.</para>
|
---|
[b40beacc] | 153 |
|
---|
[80ff2bf1] | 154 | <para><command>for manpage in...;do...;done; install ...</command>: The man
|
---|
| 155 | pages are installed already formatted and <command>man</command> displays them
|
---|
| 156 | somewhat garbled. These commands replace the formatted pages with
|
---|
[b40beacc] | 157 | pages <command>man</command> can display properly.</para>
|
---|
| 158 |
|
---|
[0931098] | 159 | </sect2>
|
---|
| 160 |
|
---|
| 161 | <sect2>
|
---|
| 162 | <title>Configuring <application>Sendmail</application></title>
|
---|
| 163 |
|
---|
[40851cf] | 164 | <sect3 id="sendmail-config"><title>Config files</title>
|
---|
| 165 | <para><filename>/etc/mail/*</filename></para>
|
---|
[cef3a2f] | 166 | <indexterm zone="sendmail sendmail-config">
|
---|
[915eda5] | 167 | <primary sortas="e-etc-mail">/etc/mail/*</primary></indexterm>
|
---|
[0931098] | 168 | </sect3>
|
---|
| 169 |
|
---|
[80ff2bf1] | 170 | <sect3><title>Configuration information</title>
|
---|
| 171 |
|
---|
| 172 | <para>Create the <filename>/etc/mail/local-host-names</filename> and
|
---|
| 173 | <filename>/etc/mail/aliases</filename> files using the following
|
---|
[d8614521] | 174 | commands as the root user:</para>
|
---|
[0931098] | 175 |
|
---|
[d8614521] | 176 | <screen><userinput role='root'><command>echo $(hostname) > /etc/mail/local-host-names
|
---|
[80ff2bf1] | 177 | cat > /etc/mail/aliases << "EOF"</command>
|
---|
[0931098] | 178 | postmaster: root
|
---|
| 179 | MAILER-DAEMON: root
|
---|
[80ff2bf1] | 180 |
|
---|
| 181 | <command>EOF
|
---|
[0931098] | 182 | newaliases -v</command></userinput></screen>
|
---|
| 183 |
|
---|
[12d871a] | 184 | <para><application>Sendmail</application>'s primary configuration file,
|
---|
| 185 | <filename>/etc/mail/sendmail.cf</filename>, is complex and not meant to be
|
---|
| 186 | directly edited. The recommended method to make changes is to modify
|
---|
| 187 | <filename>/etc/mail/sendmail.mc</filename>, and various
|
---|
| 188 | <application>m4</application> files, then run the <command>m4</command>
|
---|
| 189 | macro processor from within <filename class='directory'>/etc/mail</filename>
|
---|
| 190 | as follows:</para>
|
---|
| 191 |
|
---|
| 192 | <screen><userinput><command>m4 m4/cf.m4 sendmail.mc > sendmail.cf</command></userinput></screen>
|
---|
| 193 |
|
---|
| 194 | <para>A full explanation of the files to modify, and the available parameters
|
---|
| 195 | can be found in <filename>/etc/mail/README</filename>.</para>
|
---|
| 196 |
|
---|
[80ff2bf1] | 197 | <para id="sendmail-init">To automate the running of
|
---|
| 198 | <application>Sendmail</application> at startup, install the
|
---|
| 199 | <filename>/etc/rc.d/init.d/sendmail</filename> init script included in the
|
---|
[65e6ea9] | 200 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
[cef3a2f] | 201 | <indexterm zone="sendmail sendmail-init">
|
---|
[80ff2bf1] | 202 | <primary sortas="f-sendmail-init">sendmail</primary></indexterm>
|
---|
[12d871a] | 203 |
|
---|
[d8614521] | 204 | <screen><userinput role='root'><command>make install-sendmail</command></userinput></screen>
|
---|
[0931098] | 205 |
|
---|
[65e6ea9] | 206 | <note><para>The -qNm option to <command>sendmail</command>, where N is number
|
---|
[12d871a] | 207 | of minutes, controls how often <application>Sendmail</application> will process
|
---|
| 208 | the mail queue. A default of 5 minutes is used in the init script. Individual
|
---|
| 209 | workstation users may want to set this as low as 1 minute, large installations
|
---|
| 210 | handling more mail may want to set it higher.</para></note>
|
---|
[0931098] | 211 |
|
---|
| 212 | </sect3>
|
---|
| 213 | </sect2>
|
---|
| 214 |
|
---|
| 215 | <sect2>
|
---|
| 216 | <title>Contents</title>
|
---|
| 217 |
|
---|
[80ff2bf1] | 218 | <segmentedlist>
|
---|
| 219 | <segtitle>Installed Programs</segtitle>
|
---|
[d8614521] | 220 | <segtitle>Installed Libraries</segtitle>
|
---|
| 221 | <segtitle>Installed Directories</segtitle>
|
---|
[80ff2bf1] | 222 | <seglistitem>
|
---|
| 223 | <seg>editmap, hoststat, mailstats, mailq, makemap, newaliases, praliases,
|
---|
| 224 | purgestat, sendmail, smrsh and vacation</seg>
|
---|
[d8614521] | 225 | <seg>None</seg>
|
---|
[80ff2bf1] | 226 | <seg>/etc/mail and /usr/share/doc/sendmail-&sendmail-version;</seg>
|
---|
| 227 | </seglistitem>
|
---|
| 228 | </segmentedlist>
|
---|
| 229 |
|
---|
| 230 | <variablelist>
|
---|
| 231 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 232 | <?dbfo list-presentation="list"?>
|
---|
| 233 |
|
---|
| 234 | <varlistentry id="editmap">
|
---|
| 235 | <term><command>editmap</command></term>
|
---|
| 236 | <listitem><para>queries and edits <application>Sendmail</application> map
|
---|
| 237 | files.</para>
|
---|
[cef3a2f] | 238 | <indexterm zone="sendmail editmap">
|
---|
[80ff2bf1] | 239 | <primary sortas="b-editmap">editmap</primary></indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
| 242 |
|
---|
| 243 | <varlistentry id="hoststat">
|
---|
| 244 | <term><command>hoststat</command></term>
|
---|
| 245 | <listitem><para>prints <application>Sendmail</application>'s persistent host
|
---|
| 246 | status.</para>
|
---|
[cef3a2f] | 247 | <indexterm zone="sendmail hoststat">
|
---|
[80ff2bf1] | 248 | <primary sortas="b-hoststat">hoststat</primary></indexterm>
|
---|
| 249 | </listitem>
|
---|
| 250 | </varlistentry>
|
---|
| 251 |
|
---|
| 252 | <varlistentry id="mailstats">
|
---|
| 253 | <term><command>mailstats</command></term>
|
---|
| 254 | <listitem><para>displays <application>Sendmail</application> statistics.</para>
|
---|
[cef3a2f] | 255 | <indexterm zone="sendmail mailstats">
|
---|
[80ff2bf1] | 256 | <primary sortas="b-mailstats">mailstats</primary></indexterm>
|
---|
| 257 | </listitem>
|
---|
| 258 | </varlistentry>
|
---|
| 259 |
|
---|
[6a2bce2] | 260 | <varlistentry id="mailq-sendmail">
|
---|
[80ff2bf1] | 261 | <term><command>mailq</command></term>
|
---|
| 262 | <listitem><para>prints a summary of outbound mail messages waiting for
|
---|
| 263 | delivery.</para>
|
---|
[cef3a2f] | 264 | <indexterm zone="sendmail mailq-sendmail">
|
---|
[80ff2bf1] | 265 | <primary sortas="b-mailq">mailq</primary></indexterm>
|
---|
| 266 | </listitem>
|
---|
| 267 | </varlistentry>
|
---|
| 268 |
|
---|
| 269 | <varlistentry id="makemap">
|
---|
| 270 | <term><command>makemap</command></term>
|
---|
| 271 | <listitem><para>creates <application>Sendmail</application> map files.</para>
|
---|
[cef3a2f] | 272 | <indexterm zone="sendmail makemap">
|
---|
[80ff2bf1] | 273 | <primary sortas="b-makemap">makemap</primary></indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
[6a2bce2] | 277 | <varlistentry id="newaliases-sendmail">
|
---|
[80ff2bf1] | 278 | <term><command>newaliases</command></term>
|
---|
| 279 | <listitem><para>rebuilds <filename>/etc/mail/aliases.db</filename> from the
|
---|
| 280 | contents of <filename>/etc/mail/aliases</filename>.</para>
|
---|
[cef3a2f] | 281 | <indexterm zone="sendmail newaliases-sendmail">
|
---|
[80ff2bf1] | 282 | <primary sortas="b-newaliases">newaliases</primary></indexterm>
|
---|
| 283 | </listitem>
|
---|
| 284 | </varlistentry>
|
---|
| 285 |
|
---|
| 286 | <varlistentry id="praliases">
|
---|
| 287 | <term><command>praliases</command></term>
|
---|
| 288 | <listitem><para>displays current <application>Sendmail</application>
|
---|
| 289 | aliases.</para>
|
---|
[cef3a2f] | 290 | <indexterm zone="sendmail praliases">
|
---|
[80ff2bf1] | 291 | <primary sortas="b-praliases">praliases</primary></indexterm>
|
---|
| 292 | </listitem>
|
---|
| 293 | </varlistentry>
|
---|
| 294 |
|
---|
| 295 | <varlistentry id="purgestat">
|
---|
| 296 | <term><command>purgestat</command></term>
|
---|
| 297 | <listitem><para> causes <application>Sendmail</application> to clear (purge)
|
---|
| 298 | all its host-status information.</para>
|
---|
[cef3a2f] | 299 | <indexterm zone="sendmail purgestat">
|
---|
[80ff2bf1] | 300 | <primary sortas="b-purgestat">purgestat</primary></indexterm>
|
---|
| 301 | </listitem>
|
---|
| 302 | </varlistentry>
|
---|
| 303 |
|
---|
[cef3a2f] | 304 | <varlistentry id="sendmail-prog-sendmail">
|
---|
[80ff2bf1] | 305 | <term><command>sendmail</command></term>
|
---|
| 306 | <listitem><para>is the <application>Sendmail</application> mail transport
|
---|
| 307 | agent.</para>
|
---|
[cef3a2f] | 308 | <indexterm zone="sendmail sendmail-prog-sendmail">
|
---|
[80ff2bf1] | 309 | <primary sortas="b-sendmail">sendmail</primary></indexterm>
|
---|
| 310 | </listitem>
|
---|
| 311 | </varlistentry>
|
---|
| 312 |
|
---|
| 313 | <varlistentry id="smrsh">
|
---|
| 314 | <term><command>smrsh</command></term>
|
---|
| 315 | <listitem><para>is a restricted shell for
|
---|
| 316 | <application>Sendmail</application>.</para>
|
---|
[cef3a2f] | 317 | <indexterm zone="sendmail smrsh">
|
---|
[80ff2bf1] | 318 | <primary sortas="b-smrsh">smrsh</primary></indexterm>
|
---|
| 319 | </listitem>
|
---|
| 320 | </varlistentry>
|
---|
| 321 |
|
---|
[6a2bce2] | 322 | <varlistentry id="vacation-sendmail">
|
---|
[80ff2bf1] | 323 | <term><command>vacation</command></term>
|
---|
| 324 | <listitem><para>is an email auto responder.</para>
|
---|
[cef3a2f] | 325 | <indexterm zone="sendmail vacation-sendmail">
|
---|
[80ff2bf1] | 326 | <primary sortas="b-vacation">vacation</primary></indexterm>
|
---|
| 327 | </listitem>
|
---|
| 328 | </varlistentry>
|
---|
| 329 | </variablelist>
|
---|
[0931098] | 330 |
|
---|
| 331 | </sect2>
|
---|
[f45b1953] | 332 |
|
---|
| 333 | </sect1>
|
---|