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

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.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 06908bf6 was 06908bf6, checked in by Pierre Labastie <pieere@…>, 5 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
RevLine 
[0931098]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[0931098]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[10405e6]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 " ">
[fb33bddb]10 <!ENTITY sendmail-download-ftp "ftp://ftp.sendmail.org/pub/sendmail/sendmail.&sendmail-version;.tar.gz">
[00e014f4]11 <!ENTITY sendmail-md5sum "a824fa7dea4d3341efb6462ccd816f00">
[2347067b]12 <!ENTITY sendmail-size "2.1 MB">
[00e014f4]13 <!ENTITY sendmail-buildsize "14 MB">
14 <!ENTITY sendmail-time "0.2 SBU">
[0931098]15]>
16
[dc600829]17<sect1 id="sendmail" xreflabel="sendmail-&sendmail-version;">
[e6bbc4f9]18 <?dbhtml filename="sendmail.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
[dc600829]25 <title>sendmail-&sendmail-version;</title>
[e6bbc4f9]26
27 <indexterm zone="sendmail">
[dc600829]28 <primary sortas="a-sendmail">sendmail</primary>
[e6bbc4f9]29 </indexterm>
30
31 <sect2 role="package">
[dc600829]32 <title>Introduction to sendmail</title>
[e6bbc4f9]33
[dc600829]34 <para>The <application>sendmail</application> package contains a Mail
[e6bbc4f9]35 Transport Agent (MTA).</para>
36
[1005be4]37 &lfs84_checked;
[5d28d0d4]38
[e6bbc4f9]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>
[91c26753]60 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
61
62 <itemizedlist spacing="compact">
63 <listitem>
64 <para>
65 Required patch:
[abca0d9]66 <ulink url="&patch-root;/sendmail.&sendmail-version;-openssl-1.patch"/>
[91c26753]67 </para>
68 </listitem>
69 </itemizedlist>
[e6bbc4f9]70
[dc600829]71 <bridgehead renderas="sect3">sendmail Dependencies</bridgehead>
[e6bbc4f9]72
73 <bridgehead renderas="sect4">Required</bridgehead>
[dc600829]74 <para role="required">
[4585084d]75 <xref linkend="openldap"/> (client)
[dc600829]76 </para>
[e6bbc4f9]77
[23af6f9]78 <bridgehead renderas="sect4">Recommended</bridgehead>
79 <para role="recommended">
[c612fc3]80 <xref linkend="cyrus-sasl"/>
81 </para>
82
[e6bbc4f9]83 <bridgehead renderas="sect4">Optional</bridgehead>
[dc600829]84 <para role="optional">
[dc20ce3]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
[ebbe9675]88 <ulink url="https://github.com/chaos/nph">nph</ulink>
[dc600829]89 </para>
[e6bbc4f9]90
[3cb0c57]91 <para condition="html" role="usernotes">User Notes:
92 <ulink url="&blfs-wiki;/sendmail"/></para>
93
[e6bbc4f9]94 </sect2>
95
96 <sect2 role="installation">
[dc600829]97 <title>Installation of sendmail</title>
[e6bbc4f9]98
[dc600829]99 <para>Before building <application>sendmail</application>, create the
[fb33bddb]100 required user, group and directory with the following commands issued as
101 the <systemitem class="username">root</systemitem> user:</para>
[e6bbc4f9]102
[10405e6]103<screen role="root"><userinput>groupadd -g 26 smmsp &amp;&amp;
[fb33bddb]104useradd -c "Sendmail Daemon" -g smmsp -d /dev/null \
[10405e6]105 -s /bin/false -u 26 smmsp &amp;&amp;
106chmod -v 1777 /var/mail &amp;&amp;
[e6bbc4f9]107install -v -m700 -d /var/spool/mqueue</userinput></screen>
108
[10405e6]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
[e6bbc4f9]112 (<application>OpenSSL</application>) and
[10405e6]113 <application>OpenLDAP</application>, as a starting point. Of course,
114 modify it to suit your particular needs.</para></note>
[e6bbc4f9]115
116<screen><userinput>cat &gt;&gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"
[8c5de824]117<literal>APPENDDEF(`confENVDEF',`-DSTARTTLS -DSASL -DLDAPMAP')
[91c26753]118APPENDDEF(`confLIBS', `-lssl -lcrypto -lsasl2 -lldap -llber -ldb')
119APPENDDEF(`confINCDIRS', `-I/usr/include/sasl')</literal>
[e6bbc4f9]120EOF</userinput></screen>
[113bb709]121
[dc600829]122 <para>Install <application>sendmail</application> with the following
[e6bbc4f9]123 commands:</para>
[0931098]124
[118b201]125<screen><userinput>patch -Np1 -i ../sendmail.&sendmail-version;-openssl-1.patch &amp;&amp;
[91c26753]126
127cat &gt;&gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"
[e6bbc4f9]128<literal>define(`confMANGRP',`root')
[0931098]129define(`confMANOWN',`root')
130define(`confSBINGRP',`root')
131define(`confUBINGRP',`root')
[2347067b]132define(`confUBINOWN',`root')</literal>
[e6bbc4f9]133EOF
[10405e6]134
[3b00d20]135sed -i 's|/usr/man/man|/usr/share/man/man|' \
136 devtools/OS/Linux &amp;&amp;
137
[10405e6]138cd sendmail &amp;&amp;
139sh Build &amp;&amp;
140cd ../cf/cf &amp;&amp;
[0931098]141cp generic-linux.mc sendmail.mc &amp;&amp;
[e6bbc4f9]142sh Build sendmail.cf</userinput></screen>
[d8614521]143
[2e8e154]144 <para>This package does not come with a test suite.</para>
145
[e6bbc4f9]146 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[d8614521]147
[e6bbc4f9]148<screen role="root"><userinput>install -v -d -m755 /etc/mail &amp;&amp;
[0931098]149sh Build install-cf &amp;&amp;
[fb33bddb]150
[10405e6]151cd ../.. &amp;&amp;
152sh Build install &amp;&amp;
[fb33bddb]153
154install -v -m644 cf/cf/{submit,sendmail}.mc /etc/mail &amp;&amp;
[10405e6]155cp -v -R cf/* /etc/mail &amp;&amp;
[fb33bddb]156
157install -v -m755 -d /usr/share/doc/sendmail-&sendmail-version;/{cf,sendmail} &amp;&amp;
[10405e6]158
159install -v -m644 CACerts FAQ KNOWNBUGS LICENSE PGPKEYS README RELEASE_NOTES \
[fb33bddb]160 /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
[10405e6]161
[fb33bddb]162install -v -m644 sendmail/{README,SECURITY,TRACEFLAGS,TUNING} \
163 /usr/share/doc/sendmail-&sendmail-version;/sendmail &amp;&amp;
[10405e6]164
[fb33bddb]165install -v -m644 cf/README /usr/share/doc/sendmail-&sendmail-version;/cf &amp;&amp;
166
[e6bbc4f9]167for manpage in sendmail editmap mailstats makemap praliases smrsh
[b40beacc]168do
[10405e6]169 install -v -m644 $manpage/$manpage.8 /usr/share/man/man8
[b40beacc]170done &amp;&amp;
[10405e6]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>
[0931098]176
[dc600829]177 <para>Install the <application>sendmail</application> Installation and
[e6bbc4f9]178 Operations Guide with the following commands:</para>
[65e6ea9]179
[10405e6]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
[06908bf6]185<screen remap="doc"><userinput>cd doc/op &amp;&amp;
[fb33bddb]186sed -i 's/groff/GROFF_NO_SGR=1 groff/' Makefile &amp;&amp;
[e6bbc4f9]187make op.txt op.pdf</userinput></screen>
[d8614521]188
[e6bbc4f9]189 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[d8614521]190
[06908bf6]191<screen role="root"
192 remap="doc"><userinput>install -v -d -m755 /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
[fb33bddb]193install -v -m644 op.ps op.txt op.pdf /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
194cd ../..</userinput></screen>
[e6bbc4f9]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
[3b00d20]204 <para><command>sed ... devtools/OS/Linux</command>: The site.config.m4
[f3429309]205 does not honor a change to the man directory, so fix it in the OS
[3b00d20]206 definitions.</para>
207
[10405e6]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
[e6bbc4f9]211 <para><command>sh Build; sh Build sendmail.cf; sh Build install-cf;
[dc600829]212 sh Build install</command>: <application>sendmail</application> uses an
[e6bbc4f9]213 <application>m4</application> based build script to create the various
[fb33bddb]214 <filename>Makefile</filename>s. These commands build and install the
[e6bbc4f9]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">
[dc600829]225 <title>Configuring sendmail</title>
[e6bbc4f9]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
[059a1a5c]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
[e6bbc4f9]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
[6cf1113]256newaliases</userinput></screen>
[e6bbc4f9]257
[dc600829]258 <para><application>sendmail</application>'s primary configuration file,
[e6bbc4f9]259 <filename>/etc/mail/sendmail.cf</filename>, is complex and not meant to be
[fb33bddb]260 directly edited. The recommended method for changing it is to modify
261 <filename>/etc/mail/sendmail.mc</filename> and various
[e6bbc4f9]262 <application>m4</application> files, then run the <command>m4</command>
[fb33bddb]263 macro processor from within
264 <filename class='directory'>/etc/mail</filename> as follows:</para>
[e6bbc4f9]265
[3b00d20]266<screen role="root"><userinput>cd /etc/mail &amp;&amp;
267m4 m4/cf.m4 sendmail.mc > sendmail.cf</userinput></screen>
[e6bbc4f9]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">
[1258125]275 <title><phrase revision="sysv">Boot Script</phrase>
276 <phrase revision="systemd">Systemd Unit</phrase></title>
[e6bbc4f9]277
[dc600829]278 <para>To automate the running of <application>sendmail</application>
[1258125]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
[3c7bd00]284 <xref linkend="bootscripts" revision="sysv"/>
285 <xref linkend="systemd-units" revision="systemd"/> package.</para>
[e6bbc4f9]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
[dc600829]295 of minutes, controls how often <application>sendmail</application> will
[1258125]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>
[e6bbc4f9]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>
[4585084d]316 <seg>editmap, mailstats, makemap, praliases, sendmail, smrsh,
317 and vacation; symlinks to /usr/sbin/sendmail: hoststat, mailq,
318 newaliases, and purgestat</seg>
[e6bbc4f9]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>
[dc600829]333 <para>queries and edits <application>sendmail</application> map
[e6bbc4f9]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>
[dc600829]344 <para>prints <application>sendmail</application>'s persistent host
[e6bbc4f9]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>
[dc600829]355 <para>displays <application>sendmail</application> statistics.</para>
[e6bbc4f9]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>
[dc600829]376 <para>creates <application>sendmail</application> map files.</para>
[e6bbc4f9]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>
[dc600829]397 <para>displays current <application>sendmail</application>
[e6bbc4f9]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>
[dc600829]408 <para> causes <application>sendmail</application> to clear (purge)
[e6bbc4f9]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>
[dc600829]419 <para>is the <application>sendmail</application> mail transport
[e6bbc4f9]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
[dc600829]431 <application>sendmail</application>.</para>
[e6bbc4f9]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>
[f45b1953]451
452</sect1>
Note: See TracBrowser for help on using the repository browser.