diff --git a/postfix/HISTORY b/postfix/HISTORY index 324df9365..983a6a360 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -13123,8 +13123,8 @@ Apologies for any names omitted. 20070118 - Bugfix: match lists didn't implement !maptype:mapname. - Problem reported by Paulo Pacheco. File: util/match_list.c. + Bugfix: match lists didn't implement ![ipv6address]. Problem + reported by Paulo Pacheco. File: util/match_list.c. Cleanup: revised the matchlist "!" support, added support for !/file/name, and updated the documentation. File: diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 1505cc4d9..0849455a5 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 "20070118" +#define MAIL_RELEASE_DATE "20070119" #define MAIL_VERSION_NUMBER "2.4" #ifdef SNAPSHOT diff --git a/postfix/src/global/namadr_list.in b/postfix/src/global/namadr_list.in index 39103638a..8b6b08026 100644 --- a/postfix/src/global/namadr_list.in +++ b/postfix/src/global/namadr_list.in @@ -19,6 +19,11 @@ echo foo !bar baz >junk ./namadr_list !`pwd`/junk dummy 168.100.189.3 ./namadr_list !`pwd`/junk foo 168.100.189.3 ./namadr_list !`pwd`/junk bar 168.100.189.3 +./namadr_list !`pwd`/junk baz 168.100.189.3 +./namadr_list `pwd`/junk dummy 168.100.189.3 +./namadr_list `pwd`/junk foo 168.100.189.3 +./namadr_list `pwd`/junk bar 168.100.189.3 +./namadr_list `pwd`/junk baz 168.100.189.3 rm -f junk env foo=x ./namadr_list environ:junk foo 168.100.189.3 env foo=x ./namadr_list environ:junk bar 168.100.189.3 diff --git a/postfix/src/global/namadr_list.ref b/postfix/src/global/namadr_list.ref index 5db5ce3d8..b4ecc0bdb 100644 --- a/postfix/src/global/namadr_list.ref +++ b/postfix/src/global/namadr_list.ref @@ -18,6 +18,11 @@ dummy/168.100.189.3: NO dummy/168.100.189.3: NO foo/168.100.189.3: NO bar/168.100.189.3: YES +baz/168.100.189.3: NO +dummy/168.100.189.3: NO +foo/168.100.189.3: YES +bar/168.100.189.3: NO +baz/168.100.189.3: YES foo/168.100.189.3: YES bar/168.100.189.3: NO foo/168.100.189.3: NO diff --git a/postfix/src/util/match_list.c b/postfix/src/util/match_list.c index 0aee3cf2d..8bb6dc5a8 100644 --- a/postfix/src/util/match_list.c +++ b/postfix/src/util/match_list.c @@ -99,7 +99,7 @@ struct MATCH_LIST { /* match_list_parse - parse buffer, destroy buffer */ -static ARGV *match_list_parse(ARGV *list, char *string, int match) +static ARGV *match_list_parse(ARGV *list, char *string, int init_match) { const char *myname = "match_list_parse"; VSTRING *buf = vstring_alloc(10); @@ -109,13 +109,14 @@ static ARGV *match_list_parse(ARGV *list, char *string, int match) char *start; char *item; char *map_type_name_flags; + int match; /* * /filename contents are expanded in-line. To support !/filename we * prepend the negation operator to each item from the file. */ while ((start = mystrtok(&bp, delim)) != 0) { - for (item = start; *item == '!'; item++) + for (match = init_match, item = start; *item == '!'; item++) match = !match; if (*item == 0) msg_fatal("%s: no pattern after '!'", myname);