source: server/mail/sendmail.xml@ e1e58be

12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since e1e58be was e1e58be, checked in by Pierre Labastie <pierre.labastie@…>, 7 months ago

Remove all ftp urls

neither firefox nor epiphany can download them, and they are not
well maintained, because rarely tested.
This is WIP because the "(HTTP)" part of "Download (HTTP)" will
need to be removed too.
But let's see what users think first...

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