source: server/mail/sendmail.xml@ 8c5de824

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 8c5de824 was 8c5de824, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Tags and minor updates for LFS-7.2.

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

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