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:
* 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
./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
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
/* 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);
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);