[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 |
|
---|
[d381c908] | 7 | <!-- editors: upstream postfix is ftp only, some of the mirrors offer
|
---|
| 8 | https - http://www.porcupine.org/mirmon/postfix-source.html lists the
|
---|
| 9 | mirror status, some of the mirrors shown as http are actually https -->
|
---|
| 10 | <!ENTITY postfix-download-http "https://ghostarchive.org/postfix/postfix-release/official/postfix-&postfix-version;.tar.gz">
|
---|
[0e5eac44] | 11 | <!ENTITY postfix-download-ftp "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-&postfix-version;.tar.gz">
|
---|
[af7490e0] | 12 | <!ENTITY postfix-md5sum "2442d1e53d58e61842d99fb5978fec4a">
|
---|
[9fc3125] | 13 | <!ENTITY postfix-size "4.6 MB">
|
---|
[54d58907] | 14 | <!ENTITY postfix-buildsize "148 MB">
|
---|
[99f86349] | 15 | <!ENTITY postfix-time "0.2 SBU (Using parallelism=4)">
|
---|
[0931098] | 16 | ]>
|
---|
| 17 |
|
---|
[547df0bc] | 18 | <sect1 id="postfix" xreflabel="Postfix-&postfix-version;">
|
---|
[417f9e7] | 19 | <?dbhtml filename="postfix.html"?>
|
---|
| 20 |
|
---|
| 21 |
|
---|
| 22 | <title>Postfix-&postfix-version;</title>
|
---|
| 23 |
|
---|
| 24 | <indexterm zone="postfix">
|
---|
| 25 | <primary sortas="a-Postfix">Postfix</primary>
|
---|
| 26 | </indexterm>
|
---|
| 27 |
|
---|
| 28 | <sect2 role="package">
|
---|
| 29 | <title>Introduction to Postfix</title>
|
---|
| 30 |
|
---|
[2605bb1] | 31 | <para>
|
---|
| 32 | The <application>Postfix</application> package contains a Mail Transport
|
---|
| 33 | Agent (MTA). This is useful for sending email to other users of your host
|
---|
| 34 | machine. It can also be configured to be a central mail server for your
|
---|
| 35 | domain, a mail relay agent or simply a mail delivery agent to your local
|
---|
| 36 | Internet Service Provider.
|
---|
| 37 | </para>
|
---|
[417f9e7] | 38 |
|
---|
[7263a049] | 39 | &lfs112_checked;
|
---|
[438c11ab] | 40 |
|
---|
[417f9e7] | 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
[2605bb1] | 44 | <para>
|
---|
| 45 | Download (HTTP): <ulink url="&postfix-download-http;"/>
|
---|
| 46 | </para>
|
---|
[417f9e7] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[2605bb1] | 49 | <para>
|
---|
| 50 | Download (FTP): <ulink url="&postfix-download-ftp;"/>
|
---|
| 51 | </para>
|
---|
[417f9e7] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[2605bb1] | 54 | <para>
|
---|
| 55 | Download MD5 sum: &postfix-md5sum;
|
---|
| 56 | </para>
|
---|
[417f9e7] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[2605bb1] | 59 | <para>
|
---|
| 60 | Download size: &postfix-size;
|
---|
| 61 | </para>
|
---|
[417f9e7] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[2605bb1] | 64 | <para>
|
---|
| 65 | Estimated disk space required: &postfix-buildsize;
|
---|
| 66 | </para>
|
---|
[417f9e7] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[2605bb1] | 69 | <para>
|
---|
| 70 | Estimated build time: &postfix-time;
|
---|
| 71 | </para>
|
---|
[417f9e7] | 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
[348ca51] | 74 | <!--
|
---|
[ddbaa48] | 75 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 76 | <itemizedlist spacing="compact">
|
---|
| 77 | <listitem>
|
---|
| 78 | <para>
|
---|
| 79 | Required patch:
|
---|
| 80 | <ulink url="&patch-root;/postfix-&postfix-version;-glibc230_fix-1.patch"/>
|
---|
| 81 | </para>
|
---|
| 82 | </listitem>
|
---|
| 83 | </itemizedlist>
|
---|
[348ca51] | 84 | -->
|
---|
[417f9e7] | 85 | <bridgehead renderas="sect3">Postfix Dependencies</bridgehead>
|
---|
| 86 |
|
---|
[58f0b91] | 87 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 88 | <para role="recommended">
|
---|
[a6d67b9] | 89 | <xref linkend="db"/>,
|
---|
[94b42903] | 90 | <xref linkend="cyrus-sasl"/>, and
|
---|
| 91 | <xref linkend="libnsl"/>
|
---|
[58f0b91] | 92 | </para>
|
---|
| 93 |
|
---|
[417f9e7] | 94 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[438c11ab] | 95 | <para role="optional">
|
---|
[d9321c0] | 96 | <xref linkend="icu"/> for Email Address Internationalization (SMTPUTF8) support,
|
---|
[90fb8f6] | 97 | <xref linkend="mariadb"/> or <ulink url="https://www.mysql.com/">MySQL</ulink>,
|
---|
[58f0b91] | 98 | <xref linkend="openldap"/>,
|
---|
| 99 | <xref linkend="pcre"/>,
|
---|
| 100 | <xref linkend="postgresql"/>,
|
---|
[10405e6] | 101 | <xref linkend="sqlite"/>, and
|
---|
[90fb8f6] | 102 | <ulink url="https://cr.yp.to/cdb.html">CDB</ulink> or
|
---|
| 103 | <ulink url="https://www.corpit.ru/mjt/tinycdb.html">TinyCDB</ulink>
|
---|
[438c11ab] | 104 | </para>
|
---|
| 105 |
|
---|
[2605bb1] | 106 | <para>
|
---|
[58f0b91] | 107 | Note that <application>SQLite</application>,
|
---|
| 108 | <application>MySQL</application>, <application>PostgreSQL</application>
|
---|
| 109 | and <application>CDB</application> are only useful if there is a known
|
---|
[2605bb1] | 110 | need for them.
|
---|
| 111 | </para>
|
---|
[3cb0c57] | 112 |
|
---|
[2605bb1] | 113 | <para condition="html" role="usernotes">
|
---|
| 114 | User Notes: <ulink url="&blfs-wiki;/postfix"/>
|
---|
| 115 | </para>
|
---|
[417f9e7] | 116 | </sect2>
|
---|
| 117 |
|
---|
| 118 | <sect2 role="installation">
|
---|
| 119 | <title>Installation of Postfix</title>
|
---|
| 120 |
|
---|
[2605bb1] | 121 | <sect3>
|
---|
| 122 | <title>Adding Users and Groups</title>
|
---|
[58f0b91] | 123 |
|
---|
[2605bb1] | 124 | <para>
|
---|
| 125 | Before you compile the program, you need to create users and groups that
|
---|
| 126 | will be expected to be in place during the installation. Add the users
|
---|
| 127 | and groups with the following commands issued by the
|
---|
| 128 | <systemitem class="username">root</systemitem> user:
|
---|
| 129 | </para>
|
---|
| 130 |
|
---|
| 131 | <screen role="root"><userinput>groupadd -g 32 postfix &&
|
---|
| 132 | groupadd -g 33 postdrop &&
|
---|
[58f0b91] | 133 | useradd -c "Postfix Daemon User" -d /var/spool/postfix -g postfix \
|
---|
| 134 | -s /bin/false -u 32 postfix &&
|
---|
[2605bb1] | 135 | chown -v postfix:postfix /var/mail</userinput></screen>
|
---|
| 136 | </sect3>
|
---|
| 137 |
|
---|
[417f9e7] | 138 | <sect3>
|
---|
| 139 | <title>Configuring the Build</title>
|
---|
| 140 |
|
---|
[2605bb1] | 141 | <para>
|
---|
| 142 | The README files are formatted to be read with a pager like
|
---|
| 143 | <application>Less</application> or <application>More</application>.
|
---|
[b400d26] | 144 | If you want to use a text editor, make them legible with the
|
---|
| 145 | following sed:
|
---|
[2605bb1] | 146 | </para>
|
---|
| 147 |
|
---|
| 148 | <screen><userinput>sed -i 's/.\x08//g' README_FILES/*</userinput></screen>
|
---|
[9fc3125] | 149 | <!--
|
---|
[ddbaa48] | 150 | <para>
|
---|
[179d426d] | 151 | Make an adjustment to allow <application>Postfix</application> to compile
|
---|
| 152 | on <application>Glibc-2.34</application> and later:
|
---|
[ddbaa48] | 153 | </para>
|
---|
| 154 |
|
---|
[179d426d] | 155 | <screen><userinput>sed -i '/<linux/i #define HAS_CLOSEFROM' src/util/sys_defs.h</userinput></screen>
|
---|
[9fc3125] | 156 | -->
|
---|
[4c59e83] | 157 | <para>
|
---|
| 158 | The <filename>Makefile</filename> looks at the running kernel to
|
---|
| 159 | decide how to set various things. It does not recognize Linux-6 and
|
---|
| 160 | fails to make the definitions. After that is fixed, the build
|
---|
| 161 | references the newly defined version in a header, which also breaks
|
---|
| 162 | the build. Fix both of these with the following commands:
|
---|
| 163 | </para>
|
---|
| 164 |
|
---|
| 165 | <!-- '&&' on a sed only fails if the file is not present,
|
---|
| 166 | not if it changes nothing, but we seem to like it -->
|
---|
| 167 | <screen><userinput>sed -i 's/Linux..345/&6/' makedefs &&
|
---|
| 168 | sed -i 's/LINUX2/LINUX6/' src/util/sys_defs.h</userinput></screen>
|
---|
| 169 |
|
---|
| 170 |
|
---|
[2605bb1] | 171 | <para>
|
---|
| 172 | The <application>Postfix</application> source tree does not contain a
|
---|
| 173 | <filename>configure</filename> script, rather the makefile in the
|
---|
| 174 | top-level directory contains a <option>makefiles</option> target that
|
---|
| 175 | regenerates all the other makefiles in the build tree. If you wish to
|
---|
| 176 | use additional software such as a database back-end for virtual users,
|
---|
| 177 | or TLS/SSL authentication, you will need to regenerate the makefiles
|
---|
| 178 | using one or more of the appropriate <envar>CCARGS</envar> and
|
---|
| 179 | <envar>AUXLIBS</envar> settings listed below.
|
---|
| 180 | </para>
|
---|
| 181 |
|
---|
[d381c908] | 182 | <note>
|
---|
| 183 | <para>
|
---|
| 184 | For all variants of the CCARGS you should ensure that -DNO_NIS is
|
---|
| 185 | specified so that the build does not attempt to access an rpcsvc header
|
---|
| 186 | which does not exist in BLFS.
|
---|
| 187 | </para>
|
---|
| 188 | </note>
|
---|
| 189 |
|
---|
[2605bb1] | 190 | <para>
|
---|
| 191 | For more details read the readme files.
|
---|
| 192 | </para>
|
---|
[4b9c064] | 193 | <!-- We reverted to Berkeley DB-5.3.28 and that is handled
|
---|
[ffdbde9c] | 194 | <para>
|
---|
[4e207bb] | 195 | The current version of <xref linkend="db"/> is not recognised by a
|
---|
[ffdbde9c] | 196 | hard-coded test for known versions. To build with this version use the
|
---|
| 197 | following sed:
|
---|
| 198 | </para>
|
---|
| 199 |
|
---|
| 200 | <screen><userinput>sed -i 's/DB_VERSION_MAJOR == 6 .*||/DB_VERSION_MAJOR > 4 ||/' \
|
---|
| 201 | src/util/dict_db.c</userinput></screen>
|
---|
[4b9c064] | 202 | -->
|
---|
[417f9e7] | 203 | <sect4>
|
---|
| 204 | <title>Cyrus-SASL</title>
|
---|
[3bfd1d6] | 205 |
|
---|
[2605bb1] | 206 | <para>
|
---|
| 207 | To use <application>Cyrus-SASL</application> with
|
---|
| 208 | <application>Postfix</application>, use the following arguments:
|
---|
| 209 | </para>
|
---|
[3bfd1d6] | 210 |
|
---|
[d381c908] | 211 | <screen><literal>CCARGS='-DNO_NIS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
|
---|
[438c11ab] | 212 | AUXLIBS='-lsasl2'</literal></screen>
|
---|
[58f0b91] | 213 |
|
---|
[417f9e7] | 214 | </sect4>
|
---|
[3bfd1d6] | 215 |
|
---|
[417f9e7] | 216 | <sect4>
|
---|
| 217 | <title>OpenLDAP</title>
|
---|
[3bfd1d6] | 218 |
|
---|
[2605bb1] | 219 | <para>
|
---|
| 220 | To use <application>OpenLDAP</application> with
|
---|
| 221 | <application>Postfix</application>, use the following arguments:
|
---|
| 222 | </para>
|
---|
[3bfd1d6] | 223 |
|
---|
[d381c908] | 224 | <screen><literal>CCARGS='-DNO_NIS -DHAS_LDAP'
|
---|
[438c11ab] | 225 | AUXLIBS='-lldap -llber'</literal></screen>
|
---|
[58f0b91] | 226 |
|
---|
[2605bb1] | 227 | </sect4>
|
---|
| 228 |
|
---|
| 229 | <sect4>
|
---|
| 230 | <title>Sqlite</title>
|
---|
| 231 |
|
---|
| 232 | <para>
|
---|
| 233 | To use <application>Sqlite</application> with
|
---|
| 234 | <application>Postfix</application>, use the following arguments:
|
---|
| 235 | </para>
|
---|
[3bfd1d6] | 236 |
|
---|
[d381c908] | 237 | <screen><literal>CCARGS='-DNO_NIS -DHAS_SQLITE'
|
---|
[2605bb1] | 238 | AUXLIBS='-lsqlite3 -lpthread'</literal></screen>
|
---|
[58f0b91] | 239 |
|
---|
[417f9e7] | 240 | </sect4>
|
---|
[3bfd1d6] | 241 |
|
---|
[417f9e7] | 242 | <sect4>
|
---|
| 243 | <title>MySQL</title>
|
---|
[0931098] | 244 |
|
---|
[2605bb1] | 245 | <para>
|
---|
| 246 | To use <application>MySQL</application> with
|
---|
| 247 | <application>Postfix</application>, use the following arguments:
|
---|
| 248 | </para>
|
---|
[417f9e7] | 249 |
|
---|
[d381c908] | 250 | <screen><literal>CCARGS='-DNO_NIS -DHAS_MYSQL -I/usr/include/mysql'
|
---|
[438c11ab] | 251 | AUXLIBS='-lmysqlclient -lz -lm'</literal></screen>
|
---|
[58f0b91] | 252 |
|
---|
[417f9e7] | 253 | </sect4>
|
---|
| 254 |
|
---|
| 255 | <sect4>
|
---|
| 256 | <title>PostgreSQL</title>
|
---|
| 257 |
|
---|
[2605bb1] | 258 | <para>
|
---|
| 259 | To use <application>PostgreSQL</application> with
|
---|
| 260 | <application>Postfix</application>, use the following arguments:
|
---|
| 261 | </para>
|
---|
[417f9e7] | 262 |
|
---|
[d381c908] | 263 | <screen><literal>CCARGS='-DNO_NIS -DHAS_PGSQL -I/usr/include/postgresql'
|
---|
[438c11ab] | 264 | AUXLIBS='-lpq -lz -lm'</literal></screen>
|
---|
[58f0b91] | 265 |
|
---|
[417f9e7] | 266 | </sect4>
|
---|
| 267 |
|
---|
[daeea03] | 268 | <sect4>
|
---|
[45cd2f9] | 269 | <title>CDB/TinyCDB</title>
|
---|
[daeea03] | 270 |
|
---|
[2605bb1] | 271 | <para>
|
---|
| 272 | To use <application>CDB</application> or
|
---|
| 273 | <application>TinyCDB</application> with
|
---|
| 274 | <application>Postfix</application>, use the following arguments:
|
---|
| 275 | </para>
|
---|
[daeea03] | 276 |
|
---|
[d381c908] | 277 | <screen><literal>CCARGS='-DNO_NIS -DHAS_CDB'
|
---|
[410e228b] | 278 | AUXLIBS='<replaceable></path/to/CDB></replaceable>/libcdb.a'</literal></screen>
|
---|
[58f0b91] | 279 |
|
---|
[45cd2f9] | 280 | </sect4>
|
---|
| 281 |
|
---|
| 282 | <sect4>
|
---|
| 283 | <title>StartTLS Authentication</title>
|
---|
| 284 |
|
---|
[2605bb1] | 285 | <para>
|
---|
| 286 | To use <application>OpenSSL</application> with
|
---|
| 287 | <application>Postfix</application>, use the following arguments:
|
---|
| 288 | </para>
|
---|
[45cd2f9] | 289 |
|
---|
[d381c908] | 290 | <screen><literal>CCARGS='-DNO_NIS -DUSE_TLS -I/usr/include/openssl/'
|
---|
[438c11ab] | 291 | AUXLIBS='-lssl -lcrypto'</literal></screen>
|
---|
[daeea03] | 292 | </sect4>
|
---|
[58f0b91] | 293 |
|
---|
[417f9e7] | 294 | </sect3>
|
---|
| 295 |
|
---|
| 296 | <sect3>
|
---|
| 297 | <title>Installing Postfix</title>
|
---|
| 298 |
|
---|
[2605bb1] | 299 | <para>
|
---|
[9fc3125] | 300 | Adjust the following according to your needs. For example,
|
---|
[7a9a7b26] | 301 | if you have <application>Cyrus SASL</application>,
|
---|
| 302 | install <application>Postfix</application> by running the following
|
---|
[9fc3125] | 303 | commands:
|
---|
[2605bb1] | 304 | </para>
|
---|
[438c11ab] | 305 |
|
---|
[d381c908] | 306 | <screen><userinput>make CCARGS="-DNO_NIS -DUSE_TLS -I/usr/include/openssl/ \
|
---|
[58f0b91] | 307 | -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
|
---|
| 308 | AUXLIBS="-lssl -lcrypto -lsasl2" \
|
---|
[bab9d8e7] | 309 | makefiles &&
|
---|
[2605bb1] | 310 | make</userinput></screen>
|
---|
[0dfb754] | 311 |
|
---|
[48771ae] | 312 | <!-- There is a test suite, but it fails a lot. It seems to need
|
---|
[cef276c] | 313 | the host to be specifically setup for the tests.
|
---|
| 314 | Run with `make tests' and `make root_tests' -->
|
---|
[2605bb1] | 315 | <para>
|
---|
| 316 | This package does not come with a useful test suite.
|
---|
| 317 | </para>
|
---|
[0dfb754] | 318 |
|
---|
[2605bb1] | 319 | <para>
|
---|
| 320 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 321 | </para>
|
---|
[417f9e7] | 322 |
|
---|
[c9652d2] | 323 | <!-- dev note: sh postfix-install -non-interactive install_root=<DESTDIR> ... -->
|
---|
[2e8afa9] | 324 |
|
---|
[2605bb1] | 325 | <screen role="root"><userinput>sh postfix-install -non-interactive \
|
---|
[58f0b91] | 326 | daemon_directory=/usr/lib/postfix \
|
---|
| 327 | manpage_directory=/usr/share/man \
|
---|
| 328 | html_directory=/usr/share/doc/postfix-&postfix-version;/html \
|
---|
| 329 | readme_directory=/usr/share/doc/postfix-&postfix-version;/readme</userinput></screen>
|
---|
| 330 |
|
---|
[417f9e7] | 331 | </sect3>
|
---|
[58f0b91] | 332 |
|
---|
[417f9e7] | 333 | </sect2>
|
---|
[0931098] | 334 |
|
---|
[417f9e7] | 335 | <sect2 role="commands">
|
---|
| 336 | <title>Command Explanations</title>
|
---|
[0931098] | 337 |
|
---|
[2605bb1] | 338 | <para>
|
---|
| 339 | <command>make makefiles</command>: This command rebuilds the makefiles
|
---|
| 340 | throughout the source tree to use the options contained in the
|
---|
| 341 | <envar>CCARGS</envar> and <envar>AUXLIBS</envar> variables.
|
---|
| 342 | </para>
|
---|
[8568fa6] | 343 |
|
---|
[2605bb1] | 344 | <para>
|
---|
| 345 | <command>sh postfix-install -non-interactive</command>: This keeps the
|
---|
| 346 | install script from asking any questions, thereby accepting default
|
---|
| 347 | destination directories in all but the few cases. If the
|
---|
| 348 | <option>html_directory</option> and <option>readme_directory</option>
|
---|
| 349 | options are not set then the documentation will not be installed.
|
---|
| 350 | </para>
|
---|
[58f0b91] | 351 |
|
---|
[d9321c0] | 352 | <para>
|
---|
| 353 | <option>CCARGS="-DNO_EAI ..."</option>: this will turn off SMTPUTF8
|
---|
| 354 | support, for example if the rest of your email address infrastructure
|
---|
| 355 | cannot handle UTF-8 email addresses and message header values.
|
---|
| 356 | </para>
|
---|
| 357 |
|
---|
[417f9e7] | 358 | </sect2>
|
---|
[0931098] | 359 |
|
---|
[417f9e7] | 360 | <sect2 role="configuration">
|
---|
| 361 | <title>Configuring Postfix</title>
|
---|
[0931098] | 362 |
|
---|
[417f9e7] | 363 | <sect3 id="postfix-config">
|
---|
| 364 | <title>Config Files</title>
|
---|
[0931098] | 365 |
|
---|
[2605bb1] | 366 | <para>
|
---|
| 367 | <filename>/etc/aliases</filename>,
|
---|
| 368 | <filename>/etc/postfix/main.cf</filename>, and
|
---|
| 369 | <filename>/etc/postfix/master.cf</filename>
|
---|
| 370 | </para>
|
---|
[6c703f15] | 371 |
|
---|
[417f9e7] | 372 | <indexterm zone="postfix postfix-config">
|
---|
| 373 | <primary sortas="e-etc-aliases">/etc/aliases</primary>
|
---|
| 374 | </indexterm>
|
---|
[0931098] | 375 |
|
---|
[417f9e7] | 376 | <indexterm zone="postfix postfix-config">
|
---|
| 377 | <primary sortas="e-etc-postfix-star">/etc/postfix/*</primary>
|
---|
| 378 | </indexterm>
|
---|
| 379 |
|
---|
| 380 | </sect3>
|
---|
| 381 |
|
---|
| 382 | <sect3>
|
---|
| 383 | <title>Configuration Information</title>
|
---|
| 384 |
|
---|
[2605bb1] | 385 | <para>
|
---|
| 386 | Create (or append to an existing) <filename>/etc/aliases</filename>
|
---|
| 387 | with the following command. Change
|
---|
[85506b2] | 388 | <replaceable><LOGIN></replaceable> to your non-root login
|
---|
[2605bb1] | 389 | identity so mail addressed to
|
---|
| 390 | <systemitem class="username">root</systemitem> can be forwarded to you.
|
---|
| 391 | As the <systemitem class="username">root</systemitem> user:
|
---|
| 392 | </para>
|
---|
| 393 |
|
---|
[417f9e7] | 394 | <screen role="root"><userinput>cat >> /etc/aliases << "EOF"
|
---|
| 395 | <literal># Begin /etc/aliases
|
---|
[0931098] | 396 |
|
---|
| 397 | MAILER-DAEMON: postmaster
|
---|
| 398 | postmaster: root
|
---|
| 399 |
|
---|
[2605bb1] | 400 | root: <replaceable><LOGIN></replaceable>
|
---|
[417f9e7] | 401 | # End /etc/aliases</literal>
|
---|
| 402 | EOF</userinput></screen>
|
---|
| 403 |
|
---|
[2605bb1] | 404 | <para>
|
---|
| 405 | To protect an existing <filename>/etc/aliases</filename> file,
|
---|
[417f9e7] | 406 | the above command appends these aliases to it if it exists. This file
|
---|
[2605bb1] | 407 | should be checked and duplicate aliases removed, if present.
|
---|
| 408 | </para>
|
---|
| 409 |
|
---|
| 410 | <note>
|
---|
| 411 | <para>
|
---|
| 412 | The <filename>/etc/postfix/main.cf</filename> and
|
---|
| 413 | <filename>/etc/postfix/master.cf</filename> files must be personalized
|
---|
| 414 | for your system. The <filename>main.cf</filename> file needs your
|
---|
| 415 | fully qualified hostname. You will find that
|
---|
| 416 | <filename>main.cf</filename> is self documenting, so load it into your
|
---|
| 417 | editor to make the changes you need for your situation.
|
---|
| 418 | </para>
|
---|
[417f9e7] | 419 | </note>
|
---|
| 420 |
|
---|
[58f0b91] | 421 | <note>
|
---|
| 422 | <para>
|
---|
| 423 | <application>Postfix</application> can also be set up to
|
---|
[0d7900a] | 424 | run in a chroot jail. See the file in the source
|
---|
[58f0b91] | 425 | <filename>examples/chroot-setup/LINUX2</filename> for details.
|
---|
| 426 | </para>
|
---|
| 427 | </note>
|
---|
[3df190fb] | 428 |
|
---|
[2605bb1] | 429 | <para>
|
---|
| 430 | If you have an existing configuration, you can run the
|
---|
| 431 | <command>postfix</command> utility to add any necessary definitions to
|
---|
| 432 | your existing files. As the
|
---|
| 433 | <systemitem class="username">root</systemitem> user:
|
---|
| 434 | </para>
|
---|
[cef276c] | 435 |
|
---|
[3fd97c4c] | 436 | <screen role="nodump"><userinput>/usr/sbin/postfix upgrade-configuration</userinput></screen>
|
---|
[cef276c] | 437 |
|
---|
[2605bb1] | 438 | <para>
|
---|
| 439 | Before starting <application>Postfix</application>, you should check
|
---|
| 440 | that your configuration and file permissions will work properly. Run the
|
---|
| 441 | following commands as the <systemitem class="username">root</systemitem>
|
---|
| 442 | user to check and start your <application>Postfix</application> server:
|
---|
| 443 | </para>
|
---|
[cef276c] | 444 |
|
---|
[3fd97c4c] | 445 | <screen role="nodump"><userinput>/usr/sbin/postfix check &&
|
---|
[417f9e7] | 446 | /usr/sbin/postfix start</userinput></screen>
|
---|
[58f0b91] | 447 |
|
---|
[417f9e7] | 448 | </sect3>
|
---|
| 449 |
|
---|
| 450 | <sect3 id="postfix-init">
|
---|
[1258125] | 451 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 452 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
[417f9e7] | 453 |
|
---|
[2605bb1] | 454 | <para>
|
---|
| 455 | To automate the running of Postfix at startup, install the
|
---|
[1258125] | 456 | <phrase revision="sysv"><filename>/etc/rc.d/init.d/postfix</filename>
|
---|
| 457 | init script</phrase>
|
---|
| 458 | <phrase revision="systemd"><filename>postfix.service</filename>
|
---|
| 459 | unit</phrase> included in the
|
---|
| 460 | <xref linkend="bootscripts" revision="sysv"/>
|
---|
[4472e923] | 461 | <xref linkend="systemd-units" revision="systemd"/> package:
|
---|
[2605bb1] | 462 | </para>
|
---|
[417f9e7] | 463 |
|
---|
| 464 | <indexterm zone="postfix postfix-init">
|
---|
| 465 | <primary sortas="f-postfix">postfix</primary>
|
---|
| 466 | </indexterm>
|
---|
| 467 |
|
---|
| 468 | <screen role="root"><userinput>make install-postfix</userinput></screen>
|
---|
[58f0b91] | 469 |
|
---|
[417f9e7] | 470 | </sect3>
|
---|
[58f0b91] | 471 |
|
---|
[417f9e7] | 472 | </sect2>
|
---|
| 473 |
|
---|
| 474 | <sect2 role="content">
|
---|
| 475 | <title>Contents</title>
|
---|
| 476 |
|
---|
| 477 | <segmentedlist>
|
---|
| 478 | <segtitle>Installed Programs</segtitle>
|
---|
[58f0b91] | 479 | <segtitle>Installed Libraries</segtitle>
|
---|
[417f9e7] | 480 | <segtitle>Installed Directories</segtitle>
|
---|
| 481 |
|
---|
| 482 | <seglistitem>
|
---|
[2605bb1] | 483 | <seg>
|
---|
[f13b771] | 484 | mailq (symlink), newaliases (symlink), postalias, postcat, postconf,
|
---|
| 485 | postdrop, postfix, postkick, postlock, postlog, postmap, postmulti,
|
---|
| 486 | postqueue, postsuper, and sendmail
|
---|
[58f0b91] | 487 | </seg>
|
---|
| 488 | <seg>
|
---|
| 489 | None
|
---|
[2605bb1] | 490 | </seg>
|
---|
| 491 | <seg>
|
---|
[0a76c13] | 492 | /{etc,usr/lib}/postfix,
|
---|
| 493 | /usr/share/doc/postfix-&postfix-version; and
|
---|
| 494 | /var/{lib,spool}/postfix
|
---|
[2605bb1] | 495 | </seg>
|
---|
[417f9e7] | 496 | </seglistitem>
|
---|
| 497 | </segmentedlist>
|
---|
| 498 |
|
---|
| 499 | <variablelist>
|
---|
| 500 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 501 | <?dbfo list-presentation="list"?>
|
---|
| 502 | <?dbhtml list-presentation="table"?>
|
---|
| 503 |
|
---|
| 504 | <varlistentry id="mailq">
|
---|
| 505 | <term><command>mailq</command></term>
|
---|
| 506 | <listitem>
|
---|
[2605bb1] | 507 | <para>
|
---|
[4c24eb0a] | 508 | A symlink to <filename>sendmail</filename>
|
---|
[2605bb1] | 509 | </para>
|
---|
[417f9e7] | 510 | <indexterm zone="postfix mailq">
|
---|
| 511 | <primary sortas="b-mailq">mailq</primary>
|
---|
| 512 | </indexterm>
|
---|
| 513 | </listitem>
|
---|
| 514 | </varlistentry>
|
---|
| 515 |
|
---|
| 516 | <varlistentry id="newaliases">
|
---|
| 517 | <term><command>newaliases</command></term>
|
---|
| 518 | <listitem>
|
---|
[2605bb1] | 519 | <para>
|
---|
[4c24eb0a] | 520 | A symlink to <filename>sendmail</filename>
|
---|
[2605bb1] | 521 | </para>
|
---|
[417f9e7] | 522 | <indexterm zone="postfix newaliases">
|
---|
| 523 | <primary sortas="b-newaliases">newaliases</primary>
|
---|
| 524 | </indexterm>
|
---|
| 525 | </listitem>
|
---|
| 526 | </varlistentry>
|
---|
| 527 |
|
---|
[2e8afa9] | 528 | <varlistentry id="postalias">
|
---|
| 529 | <term><command>postalias</command></term>
|
---|
[417f9e7] | 530 | <listitem>
|
---|
[2605bb1] | 531 | <para>
|
---|
| 532 | is a utility for <application>Postfix</application> alias database
|
---|
| 533 | maintenance
|
---|
| 534 | </para>
|
---|
[2e8afa9] | 535 | <indexterm zone="postfix postalias">
|
---|
| 536 | <primary sortas="b-postalias">postalias</primary>
|
---|
[417f9e7] | 537 | </indexterm>
|
---|
| 538 | </listitem>
|
---|
| 539 | </varlistentry>
|
---|
| 540 |
|
---|
| 541 | <varlistentry id="postcat">
|
---|
| 542 | <term><command>postcat</command></term>
|
---|
| 543 | <listitem>
|
---|
[2605bb1] | 544 | <para>
|
---|
| 545 | Prints the contents of files from the
|
---|
[4c24eb0a] | 546 | <application>Postfix</application> queue in human readable format
|
---|
[2605bb1] | 547 | </para>
|
---|
[417f9e7] | 548 | <indexterm zone="postfix postcat">
|
---|
| 549 | <primary sortas="b-postcat">postcat</primary>
|
---|
| 550 | </indexterm>
|
---|
| 551 | </listitem>
|
---|
| 552 | </varlistentry>
|
---|
| 553 |
|
---|
| 554 | <varlistentry id="postconf">
|
---|
| 555 | <term><command>postconf</command></term>
|
---|
| 556 | <listitem>
|
---|
[2605bb1] | 557 | <para>
|
---|
| 558 | Displays or changes the value of
|
---|
[4c24eb0a] | 559 | <application>Postfix</application> configuration parameters
|
---|
[2605bb1] | 560 | </para>
|
---|
[417f9e7] | 561 | <indexterm zone="postfix postconf">
|
---|
| 562 | <primary sortas="b-postconf">postconf</primary>
|
---|
| 563 | </indexterm>
|
---|
| 564 | </listitem>
|
---|
| 565 | </varlistentry>
|
---|
| 566 |
|
---|
| 567 | <varlistentry id="postdrop">
|
---|
| 568 | <term><command>postdrop</command></term>
|
---|
| 569 | <listitem>
|
---|
[2605bb1] | 570 | <para>
|
---|
| 571 | Creates a file in the maildrop directory and copies its standard
|
---|
[4c24eb0a] | 572 | input to the file
|
---|
[2605bb1] | 573 | </para>
|
---|
[417f9e7] | 574 | <indexterm zone="postfix postdrop">
|
---|
| 575 | <primary sortas="b-postdrop">postdrop</primary>
|
---|
| 576 | </indexterm>
|
---|
| 577 | </listitem>
|
---|
| 578 | </varlistentry>
|
---|
| 579 |
|
---|
| 580 | <varlistentry id="postfix-bin">
|
---|
| 581 | <term><command>postfix</command></term>
|
---|
| 582 | <listitem>
|
---|
[2605bb1] | 583 | <para>
|
---|
[4c24eb0a] | 584 | is the <application>Postfix</application> control program
|
---|
[2605bb1] | 585 | </para>
|
---|
[417f9e7] | 586 | <indexterm zone="postfix postfix-bin">
|
---|
| 587 | <primary sortas="b-postfix">postfix</primary>
|
---|
| 588 | </indexterm>
|
---|
| 589 | </listitem>
|
---|
| 590 | </varlistentry>
|
---|
| 591 |
|
---|
| 592 | <varlistentry id="postkick">
|
---|
| 593 | <term><command>postkick</command></term>
|
---|
| 594 | <listitem>
|
---|
[2605bb1] | 595 | <para>
|
---|
| 596 | Sends requests to the specified service over a local transport
|
---|
[4c24eb0a] | 597 | channel
|
---|
[2605bb1] | 598 | </para>
|
---|
[417f9e7] | 599 | <indexterm zone="postfix postkick">
|
---|
| 600 | <primary sortas="b-postkick">postkick</primary>
|
---|
| 601 | </indexterm>
|
---|
| 602 | </listitem>
|
---|
| 603 | </varlistentry>
|
---|
| 604 |
|
---|
| 605 | <varlistentry id="postlock">
|
---|
| 606 | <term><command>postlock</command></term>
|
---|
| 607 | <listitem>
|
---|
[2605bb1] | 608 | <para>
|
---|
| 609 | Locks a mail folder for exclusive use, and executes commands passed
|
---|
[4c24eb0a] | 610 | to it
|
---|
[2605bb1] | 611 | </para>
|
---|
[417f9e7] | 612 | <indexterm zone="postfix postlock">
|
---|
| 613 | <primary sortas="b-postlock">postlock</primary>
|
---|
| 614 | </indexterm>
|
---|
| 615 | </listitem>
|
---|
| 616 | </varlistentry>
|
---|
| 617 |
|
---|
| 618 | <varlistentry id="postlog">
|
---|
| 619 | <term><command>postlog</command></term>
|
---|
| 620 | <listitem>
|
---|
[2605bb1] | 621 | <para>
|
---|
| 622 | A <application>Postfix</application>-compatible logging interface
|
---|
[4c24eb0a] | 623 | for use in, for example, shell scripts
|
---|
[2605bb1] | 624 | </para>
|
---|
[417f9e7] | 625 | <indexterm zone="postfix postlog">
|
---|
| 626 | <primary sortas="b-postlog">postlog</primary>
|
---|
| 627 | </indexterm>
|
---|
| 628 | </listitem>
|
---|
| 629 | </varlistentry>
|
---|
| 630 |
|
---|
| 631 | <varlistentry id="postmap">
|
---|
| 632 | <term><command>postmap</command></term>
|
---|
| 633 | <listitem>
|
---|
[2605bb1] | 634 | <para>
|
---|
| 635 | Creates or queries one or more Postfix lookup tables, or updates an
|
---|
[4c24eb0a] | 636 | existing one
|
---|
[2605bb1] | 637 | </para>
|
---|
[417f9e7] | 638 | <indexterm zone="postfix postmap">
|
---|
| 639 | <primary sortas="b-postmap">postmap</primary>
|
---|
| 640 | </indexterm>
|
---|
| 641 | </listitem>
|
---|
| 642 | </varlistentry>
|
---|
| 643 |
|
---|
[2605bb1] | 644 | <varlistentry id="postmulti">
|
---|
| 645 | <term><command>postmulti</command></term>
|
---|
| 646 | <listitem>
|
---|
| 647 | <para>
|
---|
| 648 | is the <application>Postfix</application> multi-instance manager.
|
---|
| 649 | It allows a system administrator to manage multiple
|
---|
[4c24eb0a] | 650 | <application>Postfix</application> instances on a single host
|
---|
[2605bb1] | 651 | </para>
|
---|
| 652 | <indexterm zone="postfix postmulti">
|
---|
| 653 | <primary sortas="b-postmulti">postmulti</primary>
|
---|
| 654 | </indexterm>
|
---|
| 655 | </listitem>
|
---|
| 656 | </varlistentry>
|
---|
| 657 |
|
---|
[417f9e7] | 658 | <varlistentry id="postqueue">
|
---|
| 659 | <term><command>postqueue</command></term>
|
---|
| 660 | <listitem>
|
---|
[2605bb1] | 661 | <para>
|
---|
[58f0b91] | 662 | The <application>Postfix</application> user interface for
|
---|
[4c24eb0a] | 663 | queue management
|
---|
[58f0b91] | 664 | </para>
|
---|
[417f9e7] | 665 | <indexterm zone="postfix postqueue">
|
---|
| 666 | <primary sortas="b-postqueue">postqueue</primary>
|
---|
| 667 | </indexterm>
|
---|
| 668 | </listitem>
|
---|
| 669 | </varlistentry>
|
---|
| 670 |
|
---|
| 671 | <varlistentry id="postsuper">
|
---|
| 672 | <term><command>postsuper</command></term>
|
---|
| 673 | <listitem>
|
---|
[2605bb1] | 674 | <para>
|
---|
[58f0b91] | 675 | The <application>Postfix</application> user interface for
|
---|
[4c24eb0a] | 676 | superuser queue management
|
---|
[58f0b91] | 677 | </para>
|
---|
[417f9e7] | 678 | <indexterm zone="postfix postsuper">
|
---|
| 679 | <primary sortas="b-postsuper">postsuper</primary>
|
---|
| 680 | </indexterm>
|
---|
| 681 | </listitem>
|
---|
| 682 | </varlistentry>
|
---|
| 683 |
|
---|
| 684 | <varlistentry id="sendmail-postfix">
|
---|
| 685 | <term><command>sendmail</command></term>
|
---|
| 686 | <listitem>
|
---|
[2605bb1] | 687 | <para>
|
---|
| 688 | is the <application>Postfix</application> to
|
---|
[4c24eb0a] | 689 | <application>Sendmail</application> compatibility interface
|
---|
[2605bb1] | 690 | </para>
|
---|
[417f9e7] | 691 | <indexterm zone="postfix sendmail-postfix">
|
---|
| 692 | <primary sortas="b-sendmail">sendmail</primary>
|
---|
| 693 | </indexterm>
|
---|
| 694 | </listitem>
|
---|
| 695 | </varlistentry>
|
---|
[58f0b91] | 696 |
|
---|
[417f9e7] | 697 | </variablelist>
|
---|
[58f0b91] | 698 |
|
---|
[417f9e7] | 699 | </sect2>
|
---|
[58f0b91] | 700 |
|
---|
[f45b1953] | 701 | </sect1>
|
---|