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