source: server/mail/sendmail.xml@ beb65db

10.0 10.1 11.0 11.1 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind lazarus perl-modules qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since beb65db was beb65db, checked in by Douglas R. Reno <renodr@…>, 5 years ago

Tags, Tags, the final round of my tags for the night!

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

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