source: server/mail/sendmail.xml@ 7533b650

10.0 10.1 11.0 11.1 7.10 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind krejzi/svn lazarus nosym perl-modules qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since 7533b650 was 7533b650, checked in by Bruce Dubbs <bdubbs@…>, 8 years ago

tags

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

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