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