5
# Postfix memcache client configuration
7
# \fBpostmap -q "\fIstring\fB" memcache:/etc/postfix/filename\fR
9
# \fBpostmap -q - memcache:/etc/postfix/\fIfilename\fR <\fIinputfile\fR
11
# The Postfix mail system uses optional tables for address
12
# rewriting or mail routing. These tables are usually in
13
# \fBdbm\fR or \fBdb\fR format.
15
# Alternatively, lookup tables can be specified as memcache
16
# instances. To use memcache lookups, define a memcache
17
# source as a lookup table in main.cf, for example:
20
# virtual_alias_maps = memcache:/etc/postfix/memcache-aliases.cf
23
# The file /etc/postfix/memcache-aliases.cf has the same
24
# format as the Postfix main.cf file, and specifies the
25
# parameters described below.
27
# The Postfix memcache client supports the lookup, update,
28
# delete and sequence (first/next) operations. The sequence
29
# operation requires a backup database that supports the
31
# MEMCACHE MAIN PARAMETERS
34
# .IP "\fBmemcache (default: inet:localhost:11211)\fR"
35
# The memcache server (note: singular) that Postfix will try
36
# to connect to. For a TCP server specify "inet:" followed by
37
# a hostname or address, ":", and a port name or number.
38
# Specify an IPv6 address inside "[]".
39
# For a UNIX-domain server specify "unix:" followed by the
40
# socket pathname. Examples:
43
# memcache = inet:memcache.example.com:11211
44
# memcache = inet:127.0.0.1:11211
45
# memcache = inet:[fc00:8d00:189::3]:11211
46
# memcache = unix:/path/to/socket
49
# NOTE: to access a UNIX-domain socket with the proxymap(8)
50
# server, the socket must be accessible by the unprivileged
52
# .IP "\fBbackup (default: undefined)\fR"
53
# An optional Postfix database that provides persistent backup
54
# for the memcache database. The Postfix memcache client will
55
# update the memcache database whenever it looks up or changes
56
# information in the persistent database. Specify a Postfix
57
# "type:table" database. Examples:
60
# # Non-shared postscreen cache.
61
# backup = btree:/var/lib/postfix/postscreen_cache_map
63
# # Shared postscreen cache for processes on the same host.
64
# backup = proxy:btree:/var/lib/postfix/postscreen_cache_map
67
# Access to remote proxymap servers is under development.
69
# NOTE 1: When using memcache with persistent backup as
70
# \fBpostscreen\fR(8) or \fBverify\fR(8) cache, disable
71
# automatic cache cleanup (*_cache_cleanup_interval = 0) in
72
# all Postfix instances except for one instance that will be
73
# responsible for cache cleanup.
75
# NOTE 2: In the case of a proxied backup database, the full
77
# name (including the "proxy:" prefix) must be specified in
78
# the proxymap server's proxy_read_maps or proxy_write_maps
79
# setting (depending on whether the access is read-only or
81
# .IP "\fBflags (default: 0)\fR"
82
# Optional flags that should be stored along with a memcache
84
# .IP "\fBttl (default: 3600)\fR"
85
# The expiration time in seconds of memcache updates.
87
# NOTE 1: When using a memcache table as \fBpostscreen\fR(8)
88
# or \fBverify\fR(8) cache without persistent backup, specify
89
# a zero *_cache_cleanup_interval value with all Postfix
90
# instances that use the memcache, and specify the largest
91
# \fBpostscreen\fR(8) *_ttl value or \fBverify\fR(8) *_expire_time
92
# value as the memcache table's \fBttl\fR value.
94
# NOTE 2: According to memcache protocol documentation, a
95
# value greater than 30 days (2592000 seconds) specifies
97
# time. Smaller values are relative to the time of the update.
98
# MEMCACHE KEY PARAMETERS
101
# .IP "\fBkey_format (default: %s)\fB"
102
# Format of the lookup and update keys in memcache requests.
103
# By default, these are the same as the lookup and update
104
# keys that are given to the Postfix memcache client.
106
# NOTE: The \fBkey_format\fR feature is not used for \fBbackup\fR
109
# When the same memcache database is used to cache information
110
# from multiple tables, you can use the \fBkey_format\fR
111
# feature to avoid name collisions by prepending a fixed
115
# key_format = aliases:%s
116
# key_format = access:%s
119
# The \fBkey_format\fR parameter supports the following '%'
122
# .IP "\fB\fB%%\fR\fR"
123
# This is replaced by a literal '%' character.
124
# .IP "\fB\fB%s\fR\fR"
125
# This is replaced by the memcache client input key.
126
# .IP "\fB\fB%u\fR\fR"
127
# When the input key is an address of the form user@domain,
128
# \fB%u\fR is replaced by the SQL quoted local part of the
129
# address. Otherwise, \fB%u\fR is replaced by the entire
130
# search string. If the localpart is empty, a lookup is
131
# silently suppressed and returns no results (an update is
132
# skipped with a warning).
133
# .IP "\fB\fB%d\fR\fR"
134
# When the input key is an address of the form user@domain,
135
# \fB%d\fR is replaced by the domain part of the address.
136
# Otherwise, a lookup is silently suppressed and returns no
137
# results (an update is skipped with a warning).
138
# .IP "\fB\fB%[SUD]\fR\fR"
139
# The upper-case equivalents of the above expansions behave
140
# in the \fBkey_format\fR parameter identically to their
141
# lower-case counter-parts.
142
# .IP "\fB\fB%[1-9]\fR\fR"
143
# The patterns %1, %2, ... %9 are replaced by the corresponding
144
# most significant component of the input key's domain. If
145
# the input key is \fIuser@mail.example.com\fR, then %1 is
146
# \fBcom\fR, %2 is \fBexample\fR and %3 is \fBmail\fR. If the
147
# input key is unqualified or does not have enough domain
148
# components to satisfy all the specified patterns, a lookup
149
# is silently suppressed and returns no results (an update
150
# is skipped with a warning).
152
# .IP "\fBdomain (default: no domain list)\fR"
153
# This feature can significantly reduce database server load.
154
# Specify a list of domain names, paths to files, or "type:table"
156
# When specified, only fully qualified search keys with a
157
# *non-empty* localpart and a matching domain are eligible
158
# for lookup or update: bare 'user' lookups, bare domain
159
# lookups and "@domain" lookups are silently skipped (updates
160
# are skipped with a warning). Example:
163
# domain = example.com, hash:/etc/postfix/searchdomains
165
# MEMCACHE ERROR CONTROLS
168
# .IP "\fBdata_size_limit (default: 10240)\fR"
169
# The maximal memcache reply data length in bytes.
170
# .IP "\fBline_size_limit (default: 1024)\fR"
171
# The maximal memcache reply line length in bytes.
172
# .IP "\fBmax_try (default: 2)\fR"
173
# The number of times to try a memcache command before giving
174
# up. The memcache client does not retry a command when the
175
# memcache server accepts no connection.
176
# .IP "\fBretry_pause (default: 1)\fR"
177
# The time in seconds before retrying a failed memcache command.
178
# .IP "\fBtimeout (default: 2)\fR"
179
# The time limit for sending a memcache command and for
180
# receiving a memcache reply.
182
# The Postfix memcache client cannot be used for security-sensitive
183
# tables such as \fBalias_maps\fR (these may contain
184
# "\fI|command\fR and "\fI/file/name\fR" destinations), or
185
# \fBvirtual_uid_maps\fR, \fBvirtual_gid_maps\fR and
186
# \fBvirtual_mailbox_maps\fR (these specify UNIX process
187
# privileges or "\fI/file/name\fR" destinations). In a typical
188
# deployment a memcache database is writable by any process
189
# that can talk to the memcache server; in contrast,
190
# security-sensitive tables must never be writable by the
191
# unprivileged Postfix user.
193
# The Postfix memcache client requires additional configuration
194
# when used as \fBpostscreen\fR(8) or \fBverify\fR(8) cache.
195
# For details see the \fBbackup\fR and \fBttl\fR parameter
196
# discussions in the MEMCACHE MAIN PARAMETERS section above.
198
# postmap(1), Postfix lookup table manager
199
# postconf(5), configuration parameters
203
# Use "\fBpostconf readme_directory\fR" or
204
# "\fBpostconf html_directory\fR" to locate this information.
207
# DATABASE_README, Postfix lookup table overview
208
# MEMCACHE_README, Postfix memcache client guide
212
# The Secure Mailer license must be distributed with this software.
216
# Memcache support was introduced with Postfix version 2.9.
219
# IBM T.J. Watson Research
221
# Yorktown Heights, NY 10598, USA