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