source: server/mail/sendmail.xml

trunk
Last change on this file was 5d0e7b8, checked in by Douglas R. Reno <renodr@…>, 2 months ago

A bunch of tags

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