source: server/mail/sendmail-systemd.xml@ 41484d66

7.6-blfs 7.6-systemd kde5-14269 kde5-14686 systemd-13485
Last change on this file since 41484d66 was 41484d66, checked in by Krejzi <krejzi@…>, 10 years ago

Package checks, tweaks and updates.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@14044 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 15.5 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_built;
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 -v</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>Systemd Units</title>
263
264 <para>
265 To start the <command>sendmail</command> daemon at boot,
266 install the systemd unit from the <xref linkend="bootscripts"/>
267 package by running the following command as the
268 <systemitem class="username">root</systemitem> user:
269 </para>
270
271 <indexterm zone="sendmail sendmail-init">
272 <primary sortas="f-sendmail-init">sendmail</primary>
273 </indexterm>
274
275<screen role="root"><userinput>make install-sendmail</userinput></screen>
276
277 <note>
278 <para>The -qNm option to <command>sendmail</command>, where N is number
279 of minutes, controls how often <application>sendmail</application> will
280 process the mail queue. A default of 5 minutes is used in the systemd
281 units. Individual workstation users may want to set this as low as 1
282 minute, large installations handling more mail may want to set it
283 higher. The value can be changed in
284 <filename>/etc/default/sendmail</filename> file.</para>
285 </note>
286
287 </sect3>
288
289 </sect2>
290
291 <sect2 role="content">
292 <title>Contents</title>
293
294 <segmentedlist>
295 <segtitle>Installed Programs</segtitle>
296 <segtitle>Installed Libraries</segtitle>
297 <segtitle>Installed Directories</segtitle>
298
299 <seglistitem>
300 <seg>editmap, mailstats, makemap, praliases, sendmail, smrsh,
301 and vacation; symlinks to /usr/sbin/sendmail: hoststat, mailq,
302 newaliases, and purgestat</seg>
303 <seg>None</seg>
304 <seg>/etc/mail, /usr/share/doc/sendmail-&sendmail-version;,
305 /var/spool/mqueue, and /var/spool/clientmqueue</seg>
306 </seglistitem>
307 </segmentedlist>
308
309 <variablelist>
310 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
311 <?dbfo list-presentation="list"?>
312 <?dbhtml list-presentation="table"?>
313
314 <varlistentry id="editmap">
315 <term><command>editmap</command></term>
316 <listitem>
317 <para>queries and edits <application>sendmail</application> map
318 files.</para>
319 <indexterm zone="sendmail editmap">
320 <primary sortas="b-editmap">editmap</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="hoststat">
326 <term><command>hoststat</command></term>
327 <listitem>
328 <para>prints <application>sendmail</application>'s persistent host
329 status.</para>
330 <indexterm zone="sendmail hoststat">
331 <primary sortas="b-hoststat">hoststat</primary>
332 </indexterm>
333 </listitem>
334 </varlistentry>
335
336 <varlistentry id="mailstats">
337 <term><command>mailstats</command></term>
338 <listitem>
339 <para>displays <application>sendmail</application> statistics.</para>
340 <indexterm zone="sendmail mailstats">
341 <primary sortas="b-mailstats">mailstats</primary>
342 </indexterm>
343 </listitem>
344 </varlistentry>
345
346 <varlistentry id="mailq-sendmail">
347 <term><command>mailq</command></term>
348 <listitem>
349 <para>prints a summary of outbound mail messages waiting for
350 delivery.</para>
351 <indexterm zone="sendmail mailq-sendmail">
352 <primary sortas="b-mailq">mailq</primary>
353 </indexterm>
354 </listitem>
355 </varlistentry>
356
357 <varlistentry id="makemap">
358 <term><command>makemap</command></term>
359 <listitem>
360 <para>creates <application>sendmail</application> map files.</para>
361 <indexterm zone="sendmail makemap">
362 <primary sortas="b-makemap">makemap</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 <varlistentry id="newaliases-sendmail">
368 <term><command>newaliases</command></term>
369 <listitem>
370 <para>rebuilds <filename>/etc/mail/aliases.db</filename> from the
371 contents of <filename>/etc/mail/aliases</filename>.</para>
372 <indexterm zone="sendmail newaliases-sendmail">
373 <primary sortas="b-newaliases">newaliases</primary>
374 </indexterm>
375 </listitem>
376 </varlistentry>
377
378 <varlistentry id="praliases">
379 <term><command>praliases</command></term>
380 <listitem>
381 <para>displays current <application>sendmail</application>
382 aliases.</para>
383 <indexterm zone="sendmail praliases">
384 <primary sortas="b-praliases">praliases</primary>
385 </indexterm>
386 </listitem>
387 </varlistentry>
388
389 <varlistentry id="purgestat">
390 <term><command>purgestat</command></term>
391 <listitem>
392 <para> causes <application>sendmail</application> to clear (purge)
393 all its host-status information.</para>
394 <indexterm zone="sendmail purgestat">
395 <primary sortas="b-purgestat">purgestat</primary>
396 </indexterm>
397 </listitem>
398 </varlistentry>
399
400 <varlistentry id="sendmail-prog-sendmail">
401 <term><command>sendmail</command></term>
402 <listitem>
403 <para>is the <application>sendmail</application> mail transport
404 agent.</para>
405 <indexterm zone="sendmail sendmail-prog-sendmail">
406 <primary sortas="b-sendmail">sendmail</primary>
407 </indexterm>
408 </listitem>
409 </varlistentry>
410
411 <varlistentry id="smrsh">
412 <term><command>smrsh</command></term>
413 <listitem>
414 <para>is a restricted shell for
415 <application>sendmail</application>.</para>
416 <indexterm zone="sendmail smrsh">
417 <primary sortas="b-smrsh">smrsh</primary>
418 </indexterm>
419 </listitem>
420 </varlistentry>
421
422 <varlistentry id="vacation-sendmail">
423 <term><command>vacation</command></term>
424 <listitem>
425 <para>is an email auto responder.</para>
426 <indexterm zone="sendmail vacation-sendmail">
427 <primary sortas="b-vacation">vacation</primary>
428 </indexterm>
429 </listitem>
430 </varlistentry>
431
432 </variablelist>
433
434 </sect2>
435
436</sect1>
Note: See TracBrowser for help on using the repository browser.