source: server/mail/sendmail.xml@ 2da40d0

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2da40d0 was 2da40d0, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Some more late-night tags

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

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