1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!-- Downloads a web page
|
---|
8 | <!ENTITY sendmail-download-http "http://www.sendmail.org/ftp/sendmail.&sendmail-version;.tar.gz"> -->
|
---|
9 | <!ENTITY sendmail-download-http " ">
|
---|
10 | <!ENTITY sendmail-download-ftp "ftp://ftp.sendmail.org/pub/sendmail/sendmail.&sendmail-version;.tar.gz">
|
---|
11 | <!ENTITY sendmail-md5sum "348eedfab0ed00931f2df94e78f22c43">
|
---|
12 | <!ENTITY sendmail-size "2.0 MB">
|
---|
13 | <!ENTITY sendmail-buildsize "17 MB">
|
---|
14 | <!ENTITY sendmail-time "0.3 SBU">
|
---|
15 | ]>
|
---|
16 |
|
---|
17 | <sect1 id="sendmail" xreflabel="sendmail-&sendmail-version;">
|
---|
18 | <?dbhtml filename="sendmail.html"?>
|
---|
19 |
|
---|
20 | <sect1info>
|
---|
21 | <othername>$LastChangedBy$</othername>
|
---|
22 | <date>$Date$</date>
|
---|
23 | </sect1info>
|
---|
24 |
|
---|
25 | <title>sendmail-&sendmail-version;</title>
|
---|
26 |
|
---|
27 | <indexterm zone="sendmail">
|
---|
28 | <primary sortas="a-sendmail">sendmail</primary>
|
---|
29 | </indexterm>
|
---|
30 |
|
---|
31 | <sect2 role="package">
|
---|
32 | <title>Introduction to sendmail</title>
|
---|
33 |
|
---|
34 | <para>The <application>sendmail</application> package contains a Mail
|
---|
35 | Transport Agent (MTA).</para>
|
---|
36 |
|
---|
37 | &lfs74_built;
|
---|
38 |
|
---|
39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
40 | <itemizedlist spacing="compact">
|
---|
41 | <listitem>
|
---|
42 | <para>Download (HTTP): <ulink url="&sendmail-download-http;"/></para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>Download (FTP): <ulink url="&sendmail-download-ftp;"/></para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>Download MD5 sum: &sendmail-md5sum;</para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>Download size: &sendmail-size;</para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>Estimated disk space required: &sendmail-buildsize;</para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>Estimated build time: &sendmail-time;</para>
|
---|
58 | </listitem>
|
---|
59 | </itemizedlist>
|
---|
60 |
|
---|
61 | <bridgehead renderas="sect3">sendmail Dependencies</bridgehead>
|
---|
62 |
|
---|
63 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
64 | <para role="required">
|
---|
65 | <xref linkend="openldap"/>
|
---|
66 | </para>
|
---|
67 |
|
---|
68 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
69 | <para role="optional">
|
---|
70 | <xref linkend="openssl"/>,
|
---|
71 | <xref linkend="cyrus-sasl"/>,
|
---|
72 | <xref linkend="procmail"/>,
|
---|
73 | <ulink url="http://www.feep.net/nph/">nph</ulink>, and
|
---|
74 | <xref linkend="gs"/> (for creating PDF documentation)
|
---|
75 | </para>
|
---|
76 |
|
---|
77 | <para condition="html" role="usernotes">User Notes:
|
---|
78 | <ulink url="&blfs-wiki;/sendmail"/></para>
|
---|
79 |
|
---|
80 | </sect2>
|
---|
81 |
|
---|
82 | <sect2 role="installation">
|
---|
83 | <title>Installation of sendmail</title>
|
---|
84 |
|
---|
85 | <para>Before building <application>sendmail</application>, create the
|
---|
86 | required user, group and directory with the following commands issued as
|
---|
87 | the <systemitem class="username">root</systemitem> user:</para>
|
---|
88 |
|
---|
89 | <screen role="root"><userinput>groupadd -g 26 smmsp &&
|
---|
90 | useradd -c "Sendmail Daemon" -g smmsp -d /dev/null \
|
---|
91 | -s /bin/false -u 26 smmsp &&
|
---|
92 | chmod -v 1777 /var/mail &&
|
---|
93 | install -v -m700 -d /var/spool/mqueue</userinput></screen>
|
---|
94 |
|
---|
95 | <note><para>See the source tree <filename>sendmail/README</filename> file
|
---|
96 | for information on linking optional packages into the build. Use the
|
---|
97 | example below, which adds support for SASL, StartTLS
|
---|
98 | (<application>OpenSSL</application>) and
|
---|
99 | <application>OpenLDAP</application>, as a starting point. Of course,
|
---|
100 | modify it to suit your particular needs.</para></note>
|
---|
101 |
|
---|
102 | <screen><userinput>cat >> devtools/Site/site.config.m4 << "EOF"
|
---|
103 | <literal>APPENDDEF(`confENVDEF',`-DSTARTTLS -DSASL -DLDAPMAP')
|
---|
104 | APPENDDEF(`confLIBS', `-lssl -lcrypto -lsasl2 -lldap -llber')
|
---|
105 | APPENDDEF(`confINCDIRS', `-I/usr/include/sasl')</literal>
|
---|
106 | EOF</userinput></screen>
|
---|
107 |
|
---|
108 | <para>Install <application>sendmail</application> with the following
|
---|
109 | commands:</para>
|
---|
110 |
|
---|
111 | <screen><userinput>cat >> devtools/Site/site.config.m4 << "EOF"
|
---|
112 | <literal>define(`confMANGRP',`root')
|
---|
113 | define(`confMANOWN',`root')
|
---|
114 | define(`confSBINGRP',`root')
|
---|
115 | define(`confUBINGRP',`root')
|
---|
116 | define(`confUBINOWN',`root')</literal>
|
---|
117 | EOF
|
---|
118 |
|
---|
119 | sed -i -r "s/^# if (DB.*)$/# if (\1) || DB_VERSION_MAJOR >= 5/" \
|
---|
120 | include/sm/bdb.h &&
|
---|
121 |
|
---|
122 | cd sendmail &&
|
---|
123 | sh Build &&
|
---|
124 | cd ../cf/cf &&
|
---|
125 | cp generic-linux.mc sendmail.mc &&
|
---|
126 | sh Build sendmail.cf</userinput></screen>
|
---|
127 |
|
---|
128 | <para>This package does not come with a test suite.</para>
|
---|
129 |
|
---|
130 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
131 |
|
---|
132 | <screen role="root"><userinput>install -v -d -m755 /etc/mail &&
|
---|
133 | sh Build install-cf &&
|
---|
134 |
|
---|
135 | cd ../.. &&
|
---|
136 | sh Build install &&
|
---|
137 |
|
---|
138 | install -v -m644 cf/cf/{submit,sendmail}.mc /etc/mail &&
|
---|
139 | cp -v -R cf/* /etc/mail &&
|
---|
140 |
|
---|
141 | install -v -m755 -d /usr/share/doc/sendmail-&sendmail-version;/{cf,sendmail} &&
|
---|
142 |
|
---|
143 | install -v -m644 CACerts FAQ KNOWNBUGS LICENSE PGPKEYS README RELEASE_NOTES \
|
---|
144 | /usr/share/doc/sendmail-&sendmail-version; &&
|
---|
145 |
|
---|
146 | install -v -m644 sendmail/{README,SECURITY,TRACEFLAGS,TUNING} \
|
---|
147 | /usr/share/doc/sendmail-&sendmail-version;/sendmail &&
|
---|
148 |
|
---|
149 | install -v -m644 cf/README /usr/share/doc/sendmail-&sendmail-version;/cf &&
|
---|
150 |
|
---|
151 | for manpage in sendmail editmap mailstats makemap praliases smrsh
|
---|
152 | do
|
---|
153 | install -v -m644 $manpage/$manpage.8 /usr/share/man/man8
|
---|
154 | done &&
|
---|
155 |
|
---|
156 | install -v -m644 sendmail/aliases.5 /usr/share/man/man5 &&
|
---|
157 | install -v -m644 sendmail/mailq.1 /usr/share/man/man1 &&
|
---|
158 | install -v -m644 sendmail/newaliases.1 /usr/share/man/man1 &&
|
---|
159 | install -v -m644 vacation/vacation.1 /usr/share/man/man1</userinput></screen>
|
---|
160 |
|
---|
161 | <para>Install the <application>sendmail</application> Installation and
|
---|
162 | Operations Guide with the following commands:</para>
|
---|
163 |
|
---|
164 | <note><para>Remove <filename>op.pdf</filename> from the
|
---|
165 | <command>make</command> and <command>install</command> commands below if
|
---|
166 | you don't have <application>Ghostscript</application>
|
---|
167 | installed.</para></note>
|
---|
168 |
|
---|
169 | <screen><userinput>cd doc/op &&
|
---|
170 | sed -i 's/groff/GROFF_NO_SGR=1 groff/' Makefile &&
|
---|
171 | make op.txt op.pdf</userinput></screen>
|
---|
172 |
|
---|
173 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
174 |
|
---|
175 | <screen role="root"><userinput>install -v -d -m755 /usr/share/doc/sendmail-&sendmail-version; &&
|
---|
176 | install -v -m644 op.ps op.txt op.pdf /usr/share/doc/sendmail-&sendmail-version; &&
|
---|
177 | cd ../..</userinput></screen>
|
---|
178 |
|
---|
179 | </sect2>
|
---|
180 |
|
---|
181 | <sect2 role="commands">
|
---|
182 | <title>Command Explanations</title>
|
---|
183 |
|
---|
184 | <para><command>cat > devtools/Site/site.config.m4 << "EOF"</command>:
|
---|
185 | This creates a configuration file changing some of the default settings.</para>
|
---|
186 |
|
---|
187 | <para><command>sed ... include/sm/bdb.h</command>: This allows sendmail to
|
---|
188 | build properly with <xref linkend='db'/> versions 5 and above.</para>
|
---|
189 |
|
---|
190 | <para><command>sh Build; sh Build sendmail.cf; sh Build install-cf;
|
---|
191 | sh Build install</command>: <application>sendmail</application> uses an
|
---|
192 | <application>m4</application> based build script to create the various
|
---|
193 | <filename>Makefile</filename>s. These commands build and install the
|
---|
194 | package.</para>
|
---|
195 |
|
---|
196 | <para><command>for manpage in...;do...;done; install ...</command>: The man
|
---|
197 | pages are installed already formatted and <command>man</command> displays
|
---|
198 | them somewhat garbled. These commands replace the formatted pages with
|
---|
199 | pages <command>man</command> can display properly.</para>
|
---|
200 |
|
---|
201 | </sect2>
|
---|
202 |
|
---|
203 | <sect2 role="configuration">
|
---|
204 | <title>Configuring sendmail</title>
|
---|
205 |
|
---|
206 | <sect3 id="sendmail-config">
|
---|
207 | <title>Config Files</title>
|
---|
208 |
|
---|
209 | <para><filename>/etc/mail/*</filename></para>
|
---|
210 |
|
---|
211 | <indexterm zone="sendmail sendmail-config">
|
---|
212 | <primary sortas="e-etc-mail">/etc/mail/*</primary>
|
---|
213 | </indexterm>
|
---|
214 |
|
---|
215 | </sect3>
|
---|
216 |
|
---|
217 | <sect3>
|
---|
218 | <title>Configuration Information</title>
|
---|
219 |
|
---|
220 | <para>Create the <filename>/etc/mail/local-host-names</filename> and
|
---|
221 | <filename>/etc/mail/aliases</filename> files using the following
|
---|
222 | commands as the <systemitem class="username">root</systemitem>
|
---|
223 | user:</para>
|
---|
224 |
|
---|
225 | <screen role="root"><userinput>echo $(hostname) > /etc/mail/local-host-names
|
---|
226 | cat > /etc/mail/aliases << "EOF"
|
---|
227 | <literal>postmaster: root
|
---|
228 | MAILER-DAEMON: root</literal>
|
---|
229 |
|
---|
230 | EOF
|
---|
231 | newaliases -v</userinput></screen>
|
---|
232 |
|
---|
233 | <para><application>sendmail</application>'s primary configuration file,
|
---|
234 | <filename>/etc/mail/sendmail.cf</filename>, is complex and not meant to be
|
---|
235 | directly edited. The recommended method for changing it is to modify
|
---|
236 | <filename>/etc/mail/sendmail.mc</filename> and various
|
---|
237 | <application>m4</application> files, then run the <command>m4</command>
|
---|
238 | macro processor from within
|
---|
239 | <filename class='directory'>/etc/mail</filename> as follows:</para>
|
---|
240 |
|
---|
241 | <screen role="root"><userinput>m4 m4/cf.m4 sendmail.mc > sendmail.cf</userinput></screen>
|
---|
242 |
|
---|
243 | <para>A full explanation of the files to modify, and the available
|
---|
244 | parameters can be found in <filename>/etc/mail/README</filename>.</para>
|
---|
245 |
|
---|
246 | </sect3>
|
---|
247 |
|
---|
248 | <sect3 id="sendmail-init">
|
---|
249 | <title>Boot Script</title>
|
---|
250 |
|
---|
251 | <para>To automate the running of <application>sendmail</application>
|
---|
252 | at startup, install the <filename>/etc/rc.d/init.d/sendmail</filename>
|
---|
253 | init script included in the
|
---|
254 | <xref linkend="bootscripts"/> package.</para>
|
---|
255 |
|
---|
256 | <indexterm zone="sendmail sendmail-init">
|
---|
257 | <primary sortas="f-sendmail-init">sendmail</primary>
|
---|
258 | </indexterm>
|
---|
259 |
|
---|
260 | <screen role="root"><userinput>make install-sendmail</userinput></screen>
|
---|
261 |
|
---|
262 | <note>
|
---|
263 | <para>The -qNm option to <command>sendmail</command>, where N is number
|
---|
264 | of minutes, controls how often <application>sendmail</application> will
|
---|
265 | process the mail queue. A default of 5 minutes is used in the init
|
---|
266 | script. Individual workstation users may want to set this as low as 1
|
---|
267 | minute, large installations handling more mail may want to set it
|
---|
268 | higher.</para>
|
---|
269 | </note>
|
---|
270 |
|
---|
271 | </sect3>
|
---|
272 |
|
---|
273 | </sect2>
|
---|
274 |
|
---|
275 | <sect2 role="content">
|
---|
276 | <title>Contents</title>
|
---|
277 |
|
---|
278 | <segmentedlist>
|
---|
279 | <segtitle>Installed Programs</segtitle>
|
---|
280 | <segtitle>Installed Libraries</segtitle>
|
---|
281 | <segtitle>Installed Directories</segtitle>
|
---|
282 |
|
---|
283 | <seglistitem>
|
---|
284 | <seg>editmap, hoststat, mailstats, mailq, makemap, newaliases,
|
---|
285 | praliases, purgestat, sendmail, smrsh, and vacation</seg>
|
---|
286 | <seg>None</seg>
|
---|
287 | <seg>/etc/mail, /usr/share/doc/sendmail-&sendmail-version;,
|
---|
288 | /var/spool/mqueue, and /var/spool/clientmqueue</seg>
|
---|
289 | </seglistitem>
|
---|
290 | </segmentedlist>
|
---|
291 |
|
---|
292 | <variablelist>
|
---|
293 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
294 | <?dbfo list-presentation="list"?>
|
---|
295 | <?dbhtml list-presentation="table"?>
|
---|
296 |
|
---|
297 | <varlistentry id="editmap">
|
---|
298 | <term><command>editmap</command></term>
|
---|
299 | <listitem>
|
---|
300 | <para>queries and edits <application>sendmail</application> map
|
---|
301 | files.</para>
|
---|
302 | <indexterm zone="sendmail editmap">
|
---|
303 | <primary sortas="b-editmap">editmap</primary>
|
---|
304 | </indexterm>
|
---|
305 | </listitem>
|
---|
306 | </varlistentry>
|
---|
307 |
|
---|
308 | <varlistentry id="hoststat">
|
---|
309 | <term><command>hoststat</command></term>
|
---|
310 | <listitem>
|
---|
311 | <para>prints <application>sendmail</application>'s persistent host
|
---|
312 | status.</para>
|
---|
313 | <indexterm zone="sendmail hoststat">
|
---|
314 | <primary sortas="b-hoststat">hoststat</primary>
|
---|
315 | </indexterm>
|
---|
316 | </listitem>
|
---|
317 | </varlistentry>
|
---|
318 |
|
---|
319 | <varlistentry id="mailstats">
|
---|
320 | <term><command>mailstats</command></term>
|
---|
321 | <listitem>
|
---|
322 | <para>displays <application>sendmail</application> statistics.</para>
|
---|
323 | <indexterm zone="sendmail mailstats">
|
---|
324 | <primary sortas="b-mailstats">mailstats</primary>
|
---|
325 | </indexterm>
|
---|
326 | </listitem>
|
---|
327 | </varlistentry>
|
---|
328 |
|
---|
329 | <varlistentry id="mailq-sendmail">
|
---|
330 | <term><command>mailq</command></term>
|
---|
331 | <listitem>
|
---|
332 | <para>prints a summary of outbound mail messages waiting for
|
---|
333 | delivery.</para>
|
---|
334 | <indexterm zone="sendmail mailq-sendmail">
|
---|
335 | <primary sortas="b-mailq">mailq</primary>
|
---|
336 | </indexterm>
|
---|
337 | </listitem>
|
---|
338 | </varlistentry>
|
---|
339 |
|
---|
340 | <varlistentry id="makemap">
|
---|
341 | <term><command>makemap</command></term>
|
---|
342 | <listitem>
|
---|
343 | <para>creates <application>sendmail</application> map files.</para>
|
---|
344 | <indexterm zone="sendmail makemap">
|
---|
345 | <primary sortas="b-makemap">makemap</primary>
|
---|
346 | </indexterm>
|
---|
347 | </listitem>
|
---|
348 | </varlistentry>
|
---|
349 |
|
---|
350 | <varlistentry id="newaliases-sendmail">
|
---|
351 | <term><command>newaliases</command></term>
|
---|
352 | <listitem>
|
---|
353 | <para>rebuilds <filename>/etc/mail/aliases.db</filename> from the
|
---|
354 | contents of <filename>/etc/mail/aliases</filename>.</para>
|
---|
355 | <indexterm zone="sendmail newaliases-sendmail">
|
---|
356 | <primary sortas="b-newaliases">newaliases</primary>
|
---|
357 | </indexterm>
|
---|
358 | </listitem>
|
---|
359 | </varlistentry>
|
---|
360 |
|
---|
361 | <varlistentry id="praliases">
|
---|
362 | <term><command>praliases</command></term>
|
---|
363 | <listitem>
|
---|
364 | <para>displays current <application>sendmail</application>
|
---|
365 | aliases.</para>
|
---|
366 | <indexterm zone="sendmail praliases">
|
---|
367 | <primary sortas="b-praliases">praliases</primary>
|
---|
368 | </indexterm>
|
---|
369 | </listitem>
|
---|
370 | </varlistentry>
|
---|
371 |
|
---|
372 | <varlistentry id="purgestat">
|
---|
373 | <term><command>purgestat</command></term>
|
---|
374 | <listitem>
|
---|
375 | <para> causes <application>sendmail</application> to clear (purge)
|
---|
376 | all its host-status information.</para>
|
---|
377 | <indexterm zone="sendmail purgestat">
|
---|
378 | <primary sortas="b-purgestat">purgestat</primary>
|
---|
379 | </indexterm>
|
---|
380 | </listitem>
|
---|
381 | </varlistentry>
|
---|
382 |
|
---|
383 | <varlistentry id="sendmail-prog-sendmail">
|
---|
384 | <term><command>sendmail</command></term>
|
---|
385 | <listitem>
|
---|
386 | <para>is the <application>sendmail</application> mail transport
|
---|
387 | agent.</para>
|
---|
388 | <indexterm zone="sendmail sendmail-prog-sendmail">
|
---|
389 | <primary sortas="b-sendmail">sendmail</primary>
|
---|
390 | </indexterm>
|
---|
391 | </listitem>
|
---|
392 | </varlistentry>
|
---|
393 |
|
---|
394 | <varlistentry id="smrsh">
|
---|
395 | <term><command>smrsh</command></term>
|
---|
396 | <listitem>
|
---|
397 | <para>is a restricted shell for
|
---|
398 | <application>sendmail</application>.</para>
|
---|
399 | <indexterm zone="sendmail smrsh">
|
---|
400 | <primary sortas="b-smrsh">smrsh</primary>
|
---|
401 | </indexterm>
|
---|
402 | </listitem>
|
---|
403 | </varlistentry>
|
---|
404 |
|
---|
405 | <varlistentry id="vacation-sendmail">
|
---|
406 | <term><command>vacation</command></term>
|
---|
407 | <listitem>
|
---|
408 | <para>is an email auto responder.</para>
|
---|
409 | <indexterm zone="sendmail vacation-sendmail">
|
---|
410 | <primary sortas="b-vacation">vacation</primary>
|
---|
411 | </indexterm>
|
---|
412 | </listitem>
|
---|
413 | </varlistentry>
|
---|
414 |
|
---|
415 | </variablelist>
|
---|
416 |
|
---|
417 | </sect2>
|
---|
418 |
|
---|
419 | </sect1>
|
---|