PROXYMAP(8)
π PROXYMAP(8) β the Postfix lookup table proxy server π
okay bestie, sit down, hydrate, because this one is a whole vibe: proxymap is a Postfix daemon that does table lookups on behalf of other Postfix processes, and honestly? iconic. π¦
β¨ NAME β¨
proxymap β the Postfix lookup table proxy server, fr fr. π
πΈ SYNOPSIS πΈ
proxymap [generic Postfix daemon options]
π«Ά DESCRIPTION π«Ά
So the proxymap(8) server hands out a read-only or read-write table lookup service to other Postfix processes. They're implemented as two separate service names, no cap: proxymap and proxywrite, respectively. And the reason these services exist at all? Multiple reasons, babes: π
- To overcome chroot restrictions. For example, a chrooted SMTP server needs access to the system passwd file so it can reject mail for non-existent local addresses, but maintaining a copy of the passwd file in the chroot jail is just not practical. The solution:
local_recipient_maps =
proxy:unix:passwd.byname $alias_maps
- To consolidate the number of open lookup tables by sharing one open table among multiple processes. Example: making mysql connections from every single Postfix daemon process gives you "too many connections" errors, which is giving chaos. The solution:
virtual_alias_maps =
proxy:mysql:/etc/postfix/virtual_alias.cf
The total number of connections is limited by the number of proxymap server processes. Slay.
- To provide single-updater functionality for lookup tables that do not reliably support multiple writers (i.e. all file-based tables that are not based on lmdb). Periodt.
The proxymap(8) server implements the following requests:
open maptype:mapname instance-flags
Open the table with type maptype and name mapname, with initial dictionary flags instance-flags. The reply contains the actual dictionary flags (for example, to distinguish a fixed-string table from a regular-expression table). π
lookup maptype:mapname instance-flags request-flags key
Look up the data stored under the requested key using the dictionary flags in request-flags. The reply contains the request completion status code, the resulting dictionary flags, and the lookup result value. The maptype:mapname and instance-flags are the same as with the open request.
update maptype:mapname instance-flags request-flags key value
Update the data stored under the requested key using the dictionary flags in request-flags. The reply contains the request completion status code and the resulting dictionary flags. The maptype:mapname and instance-flags are the same as with the open request.
To implement single-updater maps, specify a process limit of 1 in the master.cf file entry for the proxywrite service. π
This request is supported in Postfix 2.5 and later.
delete maptype:mapname instance-flags request-flags key
Delete the data stored under the requested key, using the dictionary flags in request-flags. The reply contains the request completion status code and the resulting dictionary flags. The maptype:mapname and instance-flags are the same as with the open request.
This request is supported in Postfix 2.5 and later.
sequence maptype:mapname instance-flags request-flags function
Iterate over the specified database, using the dictionary flags in request-flags. The function is either DICT_SEQ_FUN_FIRST or DICT_SEQ_FUN_NEXT. The reply contains the request completion status code, the resulting dictionary flags, and a lookup key and result value if found. The maptype:mapname and instance-flags are the same as with the open request.
This request is supported in Postfix 2.9 and later.
Not implemented: close
There is no close request, nor are tables implicitly closed when a client disconnects. The purpose is to share tables among multiple client processes. And because there's no explicit or implicit close, updates are forced to be synchronous.
The request completion status is one of OK, RETRY, NOKEY (lookup failed because the key was not found), BAD (malformed request) or DENY (the table is not approved for proxy read or update access). π
π SERVER PROCESS MANAGEMENT π
proxymap(8) servers run under control by the Postfix master(8) server. Each server can handle multiple simultaneous connections β multitasking queen. π
When all servers are busy while a client connects, the master(8) creates a new proxymap(8) server process, provided that the process limit is not exceeded. Each server terminates after serving at least $max_use clients, or after $max_idle seconds of idle time. It simply says "okay, done, byeee" and dips. π¦
π SECURITY π
The proxymap(8) server opens only tables that are approved via the proxy_read_maps or proxy_write_maps configuration parameters, does not talk to users, and can run at fixed low privilege, chrooted or not. But listen: running the proxymap server chrooted severely limits usability, because it can then open only chrooted tables. π
The proxymap(8) server is not a trusted daemon process, and must not be used to look up sensitive information such as UNIX user or group IDs, mailbox file/directory names or external commands.
In Postfix version 2.2 and later, the proxymap client recognizes requests to access a table for security-sensitive purposes, and opens the table directly. This lets the same main.cf setting be used by sensitive and non-sensitive processes. π
Postfix-writable data files should be stored under a dedicated directory that is writable only by the Postfix mail system, such as the Postfix-owned data_directory.
In particular, Postfix-writable files should never exist in root-owned directories. That would open up a particular type of security hole where ownership of a file or directory does not match the provider of its content. Not the vibe. π
π©Ί DIAGNOSTICS π©Ί
Problems and transactions are logged to syslogd(8) or postlogd(8). The receipts are there, bestie. π§Ύ
π BUGS π
The proxymap(8) server provides service to multiple clients, and must therefore not be used for tables that have high-latency lookups. She's a social butterfly, not a patient one. π¦
The proxymap(8) read-write service does not explicitly close lookup tables (and even if it did, you could not rely on it, because the process may be terminated between table updates). So the read-write service should therefore not be used with tables that leave persistent storage in an inconsistent state between updates (for example, CDB). Tables that support "sync on update" should be safe (for example, Berkeley DB), and so should tables that are implemented by a real DBMS. π
βοΈ CONFIGURATION PARAMETERS βοΈ
On busy mail systems a long time may pass before proxymap(8)-relevant changes to main.cf are picked up. Use the command "postfix reload" to speed up a change. Go go go. πββοΈ
The text below provides only a parameter summary. See postconf(5) for more details including examples.
config_directory(see 'postconf -d' output) β The default location of the Postfixmain.cfandmaster.cfconfiguration files.data_directory(see 'postconf -d' output) β The directory with Postfix-writable data files (for example: caches, pseudo-random numbers).daemon_timeout(18000s) β How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.ipc_timeout(3600s) β The time limit for sending or receiving information over an internal communication channel.max_idle(100s) β The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.max_use(100) β The maximal number of incoming connections that a Postfix daemon process will service before terminating voluntarily.process_id(read-only) β The process ID of a Postfix command or daemon process.process_name(read-only) β The process name of a Postfix command or daemon process.proxy_read_maps(see 'postconf -d' output) β The lookup tables that theproxymap(8)server is allowed to access for the read-only service.
Available in Postfix 2.5 and later:
data_directory(see 'postconf -d' output) β The directory with Postfix-writable data files (for example: caches, pseudo-random numbers).proxy_write_maps(see 'postconf -d' output) β The lookup tables that theproxymap(8)server is allowed to access for the read-write service.
Available in Postfix 3.3 and later:
service_name(read-only) β Themaster.cfservice name of a Postfix daemon process.
π SEE ALSO π
postconf(5), configuration parametersmaster(5), generic daemon options
π README FILES π
Use "postconf readme_directory" or "postconf html_directory" to locate this information.
DATABASE_README, Postfix lookup table overview
π LICENSE π
The Secure Mailer license must be distributed with this software. No exceptions, bestie. π
π°οΈ HISTORY π°οΈ
The proxymap service was introduced with Postfix 2.0. A legend from the start. β
π AUTHOR(S) π
Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA
Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA
Wietse Venema porcupine.org
and that's the whole PROXYMAP(8) page from the System Manager's Manual, bestie β you ate it, no crumbs. πβ¨π¦ go forth and proxy your tables, and remember: read-only unless you know what you're doing. π
π¦ where this page comes from
- alpine 3.24: postfix-doc 3.11.7-r0 Β· IPL-1.0 EPL-2.0
- arch rolling: postfix 3.11.7-1 Β· EPL-2.0 OR IPL-1.0 AND BSD-4-Clause-UC
- nixos 26.05: postfix 3.11.7
- nixpkgs unstable: postfix 3.11.7
- ubuntu stonking: postfix 3.11.7-1ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms