[0931098] | 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 postfix-download-http "http://ftp.uni-koeln.de/mail/postfix-&postfix-version;.tar.gz">
|
---|
| 8 | <!ENTITY postfix-download-ftp "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-&postfix-version;.tar.gz">
|
---|
| 9 | <!ENTITY postfix-size "1.9 MB">
|
---|
| 10 | <!ENTITY postfix-buildsize "82 MB">
|
---|
| 11 | <!ENTITY postfix-time "0.29 SBU">
|
---|
| 12 |
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
[547df0bc] | 15 | <sect1 id="postfix" xreflabel="Postfix-&postfix-version;">
|
---|
[00bb024c] | 16 | <?dbhtml filename="postfix.html"?>
|
---|
[547df0bc] | 17 | <title>Postfix-&postfix-version;</title>
|
---|
[f45b1953] | 18 |
|
---|
[0931098] | 19 | <sect2>
|
---|
| 20 | <title>Introduction to Postfix</title>
|
---|
| 21 |
|
---|
| 22 | <para>The <application>Postfix</application> package contains a Mail
|
---|
| 23 | Transport Agent (<acronym>MTA</acronym>). This is useful for sending email
|
---|
| 24 | to other users of your host machine. It can also be configured to be a
|
---|
| 25 | central mail server for your domain, a mail relay agent or simply a mail
|
---|
| 26 | delivery agent to your local Internet Service Provider
|
---|
| 27 | (<acronym>ISP</acronym>).</para>
|
---|
| 28 |
|
---|
| 29 | <sect3><title>Package information</title>
|
---|
| 30 | <itemizedlist spacing='compact'>
|
---|
| 31 | <listitem><para>Download (HTTP): <ulink
|
---|
| 32 | url="&postfix-download-http;"/></para></listitem>
|
---|
| 33 | <listitem><para>Download (FTP): <ulink
|
---|
| 34 | url="&postfix-download-ftp;"/></para></listitem>
|
---|
| 35 | <listitem><para>Download size: &postfix-size;</para></listitem>
|
---|
| 36 | <listitem><para>Estimated Disk space required:
|
---|
| 37 | &postfix-buildsize;</para></listitem>
|
---|
| 38 | <listitem><para>Estimated build time:
|
---|
| 39 | &postfix-time;</para></listitem></itemizedlist>
|
---|
| 40 | </sect3>
|
---|
| 41 |
|
---|
| 42 | <sect3><title><application>Postfix</application> dependencies</title>
|
---|
| 43 | <sect4><title>Required</title>
|
---|
| 44 | <para><xref linkend="db"/></para></sect4>
|
---|
| 45 | <sect4><title>Optional</title>
|
---|
| 46 | <para><ulink url="http://asg.web.cmu.edu/sasl/">Cyrus SASL</ulink></para></sect4>
|
---|
| 47 | </sect3>
|
---|
| 48 |
|
---|
| 49 | </sect2>
|
---|
| 50 |
|
---|
| 51 | <sect2>
|
---|
| 52 | <title>Installation of <application>Postfix</application></title>
|
---|
| 53 |
|
---|
| 54 | <para>Before you compile the program, you need to create users and groups that
|
---|
| 55 | will be expected to be in place when the install script executes. Add the
|
---|
| 56 | users and groups with the following commands:</para>
|
---|
| 57 |
|
---|
| 58 | <screen><userinput><command>groupadd postfix &&
|
---|
| 59 | groupadd postdrop &&
|
---|
| 60 | groupadd -g 65534 nogroup &&
|
---|
| 61 | useradd -c postfix -d /dev/null -g postfix -s /bin/false postfix &&
|
---|
| 62 | useradd -c nobody -d /home -g nogroup -s /bin/bash -u 65534 nobody &&
|
---|
| 63 | chown postfix:postfix /var/mail</command></userinput></screen>
|
---|
| 64 |
|
---|
| 65 | <para>Install <application>postfix</application> by running the following commands:</para>
|
---|
| 66 |
|
---|
| 67 | <screen><userinput><command>make &&
|
---|
| 68 | sh postfix-install daemon_directory=/usr/sbin \
|
---|
| 69 | manpage_directory=/usr/share/man \
|
---|
| 70 | sample_directory=/usr/share/doc/postfix \
|
---|
| 71 | -non-interactive</command></userinput></screen>
|
---|
| 72 |
|
---|
| 73 | <para>The final installation step is to install the program's documentation with this command:</para>
|
---|
| 74 |
|
---|
| 75 | <screen><userinput><command>install -d /usr/share/doc/postfix &&
|
---|
| 76 | cp -rf html/* /usr/share/doc/postfix</command></userinput></screen>
|
---|
| 77 |
|
---|
| 78 | </sect2>
|
---|
| 79 |
|
---|
| 80 | <sect2>
|
---|
| 81 | <title>Command explanations</title>
|
---|
| 82 |
|
---|
| 83 | <para><command>sh postfix-install ... -non-interactive</command> :
|
---|
| 84 | We don't want the install script to ask any questions so we call it with
|
---|
| 85 | a non-interactive switch and accept default destination directories in
|
---|
| 86 | all but three cases.</para>
|
---|
| 87 |
|
---|
| 88 | </sect2>
|
---|
| 89 |
|
---|
| 90 | <sect2>
|
---|
| 91 | <title>Configuring <application>Postfix</application></title>
|
---|
| 92 |
|
---|
| 93 | <sect3><title>Config files</title>
|
---|
| 94 | <para><filename>/etc/aliases</filename>,
|
---|
| 95 | <filename>/etc/postfix/main.cf</filename> and
|
---|
| 96 | <filename>/etc/postfix/master.cf</filename></para>
|
---|
| 97 | </sect3>
|
---|
| 98 |
|
---|
| 99 | <sect3><title>Configuration Information</title>
|
---|
| 100 |
|
---|
| 101 | <screen><userinput><command>cat >> /etc/aliases << "EOF"</command>
|
---|
| 102 | # Begin /etc/aliases
|
---|
| 103 |
|
---|
| 104 | MAILER-DAEMON: postmaster
|
---|
| 105 | postmaster: root
|
---|
| 106 |
|
---|
| 107 | root: LOGIN
|
---|
| 108 | # End /etc/aliases
|
---|
| 109 | <command>EOF</command></userinput></screen>
|
---|
| 110 |
|
---|
| 111 | <note><para>To protect an existing <filename>/etc/aliases</filename>
|
---|
| 112 | file, we will append these aliases to it if it exists. This file
|
---|
| 113 | should be checked and duplicate aliases removed, if
|
---|
| 114 | present.</para></note>
|
---|
| 115 |
|
---|
| 116 | <para>The <filename>/etc/aliases</filename> file that was just created
|
---|
| 117 | or appended, the <filename>main.cf</filename> and the
|
---|
| 118 | <filename>master.cf</filename>
|
---|
| 119 | must be personalized for your system. The <filename>aliases</filename> file
|
---|
| 120 | needs your non-root login identity so mail addressed to root can be forwarded
|
---|
| 121 | to you at the user level. The <filename>main.cf</filename> file needs your
|
---|
| 122 | fully qualified hostname. All of these edits can be done with sed commands
|
---|
| 123 | entered into the console with appropriate substitutions of your non-root
|
---|
| 124 | login name for <replaceable>[user]</replaceable> and your fully qualified
|
---|
| 125 | hostname for <replaceable>[localhost.localdomain]</replaceable>. You will
|
---|
| 126 | find the <filename>main.cf</filename> file
|
---|
| 127 | is self documenting, so load it into your editor to make the changes you need
|
---|
| 128 | for your situation.</para>
|
---|
| 129 |
|
---|
| 130 | <screen><userinput><command>cp /etc/aliases /etc/aliases.bak &&
|
---|
| 131 | cp /etc/postfix/main.cf /etc/postfix/main.cf.bak &&
|
---|
| 132 | sed "s/LOGIN/<replaceable>[user]</replaceable>/" /etc/aliases.bak > /etc/aliases &&
|
---|
| 133 | sed "s/#myhostname = host.domain.tld/myhostname = \
|
---|
| 134 | <replaceable>[localhost.localdomain]</replaceable>/" \
|
---|
| 135 | /etc/postfix/main.cf.bak > /etc/postfix/main.cf &&
|
---|
| 136 | /usr/bin/newaliases &&
|
---|
| 137 | /usr/sbin/postfix start</command></userinput></screen></sect3>
|
---|
| 138 |
|
---|
| 139 | <sect3><title>Postfix init.d script</title>
|
---|
| 140 |
|
---|
| 141 | <para>To automate the running of Postfix at startup, install the <filename>/etc/rc.d/init.d/postfix</filename>
|
---|
| 142 | init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
| 143 |
|
---|
| 144 | <screen><userinput><command>make install-postfix</command></userinput></screen>
|
---|
| 145 |
|
---|
| 146 | </sect3>
|
---|
| 147 |
|
---|
| 148 | </sect2>
|
---|
| 149 |
|
---|
| 150 | <sect2>
|
---|
| 151 | <title>Contents</title>
|
---|
| 152 |
|
---|
| 153 | <para>The <application>Postfix</application> package contains <filename>bounce
|
---|
| 154 | </filename>, <filename>cleanup</filename>, <filename>error</filename>,
|
---|
| 155 | <filename>flush</filename>, <filename>lmtp</filename>,
|
---|
| 156 | <filename>local</filename>, <filename class="symlink">mailq</filename>,
|
---|
| 157 | <filename>master</filename>, <filename class="symlink">newaliases</filename>,
|
---|
| 158 | <filename>nqmgr</filename>, <filename>pickup</filename>,
|
---|
| 159 | <filename>pipe</filename>, <command>postalias</command>,
|
---|
| 160 | <command>postcat</command>, <command>postconf</command>,
|
---|
| 161 | <command>postdrop</command>, <command>postfix</command>,
|
---|
| 162 | <command>postkick</command>, <command>postlock</command>,
|
---|
| 163 | <command>postlog</command>, <command>postmap</command>,
|
---|
| 164 | <command>postqueue</command>, <command>postsuper</command>,
|
---|
| 165 | <filename>qmgr</filename>, <filename>qmqpd</filename>,
|
---|
| 166 | <command>sendmail</command>, <command>showq</command>,
|
---|
| 167 | <filename>smtp</filename>, <filename>smtpd</filename>,
|
---|
| 168 | <filename>spawn</filename>, <filename>trivial-rewrite</filename>,
|
---|
| 169 | and <filename>virtual</filename>.</para>
|
---|
| 170 |
|
---|
| 171 | </sect2>
|
---|
| 172 |
|
---|
| 173 | <sect2><title>Description</title>
|
---|
| 174 |
|
---|
| 175 | <sect3><title>postfix</title>
|
---|
| 176 | <para><command>postfix</command> is the program that starts and stops the mail delivery system.</para></sect3>
|
---|
| 177 |
|
---|
| 178 | <sect3><title>master</title>
|
---|
| 179 | <para><filename>master</filename> is the resident process that runs
|
---|
| 180 | <filename>bounce</filename>, <filename>cleanup</filename>,
|
---|
| 181 | <filename>error</filename>, <filename>flush</filename>,
|
---|
| 182 | <filename>lmtp</filename>, <filename>local</filename>,
|
---|
| 183 | <filename>nqmgr</filename>, <filename>pickup</filename>,
|
---|
| 184 | <filename>pipe</filename>, <filename>qmgr</filename>,
|
---|
| 185 | <filename>qmqpd</filename>, <filename>showq</filename>,
|
---|
| 186 | <filename>smtp</filename>, <filename>smtpd</filename>,
|
---|
| 187 | <filename>spawn</filename>, <filename>trivial-rewrite</filename> and
|
---|
| 188 | <filename>virtual</filename> on demand. These programs are not designed to
|
---|
| 189 | work as user commands.</para></sect3>
|
---|
| 190 |
|
---|
| 191 | <sect3><title>postqueue</title>
|
---|
| 192 | <para><command>postqueue</command> implements the
|
---|
| 193 | <application>Postfix</application> user interface for
|
---|
| 194 | queue management. It implements all the operations that are traditionally
|
---|
| 195 | available via the <command>sendmail</command> command.</para></sect3>
|
---|
| 196 |
|
---|
| 197 | <sect3><title>sendmail</title>
|
---|
| 198 | <para><command>sendmail</command> implements the
|
---|
| 199 | <application>Postfix</application> to
|
---|
| 200 | <application>Sendmail</application> compatibility interface.
|
---|
| 201 | <filename class="symlink">mailq</filename> and <filename
|
---|
| 202 | class="symlink">newaliases</filename> are symlinks to
|
---|
| 203 | <command>sendmail</command>.</para></sect3>
|
---|
| 204 |
|
---|
| 205 | <sect3><title>showq</title>
|
---|
| 206 | <para><command>showq</command> will emulate the <filename
|
---|
| 207 | class="symlink">mailq</filename> command when the
|
---|
| 208 | <application>Postfix</application> mail system is
|
---|
| 209 | not running.</para></sect3>
|
---|
| 210 |
|
---|
| 211 | <sect3><title>postsuper</title>
|
---|
| 212 | <para><command>postsuper</command> does maintenance jobs on the
|
---|
| 213 | <application>Postfix</application> queue.</para></sect3>
|
---|
| 214 |
|
---|
| 215 | <sect3><title>postalias</title>
|
---|
| 216 | <para><command>postalias</command> creates, queries or updates
|
---|
| 217 | <application>Postfix</application> alias
|
---|
| 218 | databases.</para></sect3>
|
---|
| 219 |
|
---|
| 220 | <sect3><title>postcat</title>
|
---|
| 221 | <para><command>postcat</command> prints the contents of a
|
---|
| 222 | <application>Postfix</application> queue file in human-readable
|
---|
| 223 | form.</para></sect3>
|
---|
| 224 |
|
---|
| 225 | <sect3><title>postconf</title>
|
---|
| 226 | <para><command>postconf</command> prints or changes the value of configuration
|
---|
| 227 | parameters.</para></sect3>
|
---|
| 228 |
|
---|
| 229 | <sect3><title>postdrop</title>
|
---|
| 230 | <para><command>postdrop</command> creates a file in the maildrop directory and
|
---|
| 231 | copies its standard input to the file.</para></sect3>
|
---|
| 232 |
|
---|
| 233 | <sect3><title>postkick</title>
|
---|
| 234 | <para><command>postkick</command> makes the mail system private
|
---|
| 235 | <acronym>IPC</acronym> accessible for use in shell
|
---|
| 236 | scripts.</para></sect3>
|
---|
| 237 |
|
---|
| 238 | <sect3><title>postlock</title>
|
---|
| 239 | <para><command>postlock</command> locks a file for exclusive access and
|
---|
| 240 | executes a command on that file.</para></sect3>
|
---|
| 241 |
|
---|
| 242 | <sect3><title>postlog</title>
|
---|
| 243 | <para><command>postlog</command> implements a logging interface for use in
|
---|
| 244 | shell scripts.</para></sect3>
|
---|
| 245 |
|
---|
| 246 | <sect3><title>postmap</title>
|
---|
| 247 | <para><command>postmap</command> creates, queries or updates
|
---|
| 248 | <application>Postfix</application> lookup tables.</para></sect3>
|
---|
| 249 |
|
---|
| 250 | </sect2>
|
---|
[f45b1953] | 251 |
|
---|
| 252 | </sect1>
|
---|
| 253 |
|
---|