PROXYMAP(8postfix)
π PROXYMAP π (8postfix)
okay bestie, sit down, grab a strawberry π β this is the page for proxymap, the Postfix lookup table proxy server, and it's genuinely one of the most underrated little daemons in the whole suite. it's giving middle management but make it iconic. let's get into it π
β¨ NAME β¨
proxymap β Postfix lookup table proxy server π«Ά
β¨ SYNOPSIS β¨
proxymap [generic Postfix daemon options]
β¨ DESCRIPTION β¨
so the proxymap(8) server is literally out here providing a read-only or read-write table lookup service to Postfix processes. no cap. these two services have their own distinct service names: proxymap and proxywrite, respectively. and the whole reason these services exist? let me break it down for you π
- to overcome chroot restrictions. for example, a chrooted SMTP server needs access to the system
passwdfile so it can reject mail for non-existent local addresses, but it is not practical to maintain a copy of thepasswdfile in the chroot jail. 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. for example, making
mysqlconnections from every Postfix daemon process results in "too many connections" errors. the solution:
virtual_alias_maps =
proxy:mysql:/etc/postfix/virtual_alias.cf
and the total number of connections is limited by the number of proxymap server processes. so cute, so efficient πΈ
- to provide single-updater functionality for lookup tables that do not reliably support multiple writers (i.e. all file-based tables). yes bestie, all of them.
the requests it implements π¦
the proxymap(8) server implements the following requests:
open maptype:mapname flagsβ open the table with type maptype and name mapname, as controlled by flags. the reply includes the maptype dependent flags (to distinguish a fixed string table from a regular expression table).lookup maptype:mapname flags keyβ look up the data stored under the requested key. the reply is the request completion status code and the lookup result value. themaptype:mapnameandflagsare the same as with theopenrequest.update maptype:mapname flags key valueβ update the data stored under the requested key. the reply is the request completion status code. themaptype:mapnameandflagsare the same as with theopenrequest.
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 flags keyβ delete the data stored under the requested key. the reply is the request completion status code. themaptype:mapnameandflagsare the same as with theopenrequest.
this request is supported in Postfix 2.5 and later. β
sequence maptype:mapname flags functionβ iterate over the specified database. the function is one ofDICT_SEQ_FUN_FIRSTorDICT_SEQ_FUN_NEXT. the reply is the request completion status code and a lookup key and result value, if found.
this request is supported in Postfix 2.9 and later. β
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).
and here's the thing bestie β there is no close command, and tables are not implicitly closed when a client disconnects. the whole point is to share tables among multiple client processes. it's a community table situation, not a situationship π
β¨ SERVER PROCESS MANAGEMENT β¨
proxymap(8) servers run under control by the Postfix master(8) server. each server can handle multiple simultaneous connections. 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. and each server terminates after serving at least $max_use clients or after $max_idle seconds of idle time. it knows when to leave the party, we love a healthy boundary π
β¨ SECURITY β¨
okay this part matters, so pay attention π₯
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. however β running the proxymap server chrooted severely limits usability, because it can 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 allows the same main.cf setting to be used by sensitive and non-sensitive processes. slay.
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.
and 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. so like... don't do that π
β¨ DIAGNOSTICS β¨
problems and transactions are logged to syslogd(8) or postlogd(8). π
β¨ BUGS β¨
- the
proxymap(8)server provides service to multiple clients, and must therefore not be used for tables that have high-latency lookups. lowkey obvious but okay bestie, noted. - the
proxymap(8)read-write service does not explicitly close lookup tables (even if it did, this could not be relied on, because the process may be terminated between table updates). 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) as should tables that are implemented by a real DBMS. π this is the real one, don't skip it.
β¨ 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. speed it up, bestie β‘
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. π
β¨ HISTORY β¨
the proxymap service was introduced with Postfix 2.0. vintage icon behavior π
β¨ 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
and that's the whole page bestie!! π the footer down there just says PROXYMAP(8postfix) β the manual name and the page tag, no date attached, so that's the version stamp we're working with. you're now fully fluent in proxymap, go forth and share those lookup tables responsibly πβ¨π¦
π¦ where this page comes from
- debian bookworm: postfix 3.7.11-0+deb12u1
- ubuntu jammy: postfix 3.6.4-1ubuntu1
- ubuntu jammy: postfix 3.6.4-1ubuntu1.4
- ubuntu noble: postfix 3.8.6-1build2
- ubuntu noble: postfix 3.8.6-1ubuntu0.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms