diff --git a/postfix/HISTORY b/postfix/HISTORY
index 815a6d9c4..c82088f23 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -13897,3 +13897,7 @@ Apologies for any names omitted.
Bugfix: the proxymap client didn't properly propagate the
postmap (postalias) -r and -w options to the proxymap server.
File: util/dict.h.
+
+ Workaround: force synchronous updates in the proxymap server
+ so that maps will be in a consistent state between updates.
+ File: proxymap/proxymap.c.
diff --git a/postfix/README_FILES/OVERVIEW b/postfix/README_FILES/OVERVIEW
index 8c95184de..cc6e83222 100644
--- a/postfix/README_FILES/OVERVIEW
+++ b/postfix/README_FILES/OVERVIEW
@@ -261,9 +261,10 @@ queues.
ination
logs
- * The proxymap(8) servers provide read-only table lookup service to Postfix
- processes. This overcomes chroot restrictions, and reduces the number of
- open lookup tables by sharing one open table among multiple processes.
+ * The proxymap(8) servers provide read-only and read-write table lookup
+ service to Postfix processes. This overcomes chroot restrictions, reduces
+ the number of open lookup tables by sharing one open table among multiple
+ processes, and implements single-updater tables.
* The scache(8) server maintains the connection cache for the Postfix smtp(8)
client. When connection caching is enabled for selected destinations, the
diff --git a/postfix/html/OVERVIEW.html b/postfix/html/OVERVIEW.html
index 62f4afece..693f082cc 100644
--- a/postfix/html/OVERVIEW.html
+++ b/postfix/html/OVERVIEW.html
@@ -532,10 +532,12 @@ ination
logs
-
The proxymap(8) servers provide read-only table lookup +
The proxymap(8) servers provide read-only and read-write +table lookup service to Postfix processes. This overcomes chroot restrictions, -and reduces the number of open lookup tables by sharing one open -table among multiple processes.
+reduces the number of open lookup tables by sharing one open +table among multiple processes, and implements single-updater +tables. The scache(8) server maintains the connection cache for
the Postfix smtp(8) client. When connection caching is enabled for
diff --git a/postfix/html/proxymap.8.html b/postfix/html/proxymap.8.html
index 11c11055d..39a39c760 100644
--- a/postfix/html/proxymap.8.html
+++ b/postfix/html/proxymap.8.html
@@ -67,7 +67,7 @@ PROXYMAP(8) PROXYMAP(8)
To implement single-updater maps, specify a process
limit of 1 in the master.cf file entry for the
- proxywrite service.
+ proxywrite service.
This request is supported in Postfix 2.5 and later.
diff --git a/postfix/man/man8/proxymap.8 b/postfix/man/man8/proxymap.8
index 74a161c16..205e967c4 100644
--- a/postfix/man/man8/proxymap.8
+++ b/postfix/man/man8/proxymap.8
@@ -64,7 +64,8 @@ The \fImaptype:mapname\fR and \fIflags\fR are the same
as with the \fBopen\fR request.
.sp
To implement single-updater maps, specify a process limit
-of 1 in the master.cf file entry for the proxywrite service.
+of 1 in the master.cf file entry for the \fBproxywrite\fR
+service.
.sp
This request is supported in Postfix 2.5 and later.
.PP
diff --git a/postfix/proto/OVERVIEW.html b/postfix/proto/OVERVIEW.html
index 2a25fc398..924f38695 100644
--- a/postfix/proto/OVERVIEW.html
+++ b/postfix/proto/OVERVIEW.html
@@ -532,10 +532,12 @@ ination
logs
-
The proxymap(8) servers provide read-only table lookup +
The proxymap(8) servers provide read-only and read-write +table lookup service to Postfix processes. This overcomes chroot restrictions, -and reduces the number of open lookup tables by sharing one open -table among multiple processes.
+reduces the number of open lookup tables by sharing one open +table among multiple processes, and implements single-updater +tables.The scache(8) server maintains the connection cache for the Postfix smtp(8) client. When connection caching is enabled for diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index dd540c643..287cba84b 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "2007111203" +#define MAIL_RELEASE_DATE "2007111204" #define MAIL_VERSION_NUMBER "2.5" #ifdef SNAPSHOT diff --git a/postfix/src/proxymap/proxymap.c b/postfix/src/proxymap/proxymap.c index a23a31031..c3b5e23d4 100644 --- a/postfix/src/proxymap/proxymap.c +++ b/postfix/src/proxymap/proxymap.c @@ -58,7 +58,8 @@ /* as with the \fBopen\fR request. /* .sp /* To implement single-updater maps, specify a process limit -/* of 1 in the master.cf file entry for the proxywrite service. +/* of 1 in the master.cf file entry for the \fBproxywrite\fR +/* service. /* .sp /* This request is supported in Postfix 2.5 and later. /* .PP @@ -302,8 +303,6 @@ static DICT *proxy_map_find(const char *map_type_name, int request_flags, request_flags); if (dict == 0) msg_panic("proxy_map_find: dict_open null result"); - if (proxy_writer) - dict->flags |= DICT_FLAG_SYNC_UPDATE; dict_register(STR(map_type_name_flags), dict); return (dict); } @@ -361,6 +360,12 @@ static void proxymap_update_service(VSTREAM *client_stream) /* * Process the request. + * + * XXX We don't close maps, so we must turn on synchronous update to ensure + * that the on-disk data is in a consistent state between updates. + * + * XXX We ignore duplicates, because the proxymap server would abort + * otherwise. */ if (attr_scan(client_stream, ATTR_FLAG_STRICT, ATTR_TYPE_STR, MAIL_ATTR_TABLE, request_map, @@ -378,7 +383,8 @@ static void proxymap_update_service(VSTREAM *client_stream) /* void */ ; } else { dict->flags = ((dict->flags & ~DICT_FLAG_RQST_MASK) - | (request_flags & DICT_FLAG_RQST_MASK)); + | (request_flags & DICT_FLAG_RQST_MASK) + | DICT_FLAG_SYNC_UPDATE | DICT_FLAG_DUP_REPLACE); dict_put(dict, STR(request_key), STR(request_value)); reply_status = PROXY_STAT_OK; }