1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357
|
<html>
<head>
<title> Postfix Configuration - Basics </title>
</head>
<body>
<h1><a href="big-picture.html"><img src="small-picture.gif" width="115" height="45"></a> Postfix Configuration - Basics </h1>
<hr>
<a href="index.html">Up one level</a> | Basic Configuration | <a
href="uce.html">UCE Controls</a> | <a href="rate.html"> Rate
Controls</a> | <a href="resource.html"> Resource Controls</a> | <a
href="rewrite.html"> Address Manipulation </a>
<h2> Introduction </h2>
Postfix has about 100 configuration parameters that are controlled
via the <b>main.cf</b> file. Fortunately, they have sensible
default values. In most cases, you need to configure only two or
three parameters before you can use the Postfix mail system:
<ul>
<li> <a href="#myorigin"> What domain to use in outbound mail </a>
<p>
<li> <a href="#mydestination"> What domains to receive mail for
</a>
</ul>
The default values for many other configuration parameters are
derived from just these two.
<p>
The third parameter of interest controls the amount of mail sent
to the local postmaster:
<ul>
<li> <a href="#notify"> What trouble to report to the postmaster
</a>
</ul>
<p>
By the way, if you change parameters of a running Postfix system,
don't forget to issue a <b>postfix reload</b> command.
<p>
If you run Postfix on a virtual network interface, or if your
machine runs other mailers on virtual interfaces, you'll have to
look at the other parameters listed here as well:
<ul>
<li> <a href="#myhostname"> My own hostname </a>
<p>
<li> <a href="#mydomain"> My own domain name </a>
<p>
<li> <a href="#mynetworks"> My own networks </a>
<p>
<li> <a href="#inet_interfaces"> My own network addresses </a>
</ul>
<a name="myorigin"> <h2> What domain to use in outbound mail </h2> </a>
The <b>myorigin</b> parameter specifies the domain that appears in
mail that is posted on this machine. The default is to use the
local machine name, <b><a href="#myhostname"> $myhostname</a>, </b>
which defaults to the name of the machine. Unless you are running
a really small site, you probably want to change that into <b><a
href="#mydomain"> $mydomain</a>,</b> which defaults to the parent
domain of the machine name.
<p>
<dl>
<dt> Examples:
<p>
<dd> <b>myorigin = $myhostname</b> (default)
<dd> <b>myorigin = $mydomain</b> (probably desirable)
</dl>
<a name="mydestination"> <h2> What domains to receive mail for
</h2> </a>
The <b>mydestination</b> parameter specifies what domains this
machine will deliver locally, instead of forwarding to another
machine. The default is to receive mail for the machine itself.
<p>
You can specify zero or more domain names, <i>/file/name</i> patterns
and/or <i>type:name</i> lookup tables, separated by whitespace
and/or commas. A <i>/file/name</i> is replaced by its contents;
<i>type:name</i> requests that a table lookup is done, typically
from a <a href="rewrite.html#virtual">virtual</a> database.
<p>
If your machine is a mail server for its entire domain, you must
list <b>$mydomain</b> as well.
<p>
<dl> Examples:
<p>
<dl>
<dt> Default setting:
<dd> <b>mydestination = $myhostname localhost.$mydomain</b>
<p>
<dt> Domain-wide mail server:
<dd> <b>mydestination = $myhostname localhost.$mydomain $mydomain
</b>
<p>
<dt> Host with multiple DNS A records:
<dd> <b>mydestination = $myhostname localhost.$mydomain www.$mydomain
ftp.$mydomain</b>
</dl>
<p>
Caution: in order to avoid mail delivery loops, you must list all
hostnames of the machine, including $myhostname, and localhost.$mydomain.
</dl>
<a name="notify"> <h2> What trouble to report to the postmaster
</h2> </a>
You should set up a <b>postmaster</b> <a
href="rewrite.html#aliases">alias</a> that points to a human person.
This alias is required to exist, so that people can report mail
delivery problems.
<p>
The Postfix system itself also reports problems to the postmaster
alias. You may not be interested in all types of trouble reports,
so this reporting mechanism is configurable. The default is to
report only serious problems (resource, software) to postmaster:
<p>
<dl>
<dt> Default:
<dd> <b>notify_classes = resource, software</b>
<p>
<dt>The meaning of the classes is as follows:
<p>
<dl>
<dt> <b>bounce</b> <dd> Send postmaster copies of undeliverable
mail. If mail is undeliverable, a so-called single bounce message
is sent, with a copy of the message that was not delivered. For
privacy reasons, the postmaster copy of a single bounce message is
truncated after the original message headers. If a single bounce
message is undeliverable, the postmaster receives a double bounce
message with a copy of the entire single bounce message. See also
the <a href="rewrite.html#luser_relay"> luser_relay</a> feature.
<p>
<dt> <b>2bounce</b> <dd> Send double bounces to the postmaster.
<p>
<dt> <b>delay</b> <dd> Inform the postmaster of delayed mail.
In this case, the postmaster receives message headers only.
<p>
<dt> <b>policy</b> <dd> Inform the postmaster of client requests
that were rejected because of (UCE) policy restrictions. The
postmaster receives a transcript of the entire SMTP session.
<p>
<dt> <b>protocol</b> <dd> Inform the postmaster of protocol errors
(client or server side) or attempts by a client to execute
unimplemented commands. The postmaster receives a transcript of
the entire SMTP session.
<p>
<dt> <b>resource</b> <dd> Inform the postmaster of mail not delivered
due to resource problems (for example, queue file write errors).
<p>
<dt> <b>software</b> <dd> Inform the postmaster of mail not delivered
due to software problems.
</dl>
</dl>
<a name="myhostname"> <h2> My own hostname </h2> </a>
The <b>myhostname</b> parameter describes the fully-qualified domain
name of the machine running the Postfix system. <b> $myhostname</b>
appears as the default value in many other Postfix configuration
parameters.
<p>
By default, <b>myhostname</b> is set to the local machine name.
If your machine name is not in fully-qualified domain name form,
or if you run Postfix on a virtual interface, you will have to
specify the fully-qualified domain name that the mail system
should use.
<dl>
<dt> Examples:
<p>
<dd> <b>myhostname = host.local.domain</b> (local hostname is not
FQDN)
<dd> <b>myhostname = host.virtual.domain</b> (virtual interface)
<dd> <b>myhostname = virtual.domain</b> (virtual interface)
</dl>
<a name="mydomain"> <h2> My own domain name </h2> </a>
The <b>mydomain</b> parameter specifies the parent domain of
<b>$myhostname.</b> By default it is derived from <b> $myhostname</b>
by stripping off the first part (unless the result would be a
top-level domain).
<dl>
<dt> Examples:
<p>
<dd> <b>mydomain = local.domain</b>
<dd> <b>mydomain = virtual.domain</b> (virtual interface)
</dl>
<a name="mynetworks"> <h2> My own networks </h2> </a>
The <b>mynetworks</b> parameter lists all networks that this machine
is attached to. This information can be used by the <a href="uce.html">
anti-UCE</a> features to distinguish between local systems and
strangers.
<p>
By default, <b>mynetworks</b> is set to the class A, B or C networks
that the machine is attached to. For example, for my machines at
home, the result is: <b>168.100.0.0/16 127.0.0.0/8. </b> However,
network <b>168.100</b> is owned by my ISP. Of course I do not want
to consider all their customer systems as local, so I use instead:
<dl>
<dd> <b>mynetworks = 168.100.189.0/28, 127.0.0.0/8</b>
</dl>
<a name="inet_interfaces"> <h2> My own network addresses </h2> </a>
The <b>inet_interfaces</b> parameter specifies all network interface
addresses that the Postfix system should listen on; mail addressed
to <i>user</i>@[<i>network address</i>] will be delivered locally,
as if it is addressed to a domain listed in <b> $mydestination.
</b>
<p>
The default is to listen on all active interfaces. If you run
mailers on virtual interfaces, you will have to specify what
interfaces to listen on. This includes the non-virtual mailer that
receives mail for the machine itself as well: it should never listen
on the virtual interfaces or you would have a mailer loop.
<dl>
<dt> Examples:
<p>
<dl>
<dt> Default:
<dd> <b>inet_interfaces = all</b>
<p>
<dt> Host running virtual mailers:
<dd> <b>inet_interfaces = virtual.host.name</b> (virtual domain)
<dd> <b>inet_interfaces = $myhostname localhost.$mydomain</b>
(non-virtual mailer)
</dl>
</dl>
<hr>
<a href="index.html">Up one level</a> | Basic Configuration | <a
href="uce.html">UCE Controls</a> | <a href="rate.html"> Rate
Controls</a> | <a href="resource.html"> Resource Controls</a> | <a
href="rewrite.html"> Address Manipulation </a>
</body>
</html>
|