source: server/mail/sendmail.xml@ 90fb8f6

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 xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since 90fb8f6 was 90fb8f6, checked in by Xi Ruoyao <xry111@…>, 20 months ago

server: URL updates

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