source: server/mail/sendmail.xml@ 06908bf6

10.0 10.1 11.0 9.0 9.1 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 06908bf6 was 06908bf6, checked in by Pierre Labastie <pieere@…>, 2 years ago

Add remap="doc", remap="test", or just realign them

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21946 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 16.3 KB
Line 
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 "a824fa7dea4d3341efb6462ccd816f00">
12 <!ENTITY sendmail-size "2.1 MB">
13 <!ENTITY sendmail-buildsize "14 MB">
14 <!ENTITY sendmail-time "0.2 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 &lfs84_checked;
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 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
61
62 <itemizedlist spacing="compact">
63 <listitem>
64 <para>
65 Required patch:
66 <ulink url="&patch-root;/sendmail.&sendmail-version;-openssl-1.patch"/>
67 </para>
68 </listitem>
69 </itemizedlist>
70
71 <bridgehead renderas="sect3">sendmail Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Required</bridgehead>
74 <para role="required">
75 <xref linkend="openldap"/> (client)
76 </para>
77
78 <bridgehead renderas="sect4">Recommended</bridgehead>
79 <para role="recommended">
80 <xref linkend="cyrus-sasl"/>
81 </para>
82
83 <bridgehead renderas="sect4">Optional</bridgehead>
84 <para role="optional">
85 <xref linkend="gs"/> (for creating PDF documentation),
86 <xref linkend="procmail"/> (the configuration proposed below requires
87 that <command>procmail</command> be present at run-time), and
88 <ulink url="https://github.com/chaos/nph">nph</ulink>
89 </para>
90
91 <para condition="html" role="usernotes">User Notes:
92 <ulink url="&blfs-wiki;/sendmail"/></para>
93
94 </sect2>
95
96 <sect2 role="installation">
97 <title>Installation of sendmail</title>
98
99 <para>Before building <application>sendmail</application>, create the
100 required user, group and directory with the following commands issued as
101 the <systemitem class="username">root</systemitem> user:</para>
102
103<screen role="root"><userinput>groupadd -g 26 smmsp &amp;&amp;
104useradd -c "Sendmail Daemon" -g smmsp -d /dev/null \
105 -s /bin/false -u 26 smmsp &amp;&amp;
106chmod -v 1777 /var/mail &amp;&amp;
107install -v -m700 -d /var/spool/mqueue</userinput></screen>
108
109 <note><para>See the source tree <filename>sendmail/README</filename> file
110 for information on linking optional packages into the build. Use the
111 example below, which adds support for SASL, StartTLS
112 (<application>OpenSSL</application>) and
113 <application>OpenLDAP</application>, as a starting point. Of course,
114 modify it to suit your particular needs.</para></note>
115
116<screen><userinput>cat &gt;&gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"
117<literal>APPENDDEF(`confENVDEF',`-DSTARTTLS -DSASL -DLDAPMAP')
118APPENDDEF(`confLIBS', `-lssl -lcrypto -lsasl2 -lldap -llber -ldb')
119APPENDDEF(`confINCDIRS', `-I/usr/include/sasl')</literal>
120EOF</userinput></screen>
121
122 <para>Install <application>sendmail</application> with the following
123 commands:</para>
124
125<screen><userinput>patch -Np1 -i ../sendmail.&sendmail-version;-openssl-1.patch &amp;&amp;
126
127cat &gt;&gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"
128<literal>define(`confMANGRP',`root')
129define(`confMANOWN',`root')
130define(`confSBINGRP',`root')
131define(`confUBINGRP',`root')
132define(`confUBINOWN',`root')</literal>
133EOF
134
135sed -i 's|/usr/man/man|/usr/share/man/man|' \
136 devtools/OS/Linux &amp;&amp;
137
138cd sendmail &amp;&amp;
139sh Build &amp;&amp;
140cd ../cf/cf &amp;&amp;
141cp generic-linux.mc sendmail.mc &amp;&amp;
142sh Build sendmail.cf</userinput></screen>
143
144 <para>This package does not come with a test suite.</para>
145
146 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
147
148<screen role="root"><userinput>install -v -d -m755 /etc/mail &amp;&amp;
149sh Build install-cf &amp;&amp;
150
151cd ../.. &amp;&amp;
152sh Build install &amp;&amp;
153
154install -v -m644 cf/cf/{submit,sendmail}.mc /etc/mail &amp;&amp;
155cp -v -R cf/* /etc/mail &amp;&amp;
156
157install -v -m755 -d /usr/share/doc/sendmail-&sendmail-version;/{cf,sendmail} &amp;&amp;
158
159install -v -m644 CACerts FAQ KNOWNBUGS LICENSE PGPKEYS README RELEASE_NOTES \
160 /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
161
162install -v -m644 sendmail/{README,SECURITY,TRACEFLAGS,TUNING} \
163 /usr/share/doc/sendmail-&sendmail-version;/sendmail &amp;&amp;
164
165install -v -m644 cf/README /usr/share/doc/sendmail-&sendmail-version;/cf &amp;&amp;
166
167for manpage in sendmail editmap mailstats makemap praliases smrsh
168do
169 install -v -m644 $manpage/$manpage.8 /usr/share/man/man8
170done &amp;&amp;
171
172install -v -m644 sendmail/aliases.5 /usr/share/man/man5 &amp;&amp;
173install -v -m644 sendmail/mailq.1 /usr/share/man/man1 &amp;&amp;
174install -v -m644 sendmail/newaliases.1 /usr/share/man/man1 &amp;&amp;
175install -v -m644 vacation/vacation.1 /usr/share/man/man1</userinput></screen>
176
177 <para>Install the <application>sendmail</application> Installation and
178 Operations Guide with the following commands:</para>
179
180 <note><para>Remove <filename>op.pdf</filename> from the
181 <command>make</command> and <command>install</command> commands below if
182 you don't have <application>Ghostscript</application>
183 installed.</para></note>
184
185<screen remap="doc"><userinput>cd doc/op &amp;&amp;
186sed -i 's/groff/GROFF_NO_SGR=1 groff/' Makefile &amp;&amp;
187make op.txt op.pdf</userinput></screen>
188
189 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
190
191<screen role="root"
192 remap="doc"><userinput>install -v -d -m755 /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
193install -v -m644 op.ps op.txt op.pdf /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
194cd ../..</userinput></screen>
195
196 </sect2>
197
198 <sect2 role="commands">
199 <title>Command Explanations</title>
200
201 <para><command>cat &gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"</command>:
202 This creates a configuration file changing some of the default settings.</para>
203
204 <para><command>sed ... devtools/OS/Linux</command>: The site.config.m4
205 does not honor a change to the man directory, so fix it in the OS
206 definitions.</para>
207
208 <para><command>sed ... include/sm/bdb.h</command>: This allows sendmail to
209 build properly with <xref linkend='db'/> versions 5 and above.</para>
210
211 <para><command>sh Build; sh Build sendmail.cf; sh Build install-cf;
212 sh Build install</command>: <application>sendmail</application> uses an
213 <application>m4</application> based build script to create the various
214 <filename>Makefile</filename>s. These commands build and install the
215 package.</para>
216
217 <para><command>for manpage in...;do...;done; install ...</command>: The man
218 pages are installed already formatted and <command>man</command> displays
219 them somewhat garbled. These commands replace the formatted pages with
220 pages <command>man</command> can display properly.</para>
221
222 </sect2>
223
224 <sect2 role="configuration">
225 <title>Configuring sendmail</title>
226
227 <sect3 id="sendmail-config">
228 <title>Config Files</title>
229
230 <para><filename>/etc/mail/*</filename></para>
231
232 <indexterm zone="sendmail sendmail-config">
233 <primary sortas="e-etc-mail">/etc/mail/*</primary>
234 </indexterm>
235
236 </sect3>
237
238 <sect3>
239 <title>Configuration Information</title>
240
241 <note><para>Ensure you have a fully qualified domain name defined
242 in <filename>/etc/hosts</filename> for your system before proceeding.
243 </para></note>
244
245 <para>Create the <filename>/etc/mail/local-host-names</filename> and
246 <filename>/etc/mail/aliases</filename> files using the following
247 commands as the <systemitem class="username">root</systemitem>
248 user:</para>
249
250<screen role="root"><userinput>echo $(hostname) > /etc/mail/local-host-names
251cat &gt; /etc/mail/aliases &lt;&lt; "EOF"
252<literal>postmaster: root
253MAILER-DAEMON: root</literal>
254
255EOF
256newaliases</userinput></screen>
257
258 <para><application>sendmail</application>'s primary configuration file,
259 <filename>/etc/mail/sendmail.cf</filename>, is complex and not meant to be
260 directly edited. The recommended method for changing it is to modify
261 <filename>/etc/mail/sendmail.mc</filename> and various
262 <application>m4</application> files, then run the <command>m4</command>
263 macro processor from within
264 <filename class='directory'>/etc/mail</filename> as follows:</para>
265
266<screen role="root"><userinput>cd /etc/mail &amp;&amp;
267m4 m4/cf.m4 sendmail.mc > sendmail.cf</userinput></screen>
268
269 <para>A full explanation of the files to modify, and the available
270 parameters can be found in <filename>/etc/mail/README</filename>.</para>
271
272 </sect3>
273
274 <sect3 id="sendmail-init">
275 <title><phrase revision="sysv">Boot Script</phrase>
276 <phrase revision="systemd">Systemd Unit</phrase></title>
277
278 <para>To automate the running of <application>sendmail</application>
279 at startup, install the
280 <phrase revision="sysv"><filename>/etc/rc.d/init.d/sendmail</filename>
281 init script</phrase>
282 <phrase revision="systemd"><filename>sendmail.service</filename>
283 unit</phrase> included in the
284 <xref linkend="bootscripts" revision="sysv"/>
285 <xref linkend="systemd-units" revision="systemd"/> package.</para>
286
287 <indexterm zone="sendmail sendmail-init">
288 <primary sortas="f-sendmail-init">sendmail</primary>
289 </indexterm>
290
291<screen role="root"><userinput>make install-sendmail</userinput></screen>
292
293 <note>
294 <para>The -qNm option to <command>sendmail</command>, where N is number
295 of minutes, controls how often <application>sendmail</application> will
296 process the mail queue. A default of 5 minutes is used in the
297 <phrase revision="sysv">init script.</phrase>
298 <phrase revision="systemd">systemd unit.</phrase> Individual
299 workstation users may want to set this as low as 1 minute, large
300 installations handling more mail may want to set it higher.</para>
301 </note>
302
303 </sect3>
304
305 </sect2>
306
307 <sect2 role="content">
308 <title>Contents</title>
309
310 <segmentedlist>
311 <segtitle>Installed Programs</segtitle>
312 <segtitle>Installed Libraries</segtitle>
313 <segtitle>Installed Directories</segtitle>
314
315 <seglistitem>
316 <seg>editmap, mailstats, makemap, praliases, sendmail, smrsh,
317 and vacation; symlinks to /usr/sbin/sendmail: hoststat, mailq,
318 newaliases, and purgestat</seg>
319 <seg>None</seg>
320 <seg>/etc/mail, /usr/share/doc/sendmail-&sendmail-version;,
321 /var/spool/mqueue, and /var/spool/clientmqueue</seg>
322 </seglistitem>
323 </segmentedlist>
324
325 <variablelist>
326 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
327 <?dbfo list-presentation="list"?>
328 <?dbhtml list-presentation="table"?>
329
330 <varlistentry id="editmap">
331 <term><command>editmap</command></term>
332 <listitem>
333 <para>queries and edits <application>sendmail</application> map
334 files.</para>
335 <indexterm zone="sendmail editmap">
336 <primary sortas="b-editmap">editmap</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry id="hoststat">
342 <term><command>hoststat</command></term>
343 <listitem>
344 <para>prints <application>sendmail</application>'s persistent host
345 status.</para>
346 <indexterm zone="sendmail hoststat">
347 <primary sortas="b-hoststat">hoststat</primary>
348 </indexterm>
349 </listitem>
350 </varlistentry>
351
352 <varlistentry id="mailstats">
353 <term><command>mailstats</command></term>
354 <listitem>
355 <para>displays <application>sendmail</application> statistics.</para>
356 <indexterm zone="sendmail mailstats">
357 <primary sortas="b-mailstats">mailstats</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="mailq-sendmail">
363 <term><command>mailq</command></term>
364 <listitem>
365 <para>prints a summary of outbound mail messages waiting for
366 delivery.</para>
367 <indexterm zone="sendmail mailq-sendmail">
368 <primary sortas="b-mailq">mailq</primary>
369 </indexterm>
370 </listitem>
371 </varlistentry>
372
373 <varlistentry id="makemap">
374 <term><command>makemap</command></term>
375 <listitem>
376 <para>creates <application>sendmail</application> map files.</para>
377 <indexterm zone="sendmail makemap">
378 <primary sortas="b-makemap">makemap</primary>
379 </indexterm>
380 </listitem>
381 </varlistentry>
382
383 <varlistentry id="newaliases-sendmail">
384 <term><command>newaliases</command></term>
385 <listitem>
386 <para>rebuilds <filename>/etc/mail/aliases.db</filename> from the
387 contents of <filename>/etc/mail/aliases</filename>.</para>
388 <indexterm zone="sendmail newaliases-sendmail">
389 <primary sortas="b-newaliases">newaliases</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="praliases">
395 <term><command>praliases</command></term>
396 <listitem>
397 <para>displays current <application>sendmail</application>
398 aliases.</para>
399 <indexterm zone="sendmail praliases">
400 <primary sortas="b-praliases">praliases</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 <varlistentry id="purgestat">
406 <term><command>purgestat</command></term>
407 <listitem>
408 <para> causes <application>sendmail</application> to clear (purge)
409 all its host-status information.</para>
410 <indexterm zone="sendmail purgestat">
411 <primary sortas="b-purgestat">purgestat</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="sendmail-prog-sendmail">
417 <term><command>sendmail</command></term>
418 <listitem>
419 <para>is the <application>sendmail</application> mail transport
420 agent.</para>
421 <indexterm zone="sendmail sendmail-prog-sendmail">
422 <primary sortas="b-sendmail">sendmail</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
426
427 <varlistentry id="smrsh">
428 <term><command>smrsh</command></term>
429 <listitem>
430 <para>is a restricted shell for
431 <application>sendmail</application>.</para>
432 <indexterm zone="sendmail smrsh">
433 <primary sortas="b-smrsh">smrsh</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437
438 <varlistentry id="vacation-sendmail">
439 <term><command>vacation</command></term>
440 <listitem>
441 <para>is an email auto responder.</para>
442 <indexterm zone="sendmail vacation-sendmail">
443 <primary sortas="b-vacation">vacation</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 </variablelist>
449
450 </sect2>
451
452</sect1>
Note: See TracBrowser for help on using the repository browser.