9 Postfix lookup table proxy server
13 \fBproxymap\fR [generic Postfix daemon options]
17 The \fBproxymap\fR(8) server provides read-only or read-write
18 table lookup service to Postfix processes. These services are
19 implemented with distinct service names: \fBproxymap\fR and
20 \fBproxywrite\fR, respectively. The purpose of these services is:
22 To overcome chroot restrictions. For example, a chrooted SMTP
23 server needs access to the system passwd file in order to
24 reject mail for non-existent local addresses, but it is not
25 practical to maintain a copy of the passwd file in the chroot
29 local_recipient_maps =
30 proxy:unix:passwd.byname $alias_maps
33 To consolidate the number of open lookup tables by sharing
34 one open table among multiple processes. For example, making
35 mysql connections from every Postfix daemon process results
36 in "too many connections" errors. The solution:
40 proxy:mysql:/etc/postfix/virtual_alias.cf
43 The total number of connections is limited by the number of
44 proxymap server processes.
46 To provide single-updater functionality for lookup tables
47 that do not reliably support multiple writers (i.e. all
50 The \fBproxymap\fR(8) server implements the following requests:
51 .IP "\fBopen\fR \fImaptype:mapname flags\fR"
52 Open the table with type \fImaptype\fR and name \fImapname\fR,
53 as controlled by \fIflags\fR. The reply includes the \fImaptype\fR
54 dependent flags (to distinguish a fixed string table from a regular
56 .IP "\fBlookup\fR \fImaptype:mapname flags key\fR"
57 Look up the data stored under the requested key.
58 The reply is the request completion status code and
59 the lookup result value.
60 The \fImaptype:mapname\fR and \fIflags\fR are the same
61 as with the \fBopen\fR request.
62 .IP "\fBupdate\fR \fImaptype:mapname flags key value\fR"
63 Update the data stored under the requested key.
64 The reply is the request completion status code.
65 The \fImaptype:mapname\fR and \fIflags\fR are the same
66 as with the \fBopen\fR request.
68 To implement single-updater maps, specify a process limit
69 of 1 in the master.cf file entry for the \fBproxywrite\fR
72 This request is supported in Postfix 2.5 and later.
73 .IP "\fBdelete\fR \fImaptype:mapname flags key\fR"
74 Delete the data stored under the requested key.
75 The reply is the request completion status code.
76 The \fImaptype:mapname\fR and \fIflags\fR are the same
77 as with the \fBopen\fR request.
79 This request is supported in Postfix 2.5 and later.
81 The request completion status is one of OK, RETRY, NOKEY
82 (lookup failed because the key was not found), BAD (malformed
83 request) or DENY (the table is not approved for proxy read
86 There is no \fBclose\fR command, nor are tables implicitly closed
87 when a client disconnects. The purpose is to share tables among
88 multiple client processes.
89 .SH "SERVER PROCESS MANAGEMENT"
94 \fBproxymap\fR(8) servers run under control by the Postfix
96 server. Each server can handle multiple simultaneous connections.
97 When all servers are busy while a client connects, the \fBmaster\fR(8)
98 creates a new \fBproxymap\fR(8) server process, provided that the
99 process limit is not exceeded.
100 Each server terminates after serving at least \fB$max_use\fR clients
101 or after \fB$max_idle\fR seconds of idle time.
107 The \fBproxymap\fR(8) server opens only tables that are
108 approved via the \fBproxy_read_maps\fR or \fBproxy_write_maps\fR
109 configuration parameters, does not talk to
110 users, and can run at fixed low privilege, chrooted or not.
111 However, running the proxymap server chrooted severely limits
112 usability, because it can open only chrooted tables.
114 The \fBproxymap\fR(8) server is not a trusted daemon process, and must
115 not be used to look up sensitive information such as user or
116 group IDs, mailbox file/directory names or external commands.
118 In Postfix version 2.2 and later, the proxymap client recognizes
119 requests to access a table for security-sensitive purposes,
120 and opens the table directly. This allows the same main.cf
121 setting to be used by sensitive and non-sensitive processes.
123 Postfix-writable data files should be stored under a dedicated
124 directory that is writable only by the Postfix mail system,
125 such as the Postfix-owned \fBdata_directory\fR.
127 In particular, Postfix-writable files should never exist
128 in root-owned directories. That would open up a particular
129 type of security hole where ownership of a file or directory
130 does not match the provider of its content.
134 Problems and transactions are logged to \fBsyslogd\fR(8).
138 The \fBproxymap\fR(8) server provides service to multiple clients,
139 and must therefore not be used for tables that have high-latency
142 The \fBproxymap\fR(8) read-write service does not explicitly
143 close lookup tables (even if it did, this could not be relied on,
144 because the process may be terminated between table updates).
145 The read-write service should therefore not be used with tables that
146 leave persistent storage in an inconsistent state between
147 updates (for example, CDB). Tables that support "sync on
148 update" should be safe (for example, Berkeley DB) as should
149 tables that are implemented by a real DBMS.
150 .SH "CONFIGURATION PARAMETERS"
155 On busy mail systems a long time may pass before
156 \fBproxymap\fR(8) relevant
157 changes to \fBmain.cf\fR are picked up. Use the command
158 "\fBpostfix reload\fR" to speed up a change.
160 The text below provides only a parameter summary. See
161 \fBpostconf\fR(5) for more details including examples.
162 .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
163 The default location of the Postfix main.cf and master.cf
165 .IP "\fBdata_directory (see 'postconf -d' output)\fR"
166 The directory with Postfix-writable data files (for example:
167 caches, pseudo-random numbers).
168 .IP "\fBdaemon_timeout (18000s)\fR"
169 How much time a Postfix daemon process may take to handle a
170 request before it is terminated by a built-in watchdog timer.
171 .IP "\fBipc_timeout (3600s)\fR"
172 The time limit for sending or receiving information over an internal
173 communication channel.
174 .IP "\fBmax_idle (100s)\fR"
175 The maximum amount of time that an idle Postfix daemon process waits
176 for an incoming connection before terminating voluntarily.
177 .IP "\fBmax_use (100)\fR"
178 The maximal number of incoming connections that a Postfix daemon
179 process will service before terminating voluntarily.
180 .IP "\fBprocess_id (read-only)\fR"
181 The process ID of a Postfix command or daemon process.
182 .IP "\fBprocess_name (read-only)\fR"
183 The process name of a Postfix command or daemon process.
184 .IP "\fBproxy_read_maps (see 'postconf -d' output)\fR"
185 The lookup tables that the \fBproxymap\fR(8) server is allowed to
186 access for the read-only service.
188 Available in Postfix 2.5 and later:
189 .IP "\fBdata_directory (see 'postconf -d' output)\fR"
190 The directory with Postfix-writable data files (for example:
191 caches, pseudo-random numbers).
192 .IP "\fBproxy_write_maps (see 'postconf -d' output)\fR"
193 The lookup tables that the \fBproxymap\fR(8) server is allowed to
194 access for the read-write service.
198 postconf(5), configuration parameters
199 master(5), generic daemon options
205 Use "\fBpostconf readme_directory\fR" or
206 "\fBpostconf html_directory\fR" to locate this information.
209 DATABASE_README, Postfix lookup table overview
215 The Secure Mailer license must be distributed with this software.
221 The proxymap service was introduced with Postfix 2.0.
226 IBM T.J. Watson Research
228 Yorktown Heights, NY 10598, USA