1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY sendmail-download-ftp "ftp://ftp.sendmail.org/pub/sendmail/sendmail.&sendmail-version;.tar.gz">
|
---|
8 | <!ENTITY sendmail-download-http "http://www.sendmail.org/ftp/sendmail.&sendmail-version;.tar.gz">
|
---|
9 | <!ENTITY sendmail-size "2.0 MB">
|
---|
10 | <!ENTITY sendmail-buildsize "18.2 MB">
|
---|
11 | <!ENTITY sendmail-time "0.43 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <sect1 id="sendmail" xreflabel="Sendmail-&sendmail-version;">
|
---|
15 | <sect1info>
|
---|
16 | <othername>$LastChangedBy$</othername>
|
---|
17 | <date>$Date$</date>
|
---|
18 | </sect1info>
|
---|
19 | <?dbhtml filename="sendmail.html"?>
|
---|
20 | <title>Sendmail-&sendmail-version;</title>
|
---|
21 |
|
---|
22 | <sect2>
|
---|
23 | <title>Introduction to <application>Sendmail</application></title>
|
---|
24 |
|
---|
25 | <para>The <application>Sendmail</application> package contains a Mail
|
---|
26 | Transport Agent (<acronym>MTA</acronym>).</para>
|
---|
27 |
|
---|
28 | <sect3><title>Package information</title>
|
---|
29 | <itemizedlist spacing='compact'>
|
---|
30 | <listitem><para>Download (HTTP): <ulink url="&sendmail-download-http;"/></para></listitem>
|
---|
31 | <listitem><para>Download (FTP): <ulink url="&sendmail-download-ftp;"/></para></listitem>
|
---|
32 | <listitem><para>Download size: &sendmail-size;</para></listitem>
|
---|
33 | <listitem><para>Estimated Disk space required: &sendmail-buildsize;</para></listitem>
|
---|
34 | <listitem><para>Estimated build time: &sendmail-time;</para></listitem></itemizedlist>
|
---|
35 | </sect3>
|
---|
36 |
|
---|
37 | <sect3><title><application>Sendmail</application> dependencies</title>
|
---|
38 |
|
---|
39 | <sect4><title>Required</title>
|
---|
40 | <para><xref linkend="db"/> and <xref linkend="procmail"/>
|
---|
41 | </para></sect4>
|
---|
42 |
|
---|
43 | <sect4><title>Optional</title>
|
---|
44 | <para><xref linkend="openssl"/>, <xref linkend="openldap"/>,
|
---|
45 | <xref linkend="tcpwrappers"/>, <xref linkend="pcre"/>,
|
---|
46 | <xref linkend="cyrus-sasl"/>,
|
---|
47 | <ulink url="http://www-dev.cites.uiuc.edu/ph/nph/">nph</ulink>, and
|
---|
48 | <xref linkend="gs"/> or <xref linkend="espgs"/> (for creating
|
---|
49 | <acronym>PDF</acronym> documentation)
|
---|
50 | </para></sect4>
|
---|
51 | </sect3>
|
---|
52 |
|
---|
53 | </sect2>
|
---|
54 |
|
---|
55 | <sect2>
|
---|
56 | <title>Installation of <application>Sendmail</application></title>
|
---|
57 |
|
---|
58 | <para>Before building <application>Sendmail</application>, create the users,
|
---|
59 | groups and directories that <application>Sendmail</application> requires
|
---|
60 | with the following commands:</para>
|
---|
61 |
|
---|
62 | <screen><userinput><command>groupadd smmsp &&
|
---|
63 | groupadd mail &&
|
---|
64 | useradd -g smmsp -G mail smmsp &&
|
---|
65 | chmod 1777 /tmp &&
|
---|
66 | chmod 1777 /var/mail &&
|
---|
67 | mkdir /var/spool/mqueue</command></userinput></screen>
|
---|
68 |
|
---|
69 | <para>Install <application>Sendmail</application> with the following
|
---|
70 | commands:</para>
|
---|
71 |
|
---|
72 | <screen><userinput><command>cat > devtools/Site/site.config.m4 << "EOF"
|
---|
73 | define(`confMANGRP',`root')
|
---|
74 | define(`confMANOWN',`root')
|
---|
75 | define(`confSBINGRP',`root')
|
---|
76 | define(`confUBINGRP',`root')
|
---|
77 | define(`confUBINOWN',`root')
|
---|
78 | EOF
|
---|
79 | cd sendmail &&
|
---|
80 | sh Build &&
|
---|
81 | cd ../cf/cf &&
|
---|
82 | cp generic-linux.mc sendmail.mc &&
|
---|
83 | mkdir /etc/mail &&
|
---|
84 | sh Build sendmail.cf &&
|
---|
85 | sh Build install-cf &&
|
---|
86 | cd ../../ &&
|
---|
87 | sh Build install &&
|
---|
88 | for manpage in sendmail editmap mailstats makemap praliases smrsh
|
---|
89 | do
|
---|
90 | install -o root -g root -m444 $manpage/$manpage.8 /usr/share/man/man8
|
---|
91 | done &&
|
---|
92 | install -o root -g root -m444 sendmail/aliases.5 /usr/share/man/man5 &&
|
---|
93 | install -o root -g root -m444 sendmail/mailq.1 /usr/share/man/man1 &&
|
---|
94 | install -o root -g root -m444 sendmail/newaliases.1 /usr/share/man/man1 &&
|
---|
95 | install -o root -g root -m444 vacation/vacation.1 /usr/share/man/man1</command></userinput></screen>
|
---|
96 |
|
---|
97 | <para><emphasis>Note:</emphasis> See the source tree
|
---|
98 | <filename>sendmail/README</filename> file for information on linking optional
|
---|
99 | packages into the build.</para>
|
---|
100 |
|
---|
101 | <para>Install the <application>Sendmail</application> Installation and
|
---|
102 | Operations Guide with the following commands:</para>
|
---|
103 |
|
---|
104 | <screen><userinput><command>cd doc/op &&
|
---|
105 | sed -i -e 's/groff/GROFF_NO_SGR=1 groff/' Makefile &&
|
---|
106 | make op.txt op.pdf &&
|
---|
107 | install -d -m 755 /usr/share/doc/sendmail/&sendmail-version; &&
|
---|
108 | install -m 644 op.ps op.txt op.pdf /usr/share/doc/sendmail/&sendmail-version; &&
|
---|
109 | cd ../../</command></userinput></screen>
|
---|
110 |
|
---|
111 | <para><emphasis>Note:</emphasis> remove <filename>op.pdf</filename> from the
|
---|
112 | <command>make</command> and <command>install</command> commands if you don't
|
---|
113 | have <application>Ghostscript</application> installed.</para>
|
---|
114 |
|
---|
115 | </sect2>
|
---|
116 |
|
---|
117 | <sect2>
|
---|
118 | <title>Command explanations</title>
|
---|
119 |
|
---|
120 | <para><command>cat > devtools/Site/site.config.m4 << "EOF"</command>:
|
---|
121 | This creates a configuration file changing some of the default settings.</para>
|
---|
122 |
|
---|
123 | <screen><userinput><command>sh Build
|
---|
124 | sh Build sendmail.cf
|
---|
125 | sh Build install-cf
|
---|
126 | sh Build install</command></userinput></screen>
|
---|
127 |
|
---|
128 | <para><application>Sendmail</application> uses an <application>m4</application>
|
---|
129 | based build script to create the various <filename>Makefile</filename>'s. These
|
---|
130 | commands build and install the package.</para>
|
---|
131 |
|
---|
132 | <screen><userinput><command>for manpage in...;do...;done:
|
---|
133 | install ...
|
---|
134 | install ...</command></userinput></screen>
|
---|
135 |
|
---|
136 | <para> The man pages are installed already formatted and <command>man</command>
|
---|
137 | displays them somewhat garbled. These commands replace the formatted pages with
|
---|
138 | pages <command>man</command> can display properly.</para>
|
---|
139 |
|
---|
140 | </sect2>
|
---|
141 |
|
---|
142 | <sect2>
|
---|
143 | <title>Configuring <application>Sendmail</application></title>
|
---|
144 |
|
---|
145 | <sect3><title>Config files</title>
|
---|
146 | <para><filename>/etc/mail/*</filename></para>
|
---|
147 | </sect3>
|
---|
148 |
|
---|
149 | <sect3><title>Configuration Commands</title>
|
---|
150 |
|
---|
151 | <screen><userinput><command>echo `hostname` > /etc/mail/local-host-names
|
---|
152 | cat > /etc/mail/aliases << "EOF"
|
---|
153 | postmaster: root
|
---|
154 | MAILER-DAEMON: root
|
---|
155 | EOF
|
---|
156 | cp -R cf/* /etc/mail &&
|
---|
157 | cp cf/cf/{submit,sendmail}.mc /etc/mail &&
|
---|
158 | newaliases -v</command></userinput></screen>
|
---|
159 |
|
---|
160 | <para><application>Sendmail</application>'s primary configuration file,
|
---|
161 | <filename>/etc/mail/sendmail.cf</filename>, is complex and not meant to be
|
---|
162 | directly edited. The recommended method to make changes is to modify
|
---|
163 | <filename>/etc/mail/sendmail.mc</filename>, and various
|
---|
164 | <application>m4</application> files, then run the <command>m4</command>
|
---|
165 | macro processor from within <filename class='directory'>/etc/mail</filename>
|
---|
166 | as follows:</para>
|
---|
167 |
|
---|
168 | <screen><userinput><command>m4 m4/cf.m4 sendmail.mc > sendmail.cf</command></userinput></screen>
|
---|
169 |
|
---|
170 | <para>A full explanation of the files to modify, and the available parameters
|
---|
171 | can be found in <filename>/etc/mail/README</filename>.</para>
|
---|
172 |
|
---|
173 | <para>To automate the running of <application>Sendmail</application> at
|
---|
174 | startup, install the <filename>/etc/rc.d/init.d/sendmail</filename>
|
---|
175 | init script included in the
|
---|
176 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
177 |
|
---|
178 | <screen><userinput><command>make install-sendmail</command></userinput></screen>
|
---|
179 |
|
---|
180 | <note><para>The -qNm option to <command>sendmail</command>, where N is number
|
---|
181 | of minutes, controls how often <application>Sendmail</application> will process
|
---|
182 | the mail queue. A default of 5 minutes is used in the init script. Individual
|
---|
183 | workstation users may want to set this as low as 1 minute, large installations
|
---|
184 | handling more mail may want to set it higher.</para></note>
|
---|
185 |
|
---|
186 | </sect3>
|
---|
187 | </sect2>
|
---|
188 |
|
---|
189 | <sect2>
|
---|
190 | <title>Contents</title>
|
---|
191 |
|
---|
192 | <para>The <application>Sendmail</application> package contains
|
---|
193 | <command>hoststat</command>,
|
---|
194 | <command>purgestat</command>,
|
---|
195 | <command>smrsh</command>,
|
---|
196 | <command>editmap</command>,
|
---|
197 | <command>makemap</command>,
|
---|
198 | <command>mailq</command>,
|
---|
199 | <command>newaliases</command>,
|
---|
200 | <command>sendmail</command>,
|
---|
201 | <command>vacation</command>,
|
---|
202 | <command>praliases</command> and
|
---|
203 | <command>mailstats</command>.
|
---|
204 | </para>
|
---|
205 | </sect2>
|
---|
206 |
|
---|
207 | <sect2><title>Description</title>
|
---|
208 |
|
---|
209 | <sect3><title>hoststat</title>
|
---|
210 | <para><command>hoststat</command> prints <application>Sendmail</application>'s
|
---|
211 | persistent host status.</para></sect3>
|
---|
212 |
|
---|
213 | <sect3><title>purgestat</title>
|
---|
214 | <para><command>purgestat</command> causes <application>Sendmail</application>
|
---|
215 | to clear (purge) all its host-status information.</para></sect3>
|
---|
216 |
|
---|
217 | <sect3><title>smrsh</title>
|
---|
218 | <para><command>smrsh</command> is a restricted shell for
|
---|
219 | <application>Sendmail</application>.</para></sect3>
|
---|
220 |
|
---|
221 | <sect3><title>editmap</title>
|
---|
222 | <para><command>editmap</command> queries and edits
|
---|
223 | <application>Sendmail</application> map files.</para></sect3>
|
---|
224 |
|
---|
225 | <sect3><title>makemap</title>
|
---|
226 | <para><command>makemap</command> creates
|
---|
227 | <application>Sendmail</application> map files.</para></sect3>
|
---|
228 |
|
---|
229 | <sect3><title>mailq</title>
|
---|
230 | <para><command>mailq</command> prints a summary of outbound mail messages
|
---|
231 | waiting for delivery.</para></sect3>
|
---|
232 |
|
---|
233 | <sect3><title>newaliases</title>
|
---|
234 | <para><command>newaliases</command> rebuilds
|
---|
235 | <filename>/etc/mail/aliases.db</filename>.</para></sect3>
|
---|
236 |
|
---|
237 | <sect3><title>sendmail</title>
|
---|
238 | <para><command>sendmail</command> is the <application>Sendmail</application>
|
---|
239 | mail transport agent.</para></sect3>
|
---|
240 |
|
---|
241 | <sect3><title>vacation</title>
|
---|
242 | <para><command>vacation</command> is an email auto responder.</para></sect3>
|
---|
243 |
|
---|
244 | <sect3><title>praliases</title>
|
---|
245 | <para><command>praliases</command> displays current
|
---|
246 | <application>Sendmail</application> aliases.</para></sect3>
|
---|
247 |
|
---|
248 | <sect3><title>mailstats</title>
|
---|
249 | <para><command>mailstats</command> displays
|
---|
250 | <application>Sendmail</application> statistics.</para></sect3>
|
---|
251 |
|
---|
252 | </sect2>
|
---|
253 |
|
---|
254 | </sect1>
|
---|
255 |
|
---|