source: server/mail/sendmail.xml@ 118b201

10.0 10.1 11.0 9.0 9.1 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 118b201 was 118b201, checked in by Pierre Labastie <pieere@…>, 2 years ago

Various fixes and nits:

  • gnome-calculator: fix building with vala-0.44.x
  • sendmail: don't use an unset variable
  • file-roller: separate install and configuration
  • xincludes: fix updating the icon cache and the desktop database

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

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