source: server/mail/sendmail.xml@ 2873c52

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 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/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2873c52 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
RevLine 
[0931098]1<?xml version="1.0" encoding="ISO-8859-1"?>
[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
[e6bbc4f9]7 <!ENTITY sendmail-download-http "http://www.sendmail.org/ftp/sendmail.&sendmail-version;.tar.gz">
[fb33bddb]8 <!ENTITY sendmail-download-ftp "ftp://ftp.sendmail.org/pub/sendmail/sendmail.&sendmail-version;.tar.gz">
[dc600829]9 <!ENTITY sendmail-md5sum "02ccfc331cc81ed00ec8bb5ecfc69018">
[2e8e154]10 <!ENTITY sendmail-size "2.0 MB">
[7b769ad]11 <!ENTITY sendmail-buildsize "19 MB">
[2e8e154]12 <!ENTITY sendmail-time "0.3 SBU">
[0931098]13]>
14
[dc600829]15<sect1 id="sendmail" xreflabel="sendmail-&sendmail-version;">
[e6bbc4f9]16 <?dbhtml filename="sendmail.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
[dc600829]23 <title>sendmail-&sendmail-version;</title>
[e6bbc4f9]24
25 <indexterm zone="sendmail">
[dc600829]26 <primary sortas="a-sendmail">sendmail</primary>
[e6bbc4f9]27 </indexterm>
28
29 <sect2 role="package">
[dc600829]30 <title>Introduction to sendmail</title>
[e6bbc4f9]31
[dc600829]32 <para>The <application>sendmail</application> package contains a Mail
[e6bbc4f9]33 Transport Agent (MTA).</para>
34
[8c5de824]35 &lfs72_checked;
[5d28d0d4]36
[e6bbc4f9]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
[dc600829]59 <bridgehead renderas="sect3">sendmail Dependencies</bridgehead>
[e6bbc4f9]60
61 <bridgehead renderas="sect4">Required</bridgehead>
[dc600829]62 <para role="required">
63 <xref linkend="openldap"/>
64 </para>
[e6bbc4f9]65
66 <bridgehead renderas="sect4">Optional</bridgehead>
[dc600829]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>
[e6bbc4f9]74
[3cb0c57]75 <para condition="html" role="usernotes">User Notes:
76 <ulink url="&blfs-wiki;/sendmail"/></para>
77
[e6bbc4f9]78 </sect2>
79
80 <sect2 role="installation">
[dc600829]81 <title>Installation of sendmail</title>
[e6bbc4f9]82
[dc600829]83 <para>Before building <application>sendmail</application>, create the
[fb33bddb]84 required user, group and directory with the following commands issued as
85 the <systemitem class="username">root</systemitem> user:</para>
[e6bbc4f9]86
[b785ab29]87<screen role="root"><userinput>groupadd -g 26 smmsp &amp;&amp;
[fb33bddb]88useradd -c "Sendmail Daemon" -g smmsp -d /dev/null \
89 -s /bin/false -u 26 smmsp &amp;&amp;
[8f400dc]90chmod -v 1777 /var/mail &amp;&amp;
[e6bbc4f9]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
[8c5de824]96 support for SASL, StartTLS
[e6bbc4f9]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"
[8c5de824]102<literal>APPENDDEF(`confENVDEF',`-DSTARTTLS -DSASL -DLDAPMAP')
103APPENDDEF(`confLIBS', `-lssl -lcrypto -lsasl2 -lldap -llber')
[e6bbc4f9]104APPENDDEF(`confINCDIRS', `-I/usr/include/sasl')</literal>
105EOF</userinput></screen>
[113bb709]106
[dc600829]107 <para>Install <application>sendmail</application> with the following
[e6bbc4f9]108 commands:</para>
[0931098]109
[e6bbc4f9]110<screen><userinput>cat &gt;&gt; devtools/Site/site.config.m4 &lt;&lt; "EOF"
111<literal>define(`confMANGRP',`root')
[0931098]112define(`confMANOWN',`root')
113define(`confSBINGRP',`root')
114define(`confUBINGRP',`root')
[e6bbc4f9]115define(`confUBINOWN',`root')</literal>
116EOF
[0931098]117cd sendmail &amp;&amp;
118sh Build &amp;&amp;
119cd ../cf/cf &amp;&amp;
120cp generic-linux.mc sendmail.mc &amp;&amp;
[e6bbc4f9]121sh Build sendmail.cf</userinput></screen>
[d8614521]122
[2e8e154]123 <para>This package does not come with a test suite.</para>
124
[e6bbc4f9]125 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[d8614521]126
[e6bbc4f9]127<screen role="root"><userinput>install -v -d -m755 /etc/mail &amp;&amp;
[0931098]128sh Build install-cf &amp;&amp;
[fb33bddb]129
130cd ../.. &amp;&amp;
[b40beacc]131sh Build install &amp;&amp;
[fb33bddb]132
133install -v -m644 cf/cf/{submit,sendmail}.mc /etc/mail &amp;&amp;
[d8614521]134cp -v -R cf/* /etc/mail &amp;&amp;
[fb33bddb]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
[e6bbc4f9]144for manpage in sendmail editmap mailstats makemap praliases smrsh
[b40beacc]145do
[d8614521]146 install -v -m444 $manpage/$manpage.8 /usr/share/man/man8
[b40beacc]147done &amp;&amp;
[d8614521]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;
[e6bbc4f9]151install -v -m444 vacation/vacation.1 /usr/share/man/man1</userinput></screen>
[0931098]152
[dc600829]153 <para>Install the <application>sendmail</application> Installation and
[e6bbc4f9]154 Operations Guide with the following commands:</para>
[65e6ea9]155
[e6bbc4f9]156<screen><userinput>cd doc/op &amp;&amp;
[fb33bddb]157sed -i 's/groff/GROFF_NO_SGR=1 groff/' Makefile &amp;&amp;
[e6bbc4f9]158make op.txt op.pdf</userinput></screen>
[d8614521]159
[e6bbc4f9]160 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[d8614521]161
[e6bbc4f9]162<screen role="root"><userinput>install -v -d -m755 /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
[fb33bddb]163install -v -m644 op.ps op.txt op.pdf /usr/share/doc/sendmail-&sendmail-version; &amp;&amp;
164cd ../..</userinput></screen>
[e6bbc4f9]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;
[dc600829]179 sh Build install</command>: <application>sendmail</application> uses an
[e6bbc4f9]180 <application>m4</application> based build script to create the various
[fb33bddb]181 <filename>Makefile</filename>s. These commands build and install the
[e6bbc4f9]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">
[dc600829]192 <title>Configuring sendmail</title>
[e6bbc4f9]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
[dc600829]221 <para><application>sendmail</application>'s primary configuration file,
[e6bbc4f9]222 <filename>/etc/mail/sendmail.cf</filename>, is complex and not meant to be
[fb33bddb]223 directly edited. The recommended method for changing it is to modify
224 <filename>/etc/mail/sendmail.mc</filename> and various
[e6bbc4f9]225 <application>m4</application> files, then run the <command>m4</command>
[fb33bddb]226 macro processor from within
227 <filename class='directory'>/etc/mail</filename> as follows:</para>
[e6bbc4f9]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
[dc600829]239 <para>To automate the running of <application>sendmail</application>
[e6bbc4f9]240 at startup, install the <filename>/etc/rc.d/init.d/sendmail</filename>
241 init script included in the
[5254d12]242 <xref linkend="bootscripts"/> package.</para>
[e6bbc4f9]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
[dc600829]252 of minutes, controls how often <application>sendmail</application> will
[e6bbc4f9]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>
[dc600829]288 <para>queries and edits <application>sendmail</application> map
[e6bbc4f9]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>
[dc600829]299 <para>prints <application>sendmail</application>'s persistent host
[e6bbc4f9]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>
[dc600829]310 <para>displays <application>sendmail</application> statistics.</para>
[e6bbc4f9]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>
[dc600829]331 <para>creates <application>sendmail</application> map files.</para>
[e6bbc4f9]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>
[dc600829]352 <para>displays current <application>sendmail</application>
[e6bbc4f9]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>
[dc600829]363 <para> causes <application>sendmail</application> to clear (purge)
[e6bbc4f9]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>
[dc600829]374 <para>is the <application>sendmail</application> mail transport
[e6bbc4f9]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
[dc600829]386 <application>sendmail</application>.</para>
[e6bbc4f9]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>
[f45b1953]406
407</sect1>
Note: See TracBrowser for help on using the repository browser.