source: server/mail/sendmail.xml@ b3148f55

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 b3148f55 was b3148f55, checked in by Douglas R. Reno <renodr@…>, 3 years ago

Update to highlight-3.62
Update the python3 version to 3.9.2
Tags

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

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