xref: /netbsd-src/external/ibm-public/postfix/dist/html/LINUX_README.html (revision d16b7486a53dcb8072b60ec6fcb4373a2d0c27b7)
1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2        "http://www.w3.org/TR/html4/loose.dtd">
3
4<html>
5
6<head>
7
8<title>Postfix and Linux</title>
9
10<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11
12</head>
13
14<body>
15
16<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix and Linux</h1>
17
18<hr>
19
20<h2> Host lookup issues </h2>
21
22<p> By default Linux /etc/hosts lookups do not support multiple IP
23addresses per hostname. This causes warnings from the Postfix SMTP
24server that "hostname XXX does not resolve to address YYY", and is
25especially a problem with hosts that have both IPv4 and IPv6
26addresses.  To fix this, turn on support for multiple IP addresses: </p>
27
28<blockquote>
29<pre>
30/etc/host.conf:
31    ...
32    # We have machines with multiple IP addresses.
33    multi on
34    ...
35</pre>
36</blockquote>
37
38<p> Alternatively, specify the RESOLV_MULTI environment variable
39in <a href="postconf.5.html">main.cf</a>: </p>
40
41<blockquote>
42<pre>
43/etc/postfix/<a href="postconf.5.html">main.cf</a>:
44    <a href="postconf.5.html#import_environment">import_environment</a> = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY LANG=C RESOLV_MULTI=on
45</pre>
46</blockquote>
47
48<h2>Berkeley DB issues</h2>
49
50<p> If you can't compile Postfix because the file "db.h"
51isn't found, then you MUST install the Berkeley DB development
52package (name: db???-devel-???) that matches your system library.
53You can find out what is installed with the rpm command. For example:
54</p>
55
56<blockquote>
57<pre>
58$ <b>rpm -qf /usr/lib/libdb.so</b>
59db4-4.3.29-2
60</pre>
61</blockquote>
62
63<p> This means that you need to install db4-devel-4.3.29-2 (on
64some systems, specify "<b>rpm -qf /lib/libdb.so</b>" instead). </p>
65
66<p> DO NOT download some Berkeley DB version from the network.
67Every Postfix program will dump core when it is built with a different
68Berkeley DB version than the version that is used by the system
69library routines.  See the <a href="DB_README.html">DB_README</a> file for further information.
70</p>
71
72<h2>Procmail issues</h2>
73
74<p> On RedHat Linux 7.1 and later <b>procmail</b> no longer has
75permission
76to write to the mail spool directory. Workaround: </p>
77
78<blockquote>
79<pre>
80# chmod 1777 /var/spool/mail
81</pre>
82</blockquote>
83
84<h2>Logging in a container</h2>
85
86<p> When running Postfix inside a container, you can use stdout
87logging as described in <a href="MAILLOG_README.html">MAILLOG_README</a>. Alternatives: run syslogd
88inside the container, or mount the host's syslog socket inside the
89container. </p>
90
91<h2>Syslogd performance</h2>
92
93<p> LINUX <b>syslogd</b> uses synchronous writes by default. Because
94of this, <b>syslogd</b> can actually use more system resources than
95Postfix.  To avoid such badness, disable synchronous mail logfile
96writes by editing /etc/syslog.conf and by prepending a - to the
97logfile name:  </p>
98
99<blockquote>
100<pre>
101/etc/syslog.conf:
102    mail.*                          -/var/log/mail.log
103</pre>
104</blockquote>
105
106<p> Send a "<b>kill -HUP</b>" to the <b>syslogd</b> to make the
107change effective.  </p>
108
109<h2>Other logging performance issues</h2>
110
111<p> LINUX <b>systemd</b> intercepts all logging and enforces its
112own rate limits before handing off requests to a backend such as
113<b>rsyslogd</b> or <b>syslog-ng</b>. On a busy mail server this can
114result in information loss. As a workaround, you can use Postfix's
115built-in logging as described in <a href="MAILLOG_README.html">MAILLOG_README</a>. </p>
116
117</body>
118
119</html>
120