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 &&
|
---|
88 | useradd -c "Sendmail Daemon" -g smmsp -d /dev/null \
|
---|
89 | -s /bin/false -u 26 smmsp &&
|
---|
90 | chmod -v 1777 /var/mail &&
|
---|
91 | install -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 >> devtools/Site/site.config.m4 << "EOF"
|
---|
102 | <literal>APPENDDEF(`confENVDEF',`-DSTARTTLS -DSASL -DLDAPMAP')
|
---|
103 | APPENDDEF(`confLIBS', `-lssl -lcrypto -lsasl2 -lldap -llber')
|
---|
104 | APPENDDEF(`confINCDIRS', `-I/usr/include/sasl')</literal>
|
---|
105 | EOF</userinput></screen>
|
---|
106 |
|
---|
107 | <para>Install <application>sendmail</application> with the following
|
---|
108 | commands:</para>
|
---|
109 |
|
---|
110 | <screen><userinput>cat >> devtools/Site/site.config.m4 << "EOF"
|
---|
111 | <literal>define(`confMANGRP',`root')
|
---|
112 | define(`confMANOWN',`root')
|
---|
113 | define(`confSBINGRP',`root')
|
---|
114 | define(`confUBINGRP',`root')
|
---|
115 | define(`confUBINOWN',`root')</literal>
|
---|
116 | EOF
|
---|
117 | cd sendmail &&
|
---|
118 | sh Build &&
|
---|
119 | cd ../cf/cf &&
|
---|
120 | cp generic-linux.mc sendmail.mc &&
|
---|
121 | sh 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 &&
|
---|
128 | sh Build install-cf &&
|
---|
129 |
|
---|
130 | cd ../.. &&
|
---|
131 | sh Build install &&
|
---|
132 |
|
---|
133 | install -v -m644 cf/cf/{submit,sendmail}.mc /etc/mail &&
|
---|
134 | cp -v -R cf/* /etc/mail &&
|
---|
135 |
|
---|
136 | install -v -m755 -d /usr/share/doc/sendmail-&sendmail-version;/{cf,sendmail} &&
|
---|
137 | install -v -m644 \
|
---|
138 | CACerts FAQ KNOWNBUGS LICENSE PGPKEYS README RELEASE_NOTES \
|
---|
139 | /usr/share/doc/sendmail-&sendmail-version; &&
|
---|
140 | install -v -m644 sendmail/{README,SECURITY,TRACEFLAGS,TUNING} \
|
---|
141 | /usr/share/doc/sendmail-&sendmail-version;/sendmail &&
|
---|
142 | install -v -m644 cf/README /usr/share/doc/sendmail-&sendmail-version;/cf &&
|
---|
143 |
|
---|
144 | for manpage in sendmail editmap mailstats makemap praliases smrsh
|
---|
145 | do
|
---|
146 | install -v -m444 $manpage/$manpage.8 /usr/share/man/man8
|
---|
147 | done &&
|
---|
148 | install -v -m444 sendmail/aliases.5 /usr/share/man/man5 &&
|
---|
149 | install -v -m444 sendmail/mailq.1 /usr/share/man/man1 &&
|
---|
150 | install -v -m444 sendmail/newaliases.1 /usr/share/man/man1 &&
|
---|
151 | install -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 &&
|
---|
157 | sed -i 's/groff/GROFF_NO_SGR=1 groff/' Makefile &&
|
---|
158 | make 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; &&
|
---|
163 | install -v -m644 op.ps op.txt op.pdf /usr/share/doc/sendmail-&sendmail-version; &&
|
---|
164 | cd ../..</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 > devtools/Site/site.config.m4 << "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
|
---|
214 | cat > /etc/mail/aliases << "EOF"
|
---|
215 | <literal>postmaster: root
|
---|
216 | MAILER-DAEMON: root</literal>
|
---|
217 |
|
---|
218 | EOF
|
---|
219 | newaliases -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>
|
---|