]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.12-20141005
authorWietse Venema <wietse@porcupine.org>
Sun, 5 Oct 2014 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Mon, 6 Oct 2014 03:44:30 +0000 (23:44 -0400)
51 files changed:
postfix/HISTORY
postfix/WISHLIST
postfix/html/master.5.html
postfix/html/pipe.8.html
postfix/html/postconf.5.html
postfix/man/man5/master.5
postfix/man/man5/postconf.5
postfix/man/man8/pipe.8
postfix/proto/master
postfix/proto/postconf.html.prolog
postfix/proto/postconf.man.prolog
postfix/proto/postconf.proto
postfix/src/global/Makefile.in
postfix/src/global/attr_override.c
postfix/src/global/mail_params.c
postfix/src/global/mail_parm_split.c [new file with mode: 0644]
postfix/src/global/mail_parm_split.h [new file with mode: 0644]
postfix/src/global/mail_parm_split.in [new file with mode: 0644]
postfix/src/global/mail_parm_split.ref [new file with mode: 0644]
postfix/src/global/mail_stream.c
postfix/src/global/mail_version.h
postfix/src/local/Makefile.in
postfix/src/local/command.c
postfix/src/master/Makefile.in
postfix/src/master/master.c
postfix/src/master/master_ent.c
postfix/src/milter/milter.c
postfix/src/pipe/Makefile.in
postfix/src/pipe/pipe.c
postfix/src/postconf/postconf_dbms.c
postfix/src/postconf/postconf_master.c
postfix/src/postdrop/Makefile.in
postfix/src/postdrop/postdrop.c
postfix/src/postfix/Makefile.in
postfix/src/postfix/postfix.c
postfix/src/postmulti/Makefile.in
postfix/src/postmulti/postmulti.c
postfix/src/postqueue/Makefile.in
postfix/src/postqueue/postqueue.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/spawn/Makefile.in
postfix/src/spawn/spawn.c
postfix/src/util/Makefile.in
postfix/src/util/dict_cidr.ref
postfix/src/util/dict_pcre.ref
postfix/src/util/dict_test.ref
postfix/src/util/extpar.c
postfix/src/util/mac_expand.c
postfix/src/util/stringops.h
postfix/src/util/surrogate.ref

index ca551051efd9114888c67c289e6e98b7d8670bc5..a1e04fd5cee358965f33c8078e1680b08b8c3b68 100644 (file)
@@ -20553,3 +20553,23 @@ Apologies for any names omitted.
        RELEASE_NOTES to postconf(5) manpage, and changed the wording
        of the BC messages. Files: RELEASE_NOTES, proto/postconf.proto,
        master/master_ent.c, smtpd/smtpd.c, trivial-rewrite/rewrite.c.
+
+20141003
+
+       Workaround: kludge for multiple paragraphs of text in indented
+       paragraphs.  Files: mantools/postconf2html, mantools/postconf2man,
+       proto/Makefile.in, proto/postconf.proto
+
+20141005
+
+       Cleanup: CHARSET_COMMA_SP, CHARSET_SPACE and CHARSET_BRACE
+       to prepare for the elimination of ad-hoc string constants.
+       File: util/sys_defs.h.
+
+       Cleanup: allow "{ name=value }" to protect whitespace in
+       import_environment and export_environment. Files:
+       proto/postconf.proto, global/mail_parm_split.c, global
+       /mail_parm_split.h, global/mail_stream.c, local/command.c,
+       master/master.c, pipe/pipe.c, postdrop/postdrop.c,
+       postfix/postfix.c, postmulti/postmulti.c, postqueue/postqueue.c,
+       spawn/spawn.c.
index f83de8edd2e561742f0cbaf36c8bdcb1ff529eb4..866327014274023cc62f8fd71223e68fd9d54576 100644 (file)
@@ -11,6 +11,10 @@ Wish list:
 
        Things to do after the stable release:
 
+       Other things that we might want to break: relay_domains,
+       parent_domain_matches_subdomains. This requires a new
+       compatibility_level.
+
        Update smtputf8_enable in postconf(5)
 
        use "static const char myname[] ..."
index 91fd30ae5c4df952c4ee2bccef4871408dade6ce..537fa9ad32c0ae094e82fd1b8c61c078196712d1 100644 (file)
@@ -124,7 +124,7 @@ MASTER(5)                                                            MASTER(5)
               The  <a href="local.8.html"><b>local</b>(8)</a>, <a href="pipe.8.html"><b>pipe</b>(8)</a>, <a href="spawn.8.html"><b>spawn</b>(8)</a>, and <a href="virtual.8.html"><b>virtual</b>(8)</a> daemons require
               privileges.
 
-       <b>Chroot (default: Postfix</b> &gt;<b>= 2.12: y, Postfix</b> &lt;<b>2.12: n)</b>
+       <b>Chroot (default: Postfix</b> &gt;<b>= 2.12: n, Postfix</b> &lt;<b>2.12: y)</b>
               Whether or not the service  runs  chrooted  to  the  mail  queue
               directory (pathname is controlled by the <b><a href="postconf.5.html#queue_directory">queue_directory</a></b> config-
               uration variable in the <a href="postconf.5.html">main.cf</a> file).
@@ -180,16 +180,19 @@ MASTER(5)                                                            MASTER(5)
                      with the <b><a href="postconf.5.html#debugger_command">debugger_command</a></b> variable in the <a href="postconf.5.html">main.cf</a> config-
                      uration file.  See <a href="DEBUG_README.html">DEBUG_README</a> for hints and tips.
 
-              <b>-o</b> <i>name</i>=<i>value</i> (short form)
+              <b>-o {</b> <i>name</i> = <i>value</i> <b>}</b> (long form, Postfix &gt;= 2.12)
 
-              <b>-o {</b> <i>name</i> = <i>value</i> <b>}</b> (Postfix 2.12 and later)
+              <b>-o</b> <i>name</i>=<i>value</i> (short form)
                      Override the named <a href="postconf.5.html">main.cf</a> configuration  parameter.  The
                      parameter  value  can  refer to other parameters as <i>$name</i>
                      etc., just like in <a href="postconf.5.html">main.cf</a>.  See <a href="postconf.5.html"><b>postconf</b>(5)</a> for  syntax.
 
-                     NOTE 1: with the "short form" shown above, do not specify
-                     whitespace around the "="  or  in  parameter  values.  To
-                     specify  a  parameter value that contains whitespace, use
+                     NOTE  1:  With  the  "long  form" shown above, whitespace
+                     after "{" and before "}" is ignored.
+
+                     NOTE 2: with the "short form" shown above, do not specify
+                     whitespace  around  the  "="  or  in parameter values. To
+                     specify a parameter value that contains  whitespace,  use
                      commas  instead  of  spaces,  or  specify  the  value  in
                      <a href="postconf.5.html">main.cf</a>. Example:
 
@@ -200,20 +203,20 @@ MASTER(5)                                                            MASTER(5)
                      /etc/postfix/<a href="postconf.5.html">main.cf</a>
                          submission_mumble = text with whitespace...
 
-                     NOTE 2: Over-zealous use of parameter overrides makes the
-                     Postfix configuration hard to  understand  and  maintain.
-                     At  a certain point, it might be easier to configure mul-
+                     NOTE 3: Over-zealous use of parameter overrides makes the
+                     Postfix  configuration  hard  to understand and maintain.
+                     At a certain point, it might be easier to configure  mul-
                      tiple instances of Postfix, instead of configuring multi-
                      ple personalities via <a href="master.5.html">master.cf</a>.
 
-              <b>-v</b>     Increase  the  verbose logging level. Specify multiple <b>-v</b>
-                     options to make a  Postfix  daemon  process  increasingly
+              <b>-v</b>     Increase the verbose logging level. Specify  multiple  <b>-v</b>
+                     options  to  make  a  Postfix daemon process increasingly
                      verbose.
 
               Other command-line arguments
                      Specify "{" and "}" around command arguments that contain
-                     whitespace (Postfix 2.12 and later).  Whitespace  immedi-
-                     ately after "{" and before "}" is ignored.
+                     whitespace (Postfix 2.12 and later). Whitespace after "{"
+                     and before "}" is ignored.
 
 <b>SEE ALSO</b>
        <a href="master.8.html">master(8)</a>, process manager
index 3e22d84a271bbf4833f6f39a356f7fc19e2a259c..4ac8e5d7c63fd522f60e64eb28ab916b8efc08b2 100644 (file)
@@ -192,8 +192,8 @@ PIPE(8)                                                                PIPE(8)
               interpreter.
 
               Specify "{" and "}" around command arguments that contain white-
-              space (Postfix 2.12 and later). Whitespace immediately after "{"
-              and before "}" is ignored.
+              space (Postfix 2.12 and later). Whitespace after "{" and  before
+              "}" is ignored.
 
               In  the command argument vector, the following macros are recog-
               nized and replaced with corresponding information from the Post-
index c395b5c39bf23f19e04bea2d1ca0cb82e8553de1..480bed9a6d53cf67e18ed4527d605ff936234a4e 100644 (file)
@@ -61,10 +61,12 @@ with "value1" when "$name" is non-empty, and with "value2" when
 "value2".  This form is supported with Postfix versions &ge; 2.12.
 </p>
 
-<li> <p> Instead of a parameter name, the first item inside "${...}"
-may be a logical expression of the form: "{value3} == {value4}"
-(equality) or "{value3} != {value4}" (inequality). This form is
-supported with Postfix versions &ge; 2.12.  </p>
+<li> <p> The first item inside "${...}" may be a logical expression
+of the form: "{value3} == {value4}". Besides the "==" (equality)
+operator Postfix supports "!=" (inequality), "&lt;", "&le;", "&ge;",
+and "&gt;". The comparison is numerical when both operands are all
+digits, otherwise the comparison is lexicographical. These forms
+are supported with Postfix versions &ge; 2.12. </p>
 
 <li> <p> Each "value" is subject to recursive named parameter and
 logical expression evaluation, except where noted.  </p>
@@ -1543,13 +1545,22 @@ global <a href="postconf.5.html#ipc_timeout">ipc_timeout</a> parameter as well.
 <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> default settings after an upgrade to a newer
 but incompatible Postfix version. </p>
 
-<p> While the backwards-compatible default settings are in effect,
-Postfix logs what services or what email would be affected by
-the incompatible change. </p>
+<p> While backwards compatibility is in effect, Postfix logs what
+services or what email would be affected by the incompatible change.
+</p>
+
+<p> As detailed below, based on this logging the system administrator
+can determine whether or not a backwards-compatible default setting
+needs to be made permanent in <a href="postconf.5.html">main.cf</a> or <a href="master.5.html">master.cf</a>.  </p>
 
-<p> Based on this logging the system administrator can determine
-whether or not a backwards-compatible default setting needs to be
-made permanent in <a href="postconf.5.html">main.cf</a> or <a href="master.5.html">master.cf</a>.  </p>
+<p> When no more backwards-compatible settings need to be made
+permanent, the administrator should turn off backwards compatibility
+by updating the <a href="postconf.5.html#compatibility_level">compatibility_level</a> setting in <a href="postconf.5.html">main.cf</a>. </p>
+
+<pre>
+# <b>postconf <a href="postconf.5.html#compatibility_level">compatibility_level</a>=1</b>
+# <b>postfix reload</b>
+</pre>
 
 <p> Changes introduced with Postfix 2.12 (compatibility level 1):</p>
 
@@ -1632,19 +1643,6 @@ setting "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = no" per
 
 </ul>
 
-<p> When no more backwards-compatible settings need to be made
-permanent, the administrator should turn off the backwards-compatible
-default settings by updating the <a href="postconf.5.html#compatibility_level">compatibility_level</a> setting in
-<a href="postconf.5.html">main.cf</a>. </p>
-
-<pre>
-# <b>postconf <a href="postconf.5.html#compatibility_level">compatibility_level</a>=1</b>
-# <b>postfix reload</b>
-</pre>
-
-<p> Future incompatible changes will require setting "<a href="postconf.5.html#compatibility_level">compatibility_level</a>
-= 2", and so on. </p>
-
 <p> This feature is available in Postfix 2.12 and later. </p>
 
 
@@ -3234,9 +3232,11 @@ time keeping on System-V-ish systems.
 
 <p>
 Specify a list of names and/or name=value pairs, separated by
-whitespace or comma. The name=value form is supported with
-Postfix version 2.1 and later.
-</p>
+whitespace or comma. Specify "{ name=value }" to protect whitespace
+or comma in parameter values (whitespace after "{" and before "}"
+is ignored). The form name=value is supported with Postfix version
+2.1 and later; the use of {} is supported with Postfix 2.12 and
+later.  </p>
 
 <p>
 Example:
@@ -3762,8 +3762,11 @@ parameters:
 </dl>
 
 <p> Specify a list of names and/or name=value pairs, separated by
-whitespace or comma. The name=value form is supported with
-Postfix version 2.1 and later.  </p>
+whitespace or comma. Specify "{ name=value }" to protect whitespace
+or comma in parameter values (whitespace after "{" and before "}"
+is ignored). The form name=value is supported with Postfix version
+2.1 and later; the use of {} is supported with Postfix 2.12 and
+later.  </p>
 
 
 </DD>
index 47f3937fca9092a8536ed47293a58b16a34e37a2..3d2f21ea537be17e29586345ffde78513bef877a 100644 (file)
@@ -126,7 +126,7 @@ main.cf file).
 .sp
 The \fBlocal\fR(8), \fBpipe\fR(8), \fBspawn\fR(8), and
 \fBvirtual\fR(8) daemons require privileges.
-.IP "\fBChroot (default: Postfix >= 2.12: y, Postfix <2.12: n)\fR"
+.IP "\fBChroot (default: Postfix >= 2.12: n, Postfix <2.12: y)\fR"
 Whether or not the service runs chrooted to the mail queue
 directory (pathname is controlled by the \fBqueue_directory\fR
 configuration variable in the main.cf file).
@@ -182,14 +182,17 @@ all daemon programs:
 Run the daemon under control by the command specified with
 the \fBdebugger_command\fR variable in the main.cf
 configuration file.  See DEBUG_README for hints and tips.
+.IP "\fB-o { \fIname\fR = \fIvalue\fB }\fR (long form, Postfix >= 2.12)"
 .IP "\fB-o \fIname\fR=\fIvalue\fR (short form)"
-.IP "\fB-o { \fIname\fR = \fIvalue\fB }\fR (Postfix 2.12 and later)"
 Override the named main.cf configuration parameter. The
 parameter value can refer to other parameters as \fI$name\fR
 etc., just like in main.cf.  See \fBpostconf\fR(5) for
 syntax.
 .sp
-NOTE 1: with the "short form" shown above, do not specify
+NOTE 1: With the "long form" shown above, whitespace
+after "{" and before "}" is ignored.
+.sp
+NOTE 2: with the "short form" shown above, do not specify
 whitespace around the "=" or in
 parameter values. To specify a parameter value that contains
 whitespace, use commas instead of spaces, or specify the
@@ -204,7 +207,7 @@ value in main.cf. Example:
     submission_mumble = text with whitespace...
 .fi
 .sp
-NOTE 2: Over-zealous use of parameter overrides makes the
+NOTE 3: Over-zealous use of parameter overrides makes the
 Postfix configuration hard to understand and maintain.  At
 a certain point, it might be easier to configure multiple
 instances of Postfix, instead of configuring multiple
@@ -214,7 +217,7 @@ Increase the verbose logging level. Specify multiple \fB-v\fR
 options to make a Postfix daemon process increasingly verbose.
 .IP "Other command-line arguments"
 Specify "{" and "}" around command arguments that contain
-whitespace (Postfix 2.12 and later). Whitespace immediately
+whitespace (Postfix 2.12 and later). Whitespace
 after "{" and before "}" is ignored.
 .SH "SEE ALSO"
 .na
index 87ba293d7158331f6c16c94619c03e3d7848ba7e..ccbb1039d37385c4cf4a339ede3e25b28623bcec 100644 (file)
@@ -49,10 +49,12 @@ when "$name" is non-empty, and with "value2" when "$name" is empty.
 The "{}" is required for "value1", optional for "value2". This form
 is supported with Postfix versions >= 2.12.
 .IP \(bu
-Instead of a parameter name, the first item inside "${...}" may be
-a logical expression of the form: "{value3} == {value4}" (equality)
-or "{value3} != {value4}" (inequality).  This form is supported
-with Postfix versions >= 2.12.
+The first item inside "${...}" may be a logical expression of the
+form: "{value3} == {value4}". Besides the "==" (equality) operator
+Postfix supports "!=" (inequality), "<", "<=", ">=", and ">". The
+comparison is numerical when both operands are all digits, otherwise
+the comparison is lexicographical. These forms are supported with
+Postfix versions >= 2.12.
 .IP \(bu
 Each "value" is subject to recursive named parameter and logical
 expression evaluation, except where noted.
@@ -894,13 +896,25 @@ A safety net that forces Postfix to run with backwards-compatible
 main.cf and master.cf default settings after an upgrade to a newer
 but incompatible Postfix version.
 .PP
-While the backwards-compatible default settings are in effect,
-Postfix logs what services or what email would be affected by
-the incompatible change.
+While backwards compatibility is in effect, Postfix logs what
+services or what email would be affected by the incompatible change.
 .PP
-Based on this logging the system administrator can determine
-whether or not a backwards-compatible default setting needs to be
-made permanent in main.cf or master.cf.
+As detailed below, based on this logging the system administrator
+can determine whether or not a backwards-compatible default setting
+needs to be made permanent in main.cf or master.cf.
+.PP
+When no more backwards-compatible settings need to be made
+permanent, the administrator should turn off backwards compatibility
+by updating the compatibility_level setting in main.cf.
+.PP
+.nf
+.na
+.ft C
+# \fBpostconf compatibility_level=1\fR
+# \fBpostfix reload\fR
+.fi
+.ad
+.ft R
 .PP
 Changes introduced with Postfix 2.12 (compatibility level 1):
 .IP \(bu
@@ -1007,23 +1021,6 @@ setting "smtputf8_enable = no" permanent in main.cf:
 .ft R
 .br
 .PP
-When no more backwards-compatible settings need to be made
-permanent, the administrator should turn off the backwards-compatible
-default settings by updating the compatibility_level setting in
-main.cf.
-.PP
-.nf
-.na
-.ft C
-# \fBpostconf compatibility_level=1\fR
-# \fBpostfix reload\fR
-.fi
-.ad
-.ft R
-.PP
-Future incompatible changes will require setting "compatibility_level
-= 2", and so on.
-.PP
 This feature is available in Postfix 2.12 and later.
 .SH config_directory (default: see "postconf -d" output)
 The default location of the Postfix main.cf and master.cf
@@ -2038,8 +2035,11 @@ to non-Postfix processes. The TZ variable is needed for sane
 time keeping on System-V-ish systems.
 .PP
 Specify a list of names and/or name=value pairs, separated by
-whitespace or comma. The name=value form is supported with
-Postfix version 2.1 and later.
+whitespace or comma. Specify "{ name=value }" to protect whitespace
+or comma in parameter values (whitespace after "{" and before "}"
+is ignored). The form name=value is supported with Postfix version
+2.1 and later; the use of {} is supported with Postfix 2.12 and
+later.
 .PP
 Example:
 .PP
@@ -2335,8 +2335,11 @@ Needed to make "\fBpostfix -c\fR" work.
 .br
 .PP
 Specify a list of names and/or name=value pairs, separated by
-whitespace or comma. The name=value form is supported with
-Postfix version 2.1 and later.
+whitespace or comma. Specify "{ name=value }" to protect whitespace
+or comma in parameter values (whitespace after "{" and before "}"
+is ignored). The form name=value is supported with Postfix version
+2.1 and later; the use of {} is supported with Postfix 2.12 and
+later.
 .SH in_flow_delay (default: 1s)
 Time to pause before accepting a new message, when the message
 arrival rate exceeds the message delivery rate. This feature is
index 41ef3f20fb65cfc1d7fdd6850a7de0c8cc29e771..e2951ed959bd80188242567a26fb774deb3059f6 100644 (file)
@@ -200,7 +200,7 @@ The command is executed directly, i.e. without interpretation of
 shell meta characters by a shell command interpreter.
 .sp
 Specify "{" and "}" around command arguments that contain
-whitespace (Postfix 2.12 and later). Whitespace immediately
+whitespace (Postfix 2.12 and later). Whitespace
 after "{" and before "}" is ignored.
 .sp
 In the command argument vector, the following macros are recognized
index a817b508b83660c956fd4ccc57b0b9284a2f372d..c6e145a5b84194e93ab98918f14a9d7f82f5661b 100644 (file)
 # .sp
 #      The \fBlocal\fR(8), \fBpipe\fR(8), \fBspawn\fR(8), and
 #      \fBvirtual\fR(8) daemons require privileges.
-# .IP "\fBChroot (default: Postfix >= 2.12: y, Postfix <2.12: n)\fR"
+# .IP "\fBChroot (default: Postfix >= 2.12: n, Postfix <2.12: y)\fR"
 #      Whether or not the service runs chrooted to the mail queue
 #      directory (pathname is controlled by the \fBqueue_directory\fR
 #      configuration variable in the main.cf file).
 #      Run the daemon under control by the command specified with
 #      the \fBdebugger_command\fR variable in the main.cf
 #      configuration file.  See DEBUG_README for hints and tips.
+# .IP "\fB-o { \fIname\fR = \fIvalue\fB }\fR (long form, Postfix >= 2.12)"
 # .IP "\fB-o \fIname\fR=\fIvalue\fR (short form)"
-# .IP "\fB-o { \fIname\fR = \fIvalue\fB }\fR (Postfix 2.12 and later)"
 #      Override the named main.cf configuration parameter. The
 #      parameter value can refer to other parameters as \fI$name\fR
 #      etc., just like in main.cf.  See \fBpostconf\fR(5) for
 #      syntax.
 # .sp
-#      NOTE 1: with the "short form" shown above, do not specify
+#      NOTE 1: With the "long form" shown above, whitespace
+#      after "{" and before "}" is ignored.
+# .sp
+#      NOTE 2: with the "short form" shown above, do not specify
 #      whitespace around the "=" or in
 #      parameter values. To specify a parameter value that contains
 #      whitespace, use commas instead of spaces, or specify the
 #          submission_mumble = text with whitespace...
 # .fi
 # .sp
-#      NOTE 2: Over-zealous use of parameter overrides makes the
+#      NOTE 3: Over-zealous use of parameter overrides makes the
 #      Postfix configuration hard to understand and maintain.  At
 #      a certain point, it might be easier to configure multiple
 #      instances of Postfix, instead of configuring multiple
 #      options to make a Postfix daemon process increasingly verbose.
 # .IP "Other command-line arguments"
 #      Specify "{" and "}" around command arguments that contain
-#      whitespace (Postfix 2.12 and later). Whitespace immediately
+#      whitespace (Postfix 2.12 and later). Whitespace
 #      after "{" and before "}" is ignored.
 # SEE ALSO
 #      master(8), process manager
index a1661f4cd1f21d0f0f6d2b797866402e10033e57..a8b415ca12943870afd1bb97dcc59cc032fbadf3 100644 (file)
@@ -61,10 +61,12 @@ with "value1" when "$name" is non-empty, and with "value2" when
 "value2".  This form is supported with Postfix versions &ge; 2.12.
 </p>
 
-<li> <p> Instead of a parameter name, the first item inside "${...}"
-may be a logical expression of the form: "{value3} == {value4}"
-(equality) or "{value3} != {value4}" (inequality). This form is
-supported with Postfix versions &ge; 2.12.  </p>
+<li> <p> The first item inside "${...}" may be a logical expression
+of the form: "{value3} == {value4}". Besides the "==" (equality)
+operator Postfix supports "!=" (inequality), "&lt;", "&le;", "&ge;",
+and "&gt;". The comparison is numerical when both operands are all
+digits, otherwise the comparison is lexicographical. These forms
+are supported with Postfix versions &ge; 2.12. </p>
 
 <li> <p> Each "value" is subject to recursive named parameter and
 logical expression evaluation, except where noted.  </p>
index ac915824c84775b042f2d2c641040926c02140d4..47c2d85604ee3aae14efa599f90c408d412c0bac 100644 (file)
@@ -49,10 +49,12 @@ when "$name" is non-empty, and with "value2" when "$name" is empty.
 The "{}" is required for "value1", optional for "value2". This form
 is supported with Postfix versions >= 2.12.
 .IP \(bu
-Instead of a parameter name, the first item inside "${...}" may be
-a logical expression of the form: "{value3} == {value4}" (equality)
-or "{value3} != {value4}" (inequality).  This form is supported
-with Postfix versions >= 2.12.
+The first item inside "${...}" may be a logical expression of the
+form: "{value3} == {value4}". Besides the "==" (equality) operator
+Postfix supports "!=" (inequality), "<", "<=", ">=", and ">". The
+comparison is numerical when both operands are all digits, otherwise
+the comparison is lexicographical. These forms are supported with
+Postfix versions >= 2.12.
 .IP \(bu
 Each "value" is subject to recursive named parameter and logical
 expression evaluation, except where noted.
index 72d91bea2556bdcf62688921e4a94972b0d34c5a..c32fd994c96ab79e0c7c0ed55a4d65659a33c1c4 100644 (file)
@@ -1429,9 +1429,11 @@ time keeping on System-V-ish systems.
 
 <p>
 Specify a list of names and/or name=value pairs, separated by
-whitespace or comma. The name=value form is supported with
-Postfix version 2.1 and later.
-</p>
+whitespace or comma. Specify "{ name=value }" to protect whitespace
+or comma in parameter values (whitespace after "{" and before "}"
+is ignored). The form name=value is supported with Postfix version
+2.1 and later; the use of {} is supported with Postfix 2.12 and
+later.  </p>
 
 <p>
 Example:
@@ -1878,8 +1880,11 @@ parameters:
 </dl>
 
 <p> Specify a list of names and/or name=value pairs, separated by
-whitespace or comma. The name=value form is supported with
-Postfix version 2.1 and later.  </p>
+whitespace or comma. Specify "{ name=value }" to protect whitespace
+or comma in parameter values (whitespace after "{" and before "}"
+is ignored). The form name=value is supported with Postfix version
+2.1 and later; the use of {} is supported with Postfix 2.12 and
+later.  </p>
 
 %PARAM in_flow_delay 1s
 
@@ -16206,13 +16211,22 @@ mail. </dd>
 main.cf and master.cf default settings after an upgrade to a newer
 but incompatible Postfix version. </p>
 
-<p> While the backwards-compatible default settings are in effect,
-Postfix logs what services or what email would be affected by
-the incompatible change. </p>
+<p> While backwards compatibility is in effect, Postfix logs what
+services or what email would be affected by the incompatible change.
+</p>
+
+<p> As detailed below, based on this logging the system administrator
+can determine whether or not a backwards-compatible default setting
+needs to be made permanent in main.cf or master.cf.  </p>
 
-<p> Based on this logging the system administrator can determine
-whether or not a backwards-compatible default setting needs to be
-made permanent in main.cf or master.cf.  </p>
+<p> When no more backwards-compatible settings need to be made
+permanent, the administrator should turn off backwards compatibility
+by updating the compatibility_level setting in main.cf. </p>
+
+<pre>
+# <b>postconf compatibility_level=1</b>
+# <b>postfix reload</b>
+</pre>
 
 <p> Changes introduced with Postfix 2.12 (compatibility level 1):</p>
 
@@ -16309,17 +16323,4 @@ setting "smtputf8_enable = no" permanent in main.cf:
 
 </ul>
 
-<p> When no more backwards-compatible settings need to be made
-permanent, the administrator should turn off the backwards-compatible
-default settings by updating the compatibility_level setting in
-main.cf. </p>
-
-<pre>
-# <b>postconf compatibility_level=1</b>
-# <b>postfix reload</b>
-</pre>
-
-<p> Future incompatible changes will require setting "compatibility_level
-= 2", and so on. </p>
-
 <p> This feature is available in Postfix 2.12 and later. </p>
index dcedc08a3ce91fea60b46dd48ff6e8e46b1316db..ae1c9338622d2374642a8ae72343512a17f9f177 100644 (file)
@@ -33,7 +33,7 @@ SRCS  = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \
        smtp_reply_footer.c safe_ultostr.c verify_sender_addr.c \
        dict_memcache.c mail_version.c memcache_proto.c server_acl.c \
        mkmap_fail.c haproxy_srvr.c dsn_filter.c dynamicmaps.c uxtext.c \
-       smtputf8.c mail_conf_over.c
+       smtputf8.c mail_conf_over.c mail_parm_split.c
 OBJS   = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
        canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \
        clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \
@@ -68,7 +68,7 @@ OBJS  = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
        smtp_reply_footer.o safe_ultostr.o verify_sender_addr.o \
        dict_memcache.o mail_version.o memcache_proto.o server_acl.o \
        mkmap_fail.o haproxy_srvr.o dsn_filter.o dynamicmaps.o uxtext.o \
-       smtputf8.o attr_override.o $(NON_PLUGIN_MAP_OBJ)
+       smtputf8.o attr_override.o mail_parm_split.o $(NON_PLUGIN_MAP_OBJ)
 # MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf.
 # When hard-linking these maps, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
 # otherwise it sets the PLUGIN_* macros.
@@ -101,7 +101,7 @@ HDRS        = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \
        addr_match_list.h smtp_reply_footer.h safe_ultostr.h \
        verify_sender_addr.h dict_memcache.h memcache_proto.h server_acl.h \
        haproxy_srvr.h dsn_filter.h dynamicmaps.h uxtext.h smtputf8.h \
-       attr_override.h
+       attr_override.h mail_parm_split.h
 TESTSRC        = rec2stream.c stream2rec.c recdump.c
 DEFS   = -I. -I$(INC_DIR) -D$(SYSTYPE)
 CFLAGS = $(DEBUG) $(OPT) $(DEFS)
@@ -115,7 +115,7 @@ TESTPROG= domain_list dot_lockfile mail_addr_crunch mail_addr_find \
        verify_clnt xtext anvil_clnt scache ehlo_mask \
        valid_mailhost_addr own_inet_addr header_body_checks \
        data_redirect addr_match_list safe_ultostr verify_sender_addr \
-       mail_version mail_dict server_acl uxtext
+       mail_version mail_dict server_acl uxtext mail_parm_split
 
 LIBS   = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
 LIB_DIR        = ../../lib
@@ -365,11 +365,14 @@ mail_dict: mail_dict.c $(LIB) $(LIBS)
 server_acl: server_acl.c $(LIB) $(LIBS)
        $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
 
+mail_parm_split: mail_parm_split.c $(LIB) $(LIBS)
+       $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
+
 tests: tok822_test mime_tests strip_addr_test tok822_limit_test \
        xtext_test scache_multi_test ehlo_mask_test \
        namadr_list_test mail_conf_time_test header_body_checks_tests \
        mail_version_test server_acl_test resolve_local_test maps_test \
-       safe_ultostr_test
+       safe_ultostr_test mail_parm_split_test
 
 mime_tests: mime_test mime_nest mime_8bit mime_dom mime_trunc mime_cvt \
        mime_cvt2 mime_cvt3 mime_garb1 mime_garb2 mime_garb3 mime_garb4
@@ -629,6 +632,11 @@ header_body_checks_replace_test: header_body_checks header_body_checks_replace.r
        cmp header_body_checks_replace.ref header_body_checks_replace.tmp
        rm -f header_body_checks_replace.tmp header_body_checks_head header_body_checks_mime header_body_checks_nest header_body_checks_body
 
+mail_parm_split_test: mail_parm_split mail_parm_split.in mail_parm_split.ref
+       $(SHLIB_ENV) ./mail_parm_split <mail_parm_split.in >mail_parm_split.tmp 2>&1
+       diff mail_parm_split.ref mail_parm_split.tmp
+       rm -f mail_parm_split.tmp
+
 printfck: $(OBJS) $(PROG)
        rm -rf printfck
        mkdir printfck
@@ -996,8 +1004,26 @@ dict_memcache.o: dict_memcache.c
 dict_memcache.o: dict_memcache.h
 dict_memcache.o: memcache_proto.h
 dict_memcache.o: string_list.h
+dict_mysql.o: ../../include/argv.h
+dict_mysql.o: ../../include/dict.h
+dict_mysql.o: ../../include/events.h
+dict_mysql.o: ../../include/find_inet.h
+dict_mysql.o: ../../include/match_list.h
+dict_mysql.o: ../../include/msg.h
+dict_mysql.o: ../../include/myflock.h
+dict_mysql.o: ../../include/mymalloc.h
+dict_mysql.o: ../../include/myrand.h
+dict_mysql.o: ../../include/split_at.h
+dict_mysql.o: ../../include/stringops.h
 dict_mysql.o: ../../include/sys_defs.h
+dict_mysql.o: ../../include/vbuf.h
+dict_mysql.o: ../../include/vstream.h
+dict_mysql.o: ../../include/vstring.h
+dict_mysql.o: cfg_parser.h
+dict_mysql.o: db_common.h
 dict_mysql.o: dict_mysql.c
+dict_mysql.o: dict_mysql.h
+dict_mysql.o: string_list.h
 dict_pgsql.o: ../../include/argv.h
 dict_pgsql.o: ../../include/dict.h
 dict_pgsql.o: ../../include/events.h
@@ -1559,6 +1585,16 @@ mail_params.o: mynetworks.h
 mail_params.o: own_inet_addr.h
 mail_params.o: recipient_list.h
 mail_params.o: verp_sender.h
+mail_parm_split.o: ../../include/argv.h
+mail_parm_split.o: ../../include/msg.h
+mail_parm_split.o: ../../include/mymalloc.h
+mail_parm_split.o: ../../include/stringops.h
+mail_parm_split.o: ../../include/sys_defs.h
+mail_parm_split.o: ../../include/vbuf.h
+mail_parm_split.o: ../../include/vstring.h
+mail_parm_split.o: mail_params.h
+mail_parm_split.o: mail_parm_split.c
+mail_parm_split.o: mail_parm_split.h
 mail_pathname.o: ../../include/attr.h
 mail_pathname.o: ../../include/iostuff.h
 mail_pathname.o: ../../include/stringops.h
@@ -1612,6 +1648,7 @@ mail_stream.o: ../../include/vstring.h
 mail_stream.o: ../../include/warn_stat.h
 mail_stream.o: cleanup_user.h
 mail_stream.o: mail_params.h
+mail_stream.o: mail_parm_split.h
 mail_stream.o: mail_proto.h
 mail_stream.o: mail_queue.h
 mail_stream.o: mail_stream.c
index 57f0aa11156da91edbc4d1cfa471c83bd3b2fc5d..8976d2c0320d3bab0ca405fae209fe66482d2784 100644 (file)
@@ -102,7 +102,7 @@ void    attr_override(char *cp, const char *sep, const char *parens,...)
      * Get the lookup tables and assignment targets.
      */
     va_start(ap, parens);
-    while ((idx = va_arg(ap, int)) != 0) {
+    while ((idx = va_arg(ap, int)) != ATTR_OVER_END) {
        switch (idx) {
        case ATTR_OVER_INT_TABLE:
            if (int_table)
@@ -146,7 +146,7 @@ void    attr_override(char *cp, const char *sep, const char *parens,...)
         */
        /* { name = value } */
        if (*nameval == parens[0]
-           && (err = extpar(&nameval, parens, EXPAR_FLAG_NONE)) != 0)
+           && (err = extpar(&nameval, parens, EXTPAR_FLAG_NONE)) != 0)
            msg_fatal("%s in \"%s\"", err, nameval);
        if ((err = split_nameval(nameval, &key, &value)) != 0)
            msg_fatal("malformed option: %s: \"...%s...\"", err, nameval);
index 318fbe2cd38c88f6f9b7643bf72eb327ff517521..36a26832185e52c3d5211aac03a971f04ae847fb 100644 (file)
@@ -567,9 +567,14 @@ static void check_legacy_defaults(void)
      * when the compatibility level changed for the first time, from 0 to 1.
      */
     if (var_compat_level < 1) {
-       /* Should inet_protocols also be listed here? */
        if (mail_conf_lookup(VAR_APP_DOT_MYDOMAIN) == 0)
            warn_compat_break_app_dot_mydomain = 1;
+
+       /*
+        * Not: #ifndef NO_EAI. They must configure SMTPUTF8_ENABLE=no if a
+        * warning message is logged, so that they don't suddenly start to
+        * lose mail after Postfix is built with EAI support.
+        */
        if (mail_conf_lookup(VAR_SMTPUTF8_ENABLE) == 0)
            warn_compat_break_smtputf8_enable = 1;
        warn_compat_break_chroot = 1;
diff --git a/postfix/src/global/mail_parm_split.c b/postfix/src/global/mail_parm_split.c
new file mode 100644 (file)
index 0000000..0b206d0
--- /dev/null
@@ -0,0 +1,123 @@
+/*++
+/* NAME
+/*     mail_parm_split 3
+/* SUMMARY
+/*     split parameter list value
+/* SYNOPSIS
+/*     #include <mail_parm_split.h>
+/*
+/*     ARGV    *mail_parm_split(
+/*     cost char *name,
+/*     const char *value)
+/* DESCRIPTION
+/*     mail_parm_split() splits a parameter list value into its
+/*     elements, and extracts text from inside {}. It uses
+/*     CHARS_COMMA_SP as list element delimiters, and CHARS_BRACE
+/*     for grouping.
+/*
+/*     Arguments:
+/* .IP name
+/*     Parameter name. This is used to privode context for
+/*     error messages.
+/* .IP value
+/*     Parameter value.
+/* DIAGNOSTICS
+/*     fatal: syntax error while extracting text from {}.
+/* SEE ALSO
+/*     argv_splitq(3), string array utilities
+/*     extpar(3), extract text from parentheses
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+ /*
+  * System library.
+  */
+#include <sys_defs.h>
+
+ /*
+  * Utility library.
+  */
+#include <msg.h>
+#include <mymalloc.h>
+#include <stringops.h>
+
+ /*
+  * Global library.
+  */
+#include <mail_params.h>
+#include <mail_parm_split.h>
+
+ /*
+  * While testing, do not terminate the program after a syntax error.
+  */
+#ifdef TEST
+#undef msg_fatal
+#define msg_fatal msg_warn
+#endif
+
+/* mail_parm_split - split list, extract {text}, errors are fatal */
+
+ARGV   *mail_parm_split(const char *name, const char *value)
+{
+    ARGV   *argvp = argv_alloc(1);
+    char   *saved_string = mystrdup(value);
+    char   *bp = saved_string;
+    char   *arg;
+    const char *err;
+
+    /*
+     * The code that detects the error shall either signal or handle the
+     * error. In this case, mystrtokq() detects no error, extpar() signals
+     * the error to its caller, and this function handles the error.
+     */
+    while ((arg = mystrtokq(&bp, CHARS_COMMA_SP, CHARS_BRACE)) != 0) {
+       if (*arg == CHARS_BRACE[0]
+           && (err = extpar(&arg, CHARS_BRACE, EXTPAR_FLAG_STRIP)) != 0)
+           msg_fatal("%s: %s", name, err);
+       argv_add(argvp, arg, (char *) 0);
+    }
+    argv_terminate(argvp);
+    myfree(saved_string);
+    return (argvp);
+}
+
+#ifdef TEST
+
+ /*
+  * This function is security-critical so it better have a unit-test driver.
+  */
+#include <string.h>
+#include <vstream.h>
+#include <vstream.h>
+#include <vstring_vstream.h>
+
+int     main(void)
+{
+    VSTRING *vp = vstring_alloc(100);
+    ARGV   *argv;
+    char   *start;
+    char   *str;
+    char  **cpp;
+
+    while (vstring_fgets_nonl(vp, VSTREAM_IN) && VSTRING_LEN(vp) > 0) {
+       start = vstring_str(vp);
+       vstream_printf("Input:\t>%s<\n", start);
+       vstream_fflush(VSTREAM_OUT);
+       argv = mail_parm_split("stdin", start);
+       for (cpp = argv->argv; (str = *cpp) != 0; cpp++)
+           vstream_printf("Output:\t>%s<\n", str);
+       argv_free(argv);
+       vstream_fflush(VSTREAM_OUT);
+    }
+    return (0);
+}
+
+#endif
diff --git a/postfix/src/global/mail_parm_split.h b/postfix/src/global/mail_parm_split.h
new file mode 100644 (file)
index 0000000..cc278d8
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef _MAIL_PARM_SPLIT_H_INCLUDED_
+#define _MAIL_PARM_SPLIT_H_INCLUDED_
+
+/*++
+/* NAME
+/*     mail_parm_split 3h
+/* SUMMARY
+/*     split parameter list value
+/* SYNOPSIS
+/*     #include <mail_parm_split.h>
+/* DESCRIPTION
+/* .nf
+
+#endif
+
+ /*
+  * Utility library.
+  */
+#include <argv.h>
+
+ /*
+  * External interface. For consistency, the separator and grouping character
+  * sets are not passed as parameters.
+  */
+extern ARGV *mail_parm_split(const char *, const char *);
+
+#define MAIL_PARM_FLAG_NONE    0
+#define MAIL_PARM_FLAG_EXTRACT (1<<0)
+#define MAIL_PARM_FLAG_ALL     (1<<0)
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
diff --git a/postfix/src/global/mail_parm_split.in b/postfix/src/global/mail_parm_split.in
new file mode 100644 (file)
index 0000000..22e0d2b
--- /dev/null
@@ -0,0 +1,6 @@
+TZ PATH=/bin:/usr/bin XAUTHORITY
+TZ { LESS=-m -C -s -f -e } XAUTHORITY
+{ LESS=-m -C -s -f -e } TZ XAUTHORITY
+TZ XAUTHORITY { LESS=-m -C -s -f -e }
+TZ { LESS=-m -C -s -f -e  XAUTHORITY
+TZ { LESS=-m -C -s -f -e }x XAUTHORITY
diff --git a/postfix/src/global/mail_parm_split.ref b/postfix/src/global/mail_parm_split.ref
new file mode 100644 (file)
index 0000000..e85adeb
--- /dev/null
@@ -0,0 +1,25 @@
+Input: >TZ PATH=/bin:/usr/bin XAUTHORITY<
+Output:        >TZ<
+Output:        >PATH=/bin:/usr/bin<
+Output:        >XAUTHORITY<
+Input: >TZ { LESS=-m -C -s -f -e } XAUTHORITY<
+Output:        >TZ<
+Output:        >LESS=-m -C -s -f -e<
+Output:        >XAUTHORITY<
+Input: >{ LESS=-m -C -s -f -e } TZ XAUTHORITY<
+Output:        >LESS=-m -C -s -f -e<
+Output:        >TZ<
+Output:        >XAUTHORITY<
+Input: >TZ XAUTHORITY { LESS=-m -C -s -f -e }<
+Output:        >TZ<
+Output:        >XAUTHORITY<
+Output:        >LESS=-m -C -s -f -e<
+Input: >TZ { LESS=-m -C -s -f -e  XAUTHORITY<
+unknown: warning: stdin: missing '}' in "{ LESS=-m -C -s -f -e  XAUTHORITY"
+Output:        >TZ<
+Output:        >LESS=-m -C -s -f -e  XAUTHORITY<
+Input: >TZ { LESS=-m -C -s -f -e }x XAUTHORITY<
+unknown: warning: stdin: syntax error after '}' in "{ LESS=-m -C -s -f -e }x"
+Output:        >TZ<
+Output:        >LESS=-m -C -s -f -e<
+Output:        >XAUTHORITY<
index 401262a5897f7ca2b30c63baf5c4dcd71c65bec9..40a644f47e8143dd47a472e90d45aeccd5f1dd3a 100644 (file)
 #include <opened.h>
 #include <mail_params.h>
 #include <mail_stream.h>
+#include <mail_parm_split.h>
 
 /* Application-specific. */
 
@@ -478,7 +479,7 @@ MAIL_STREAM *mail_stream_command(const char *command)
      * talking a Postfix-internal protocol there is no way we can tell what
      * is being executed except by duplicating a lot of existing code.
      */
-    export_env = argv_split(var_export_environ, ", \t\r\n");
+    export_env = mail_parm_split(VAR_EXPORT_ENVIRON, var_export_environ);
     while ((stream = vstream_popen(O_RDWR,
                                   VSTREAM_POPEN_COMMAND, command,
                                   VSTREAM_POPEN_EXPORT, export_env->argv,
index 66d55e7fc623b56a19751f2a689b8aa45d3beb60..6ac508a4bcba190cc381d654517c0e7ac9f9a4f4 100644 (file)
@@ -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      "20141002"
+#define MAIL_RELEASE_DATE      "20141005"
 #define MAIL_VERSION_NUMBER    "2.12"
 
 #ifdef SNAPSHOT
index 552b00efcb7f805af851617d41e03c829a126e07..041513f05863d9126363f8eac5eb843c2080c1a3 100644 (file)
@@ -154,6 +154,7 @@ command.o: ../../include/htable.h
 command.o: ../../include/mac_parse.h
 command.o: ../../include/mail_copy.h
 command.o: ../../include/mail_params.h
+command.o: ../../include/mail_parm_split.h
 command.o: ../../include/maps.h
 command.o: ../../include/mbox_conf.h
 command.o: ../../include/msg.h
@@ -163,6 +164,7 @@ command.o: ../../include/pipe_command.h
 command.o: ../../include/recipient_list.h
 command.o: ../../include/resolve_clnt.h
 command.o: ../../include/sent.h
+command.o: ../../include/stringops.h
 command.o: ../../include/sys_defs.h
 command.o: ../../include/tok822.h
 command.o: ../../include/vbuf.h
index b2755679952a691abacb032bd71106d7cc124f53..04fcc0d4321873fe7bd217cfa181d15dd8deac4a 100644 (file)
@@ -74,6 +74,7 @@
 #include <pipe_command.h>
 #include <mail_copy.h>
 #include <dsn_util.h>
+#include <mail_parm_split.h>
 
 /* Application-specific. */
 
@@ -193,7 +194,7 @@ int     deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, const char *comma
      * Evaluate the command execution directory. Defer delivery if expansion
      * fails.
      */
-    export_env = argv_split(var_export_environ, ", \t\r\n");
+    export_env = mail_parm_split(VAR_EXPORT_ENVIRON, var_export_environ);
     exec_dir = vstring_alloc(10);
     expand_status = local_expand(exec_dir, var_exec_directory,
                                 &state, &usr_attr, var_exec_exp_filter);
index 32e969d6b64855eae5157af56453e9cd824b7365..dff0db24897f0e6b4fd722481565f99a29e33e23 100644 (file)
@@ -142,6 +142,7 @@ master.o: ../../include/inet_proto.h
 master.o: ../../include/iostuff.h
 master.o: ../../include/mail_conf.h
 master.o: ../../include/mail_params.h
+master.o: ../../include/mail_parm_split.h
 master.o: ../../include/mail_task.h
 master.o: ../../include/mail_version.h
 master.o: ../../include/msg.h
index a9d5d1b2f7ca8340b5d3159f4765612fc83a986b..488e8ed4c77d62534fd26d1063cc3b3ed616f745 100644 (file)
 #include <mail_conf.h>
 #include <open_lock.h>
 #include <inet_proto.h>
+#include <mail_parm_split.h>
 
 /* Application-specific. */
 
@@ -428,7 +429,7 @@ int     main(int argc, char **argv)
      * Environment import filter, to enforce consistent behavior whether
      * Postfix is started by hand, or at system boot time.
      */
-    import_env = argv_split(var_import_environ, ", \t\r\n");
+    import_env = mail_parm_split(VAR_IMPORT_ENVIRON, var_import_environ);
     clean_env(import_env->argv);
     argv_free(import_env);
 
index 25fa2682391849cddaa1ff096920953d84209891..5671e5e28cac14ed02c7305acd7f29e74ac71cb4 100644 (file)
@@ -557,7 +557,7 @@ MASTER_SERV *get_master_ent()
            vstring_str(vstring_sprintf(junk, "%d", serv->listen_fd_count)),
                 (char *) 0);
     while ((cp = mystrtokq(&bufp, master_blanks, "{}")) != 0) {
-       if (*cp == '{' && (err = extpar(&cp, "{}", EXPAR_FLAG_STRIP)) != 0)
+       if (*cp == '{' && (err = extpar(&cp, "{}", EXTPAR_FLAG_STRIP)) != 0)
            msg_fatal("%s: line %d: %s",
                      VSTREAM_PATH(master_fp), master_line, err);
        argv_add(serv->args, cp, (char *) 0);
index addd436df03e99988ae7cee1ef68c61a9833d6e0..87dad812aafe4588d254ccf1c6ac62dcbbac0b99 100644 (file)
@@ -614,7 +614,7 @@ MILTERS *milter_new(const char *names,
            my_def_action = def_action;
            if (name[0] == '{') {               /* } */
                op = name;
-               if ((err = extpar(&op, parens, EXPAR_FLAG_NONE)) != 0)
+               if ((err = extpar(&op, parens, EXTPAR_FLAG_NONE)) != 0)
                    msg_fatal("milter service syntax error: %s", err);
                if ((name = mystrtok(&op, sep)) == 0)
                    msg_fatal("empty milter definition: \"%s\"", names);
index 9763faa49c490bed8fc94db6ca63eab6db9db850..4818d7644a2bea420a21240df1088dd4fbdb81ea 100644 (file)
@@ -80,6 +80,7 @@ pipe.o: ../../include/mail_addr.h
 pipe.o: ../../include/mail_conf.h
 pipe.o: ../../include/mail_copy.h
 pipe.o: ../../include/mail_params.h
+pipe.o: ../../include/mail_parm_split.h
 pipe.o: ../../include/mail_server.h
 pipe.o: ../../include/mail_version.h
 pipe.o: ../../include/msg.h
index 8baa662ed9255e0f0ddb8a7eb01ed15dd45dcd81..0bd4606508ec9347c44af6a284b341e24407ceef 100644 (file)
 /*     shell meta characters by a shell command interpreter.
 /* .sp
 /*     Specify "{" and "}" around command arguments that contain
-/*     whitespace (Postfix 2.12 and later). Whitespace immediately
+/*     whitespace (Postfix 2.12 and later). Whitespace
 /*     after "{" and before "}" is ignored.
 /* .sp
 /*     In the command argument vector, the following macros are recognized
 #include <sys_exits.h>
 #include <delivered_hdr.h>
 #include <fold_addr.h>
+#include <mail_parm_split.h>
 
 /* Single server skeleton. */
 
@@ -1266,7 +1267,7 @@ static int deliver_message(DELIVER_REQUEST *request, char *service, char **argv)
        DELIVER_MSG_CLEANUP();
        return (deliver_status);
     }
-    export_env = argv_split(var_export_environ, ", \t\r\n");
+    export_env = mail_parm_split(VAR_EXPORT_ENVIRON, var_export_environ);
 
     command_status = pipe_command(request->fp, why,
                                  PIPE_CMD_UID, attr.uid,
index 2f747912f8e19e5c043ca9f1984826c0eb10ee8e..97405194e4d31c6716a02bf49e88b81194ca0569 100644 (file)
@@ -181,7 +181,7 @@ static void pcf_register_dbms_helper(char *str_value,
         */
        if (prefix != 0 && *prefix != '/' && *prefix != '.') {
            if (*prefix == '{') {               /* } */
-               if ((err = extpar(&prefix, "{}", EXPAR_FLAG_NONE)) != 0) {
+               if ((err = extpar(&prefix, "{}", EXTPAR_FLAG_NONE)) != 0) {
                    /* XXX Encapsulate this in pcf_warn() function. */
                    if (local_scope)
                        msg_warn("%s:%s: %s",
index ac4feed44ae382acad0faa4415e318487a0fe0ef..481c35730db205bbd92e19bca86a95841c0ea6d9 100644 (file)
@@ -199,7 +199,7 @@ static void pcf_extract_field(ARGV *argv, int field, const char *parens)
     char   *arg = argv->argv[field];
     char   *err;
 
-    if ((err = extpar(&arg, parens, EXPAR_FLAG_STRIP)) != 0) {
+    if ((err = extpar(&arg, parens, EXTPAR_FLAG_STRIP)) != 0) {
        msg_warn("%s: %s", MASTER_CONF_FILE, err);
        myfree(err);
     }
index 9559943357b4ed48183df1f99a8c1b3864c30970..4f99efb5f1304187c002ccd4d54f66626e83fa1b 100644 (file)
@@ -66,6 +66,7 @@ postdrop.o: ../../include/iostuff.h
 postdrop.o: ../../include/mail_conf.h
 postdrop.o: ../../include/mail_dict.h
 postdrop.o: ../../include/mail_params.h
+postdrop.o: ../../include/mail_parm_split.h
 postdrop.o: ../../include/mail_proto.h
 postdrop.o: ../../include/mail_queue.h
 postdrop.o: ../../include/mail_stream.h
index 24a0f117d145bfadfd0f8df6e3f4f80964a933e6..437e8b3a4c63a7613cda50f8b04f896b27310cef 100644 (file)
 #include <mail_dict.h>
 #include <user_acl.h>
 #include <rec_attr_map.h>
+#include <mail_parm_split.h>
 
 /* Application-specific. */
 
@@ -329,7 +330,7 @@ int     main(int argc, char **argv)
      * This program is installed with setgid privileges. Strip the process
      * environment so that we don't have to trust the C library.
      */
-    import_env = argv_split(var_import_environ, ", \t\r\n");
+    import_env = mail_parm_split(VAR_IMPORT_ENVIRON, var_import_environ);
     clean_env(import_env->argv);
     argv_free(import_env);
 
index 4b72df12f8c54d4564403022b332a62f5170d1c5..2b4281d35dbcb9375bff1bc78817b4cbe20dda50 100644 (file)
@@ -66,6 +66,7 @@ postfix.o: ../../include/argv.h
 postfix.o: ../../include/clean_env.h
 postfix.o: ../../include/mail_conf.h
 postfix.o: ../../include/mail_params.h
+postfix.o: ../../include/mail_parm_split.h
 postfix.o: ../../include/mail_version.h
 postfix.o: ../../include/msg.h
 postfix.o: ../../include/msg_syslog.h
index c9c0e435b2c6e8e243eb565c714278a2a4552501..b36a07fe951a39a19f3ee687d4ee82afef606f94 100644 (file)
 #include <mail_conf.h>
 #include <mail_params.h>
 #include <mail_version.h>
+#include <mail_parm_split.h>
 
 /* Additional installation parameters. */
 
@@ -515,7 +516,7 @@ int     main(int argc, char **argv)
      * because some shell scripts use environment settings to override
      * main.cf settings.
      */
-    import_env = argv_split(var_import_environ, ", \t\r\n");
+    import_env = mail_parm_split(VAR_IMPORT_ENVIRON, var_import_environ);
     clean_env(import_env->argv);
     argv_free(import_env);
 
index b37583ef84edf4924f514da93cff015eadbb089e..059fcfea55b5c9f9e9a5d7d4cc6d9773446e617a 100644 (file)
@@ -67,6 +67,7 @@ postmulti.o: ../../include/clean_env.h
 postmulti.o: ../../include/htable.h
 postmulti.o: ../../include/mail_conf.h
 postmulti.o: ../../include/mail_params.h
+postmulti.o: ../../include/mail_parm_split.h
 postmulti.o: ../../include/mail_version.h
 postmulti.o: ../../include/msg.h
 postmulti.o: ../../include/msg_syslog.h
index 1dd13997bebd5439145baa6daf730597c3062264..3c24d33c0b6c65383bf4875c3f3e3835c5e6e67d 100644 (file)
 #include <mail_version.h>
 #include <mail_params.h>
 #include <mail_conf.h>
+#include <mail_parm_split.h>
 
 /* Application-specific. */
 
@@ -1207,7 +1208,7 @@ static void export_helper_environment(INSTANCE *target, int export_flags)
      * because some shell scripts use environment settings to override
      * main.cf settings.
      */
-    import_env = argv_split(var_import_environ, ", \t\r\n");
+    import_env = mail_parm_split(VAR_IMPORT_ENVIRON, var_import_environ);
     clean_env(import_env->argv);
     argv_free(import_env);
 
index 6ba697223c48afd80a316fdfeb7278f54ecb53c2..4c4c3d4d5526a3e2feebb4b88ede4b2e9f4d7de2 100644 (file)
@@ -69,6 +69,7 @@ postqueue.o: ../../include/mail_conf.h
 postqueue.o: ../../include/mail_dict.h
 postqueue.o: ../../include/mail_flush.h
 postqueue.o: ../../include/mail_params.h
+postqueue.o: ../../include/mail_parm_split.h
 postqueue.o: ../../include/mail_proto.h
 postqueue.o: ../../include/mail_queue.h
 postqueue.o: ../../include/mail_run.h
@@ -80,6 +81,7 @@ postqueue.o: ../../include/msg_vstream.h
 postqueue.o: ../../include/mymalloc.h
 postqueue.o: ../../include/safe.h
 postqueue.o: ../../include/smtp_stream.h
+postqueue.o: ../../include/stringops.h
 postqueue.o: ../../include/sys_defs.h
 postqueue.o: ../../include/user_acl.h
 postqueue.o: ../../include/valid_hostname.h
index 15308367e7d653e6b415c5fa53c30affa0dfb9f2..c12b3ffdacab66918ec73c7c0db76559e2c49f39 100644 (file)
 #include <user_acl.h>
 #include <valid_mailhost_addr.h>
 #include <mail_dict.h>
+#include <mail_parm_split.h>
 
 /* Application-specific. */
 
@@ -547,7 +548,7 @@ int     main(int argc, char **argv)
      * directory info when the mail system is down.
      */
     if (geteuid() != 0) {
-       import_env = argv_split(var_import_environ, ", \t\r\n");
+       import_env = mail_parm_split(VAR_IMPORT_ENVIRON, var_import_environ);
        clean_env(import_env->argv);
        argv_free(import_env);
     }
index 38b67a7c1674611093433b46b2d0a02ae92e0310..2e48c4fa1aa7c1acac88cacac22658ceebffa3d5 100644 (file)
@@ -2491,10 +2491,16 @@ static int mail_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
                             "send unicode address");
            return (-1);
        }
+
+       /*
+        * Not: #ifndef NO_EAI. They must configure SMTPUTF8_ENABLE=no if a
+        * warning message is logged, so that they don't suddenly start to
+        * lose mail after Postfix is built with EAI support.
+        */
        if (warn_compat_break_smtputf8_enable)
-           msg_info("using backwards-compatible default setting " 
+           msg_info("using backwards-compatible default setting "
                     VAR_SMTPUTF8_ENABLE "=no to accept non-ASCII sender "
-                    "address \"%s\" from %s (" VAR_COMPAT_LEVEL "<1)", 
+                    "address \"%s\" from %s (" VAR_COMPAT_LEVEL "<1)",
                     STR(state->addr_buf), state->namaddr);
     }
 
@@ -2749,10 +2755,16 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
                             "send unicode address");
            return (-1);
        }
+
+       /*
+        * Not: #ifndef NO_EAI. They must configure SMTPUTF8_ENABLE=no if a
+        * warning message is logged, so that they don't suddenly start to
+        * lose mail after Postfix is built with EAI support.
+        */
        if (warn_compat_break_smtputf8_enable)
-           msg_info("using backwards-compatible default setting " 
+           msg_info("using backwards-compatible default setting "
                     VAR_SMTPUTF8_ENABLE "=no to accept non-ASCII recipient "
-                    "address \"%s\" from %s (" VAR_COMPAT_LEVEL "<1)", 
+                    "address \"%s\" from %s (" VAR_COMPAT_LEVEL "<1)",
                     STR(state->addr_buf), state->namaddr);
     }
     if (SMTPD_STAND_ALONE(state) == 0) {
index 94a06e0a1e7e9f4fc8a82d36062c387b69b7b2c7..15784e7372095bf43b8d0594f12db5933d1aa9c4 100644 (file)
@@ -538,7 +538,7 @@ static void policy_client_register(const char *name)
 
        if (*name == '{') {                     /* } */
            cp = saved_name = mystrdup(name);
-           if ((err = extpar(&cp, parens, EXPAR_FLAG_NONE)) != 0)
+           if ((err = extpar(&cp, parens, EXTPAR_FLAG_NONE)) != 0)
                msg_fatal("policy service syntax error: %s", cp);
            if ((policy_name = mystrtok(&cp, sep)) == 0)
                msg_fatal("empty policy service: \"%s\"", name);
index b4800556390a0e0d43fa2c820e9bb55c129e6efa..6636fac591d9e286bbb8fac25014fd189fcb3f9d 100644 (file)
@@ -63,6 +63,7 @@ spawn.o: ../../include/argv.h
 spawn.o: ../../include/dict.h
 spawn.o: ../../include/mail_conf.h
 spawn.o: ../../include/mail_params.h
+spawn.o: ../../include/mail_parm_split.h
 spawn.o: ../../include/mail_server.h
 spawn.o: ../../include/mail_version.h
 spawn.o: ../../include/msg.h
@@ -71,6 +72,7 @@ spawn.o: ../../include/mymalloc.h
 spawn.o: ../../include/set_eugid.h
 spawn.o: ../../include/spawn_command.h
 spawn.o: ../../include/split_at.h
+spawn.o: ../../include/stringops.h
 spawn.o: ../../include/sys_defs.h
 spawn.o: ../../include/timed_wait.h
 spawn.o: ../../include/vbuf.h
index 37fdcac7445aa1bb9a1f0a7b5eb84940581f3efa..c44ebcdfcddd4c820ff7f5d54e1db7371e470e9a 100644 (file)
 #include <mail_params.h>
 #include <mail_server.h>
 #include <mail_conf.h>
+#include <mail_parm_split.h>
 
 /* Application-specific. */
 
@@ -296,7 +297,7 @@ static void spawn_service(VSTREAM *client_stream, char *service, char **argv)
     /*
      * Execute the command.
      */
-    export_env = argv_split(var_export_environ, ", \t\r\n");
+    export_env = mail_parm_split(VAR_EXPORT_ENVIRON, var_export_environ);
     status = spawn_command(SPAWN_CMD_STDIN, vstream_fileno(client_stream),
                           SPAWN_CMD_STDOUT, vstream_fileno(client_stream),
                           SPAWN_CMD_STDERR, vstream_fileno(client_stream),
index 9d85f46dc76c4a90f6423a3acbd8b7bc8d3443b4..a77c9460361201796d64d2e27608adbe175148eb 100644 (file)
@@ -574,31 +574,31 @@ attr_scan0_test: attr_print0 attr_scan0 attr_scan0.ref
 dict_test: dict_open testdb dict_test.in dict_test.ref
        rm -f testdb.db testdb.dir testdb.pag
        $(SHLIB_ENV) ../postmap/postmap -N hash:testdb
-       $(SHLIB_ENV) ./dict_open hash:testdb write < dict_test.in > dict_test.tmp 2>&1
+       $(SHLIB_ENV) ./dict_open hash:testdb write < dict_test.in 2>&1 | sed 's/uid=[0-9][0-9][0-9]*/uid=USER/' >dict_test.tmp
        diff dict_test.ref dict_test.tmp
        $(SHLIB_ENV) ../postmap/postmap -n hash:testdb
-       $(SHLIB_ENV) ./dict_open hash:testdb write < dict_test.in > dict_test.tmp 2>&1
+       $(SHLIB_ENV) ./dict_open hash:testdb write < dict_test.in 2>&1 | sed 's/uid=[0-9][0-9][0-9]*/uid=USER/' >dict_test.tmp
        diff dict_test.ref dict_test.tmp
        rm -f testdb.db testdb.dir testdb.pag dict_test.tmp
 
 dict_pcre_test: dict_open dict_pcre.in dict_pcre.map dict_pcre.ref
-       $(SHLIB_ENV) ./dict_open pcre:dict_pcre.map read <dict_pcre.in >dict_pcre.tmp 2>&1
+       $(SHLIB_ENV) ./dict_open pcre:dict_pcre.map read <dict_pcre.in 2>&1 | sed 's/uid=[0-9][0-9][0-9]*/uid=USER/' >dict_pcre.tmp
        diff dict_pcre.ref dict_pcre.tmp
        rm -f dict_pcre.tmp
 
 dict_regexp_test: dict_open dict_regexp.in dict_regexp.map dict_regexp.ref
-       $(SHLIB_ENV) ./dict_open regexp:dict_regexp.map read <dict_regexp.in >dict_regexp.tmp 2>&1
+       $(SHLIB_ENV) ./dict_open regexp:dict_regexp.map read <dict_regexp.in | sed 's/uid=[0-9][0-9][0-9]*/uid=USER/' >dict_regexp.tmp
        diff dict_regexp.ref dict_regexp.tmp
        rm -f dict_regexp.tmp
 
 dict_cidr_test: dict_open dict_cidr.in dict_cidr.map dict_cidr.ref
-       $(SHLIB_ENV) ./dict_open cidr:dict_cidr.map read <dict_cidr.in >dict_cidr.tmp 2>&1
+       $(SHLIB_ENV) ./dict_open cidr:dict_cidr.map read <dict_cidr.in 2>&1 | sed 's/uid=[0-9][0-9][0-9]*/uid=USER/' >dict_cidr.tmp
        diff dict_cidr.ref dict_cidr.tmp
        rm -f dict_cidr.tmp
 
 dict_seq_test: dict_open testdb dict_seq.in dict_seq.ref
        rm -f testdb.db testdb.dir testdb.pag
-       $(SHLIB_ENV) ./dict_open hash:testdb create sync < dict_seq.in > dict_seq.tmp 2>&1
+       $(SHLIB_ENV) ./dict_open hash:testdb create sync < dict_seq.in 2>&1 | sed 's/uid=[0-9][0-9][0-9]*/uid=USER/' > dict_seq.tmp
        diff dict_seq.ref dict_seq.tmp
        rm -f testdb.db testdb.dir testdb.pag dict_seq.tmp
 
@@ -1368,6 +1368,7 @@ exec_command.o: exec_command.h
 exec_command.o: msg.h
 exec_command.o: sys_defs.h
 extpar.o: extpar.c
+extpar.o: msg.h
 extpar.o: stringops.h
 extpar.o: sys_defs.h
 extpar.o: vbuf.h
@@ -1560,8 +1561,6 @@ load_file.o: vbuf.h
 load_file.o: vstream.h
 load_file.o: warn_stat.h
 load_lib.o: load_lib.c
-load_lib.o: load_lib.h
-load_lib.o: msg.h
 load_lib.o: sys_defs.h
 lowercase.o: lowercase.c
 lowercase.o: stringops.h
index 0597441dfa32fb1229339cf276ced121d909b31b..4a185392884b0ab8c12ac29afb2a59020d41203b 100644 (file)
@@ -8,6 +8,7 @@
 ./dict_open: warning: cidr map dict_cidr.map, line 16: missing ']' character after "[1234": skipping this rule
 ./dict_open: warning: cidr map dict_cidr.map, line 17: garbage after "[1234]": skipping this rule
 ./dict_open: warning: cidr map dict_cidr.map, line 18: bad net/mask pattern: "172.16.1.3/3x": skipping this rule
+owner=untrusted (uid=USER)
 > get 172.16.0.0
 172.16.0.0=554 match bad netblock 172.16.0.0/21
 > get 172.16.0.1
index 1dc5393b1cca5387d8ee6fca7c2b6150758d8567..29e9dfb5fae42ba1431f1a9165ef66c2be998b9c 100644 (file)
@@ -6,6 +6,7 @@
 ./dict_open: warning: pcre map dict_pcre.map, line 10: out of range replacement index "5": skipping this rule
 ./dict_open: warning: pcre map dict_pcre.map, line 17: $number found in negative match replacement text: skipping this rule
 ./dict_open: warning: pcre map dict_pcre.map, line 22: no regexp: skipping this rule
+owner=untrusted (uid=USER)
 > get true
 true: not found
 > get true1
index 1cda836004453c3607cd899b2042ed551acf1ed0..0872fb09a16b56af12fec2c0dcf9993a26c5d516 100644 (file)
@@ -1,3 +1,4 @@
+owner=untrusted (uid=USER)
 > del bar
 bar: deleted
 > get bar
index 148ef3e0ca77bdf6c02b6621dcd3e903c34a5d5e..24708f74b72231b667a7321a9d42d17e0e60bf34 100644 (file)
 /* .IP parens
 /*     One matching pair of parentheses, opening parenthesis first.
 /* .IP flags
-/*     EXPAR_FLAG_NONE, or the bitwise OR of one or more flags:
+/*     EXTPAR_FLAG_NONE, or the bitwise OR of one or more flags:
 /* .RS
-/* .IP EXPAR_FLAG_STRIP
+/* .IP EXTPAR_FLAG_EXTRACT
+/*     This flag is intended to instruct expar() callers that
+/*     expar() should be invoked. It has no effect on expar()
+/*     itself.
+/* .IP EXTPAR_FLAG_STRIP
 /*     Skip whitespace after the opening parenthesis, and trim
 /*     whitespace before the closing parenthesis.
 /* .RE
@@ -38,8 +42,8 @@
 /*     be destroyed with myfree(). The following decribes the errors
 /*     and the state of the buffer and buffer pointer.
 /* .IP "missing closing parenthesis"
-/*     The buffer pointer points to text as if the closing parenthesis
-/*     were present.
+/*     The buffer pointer points to text as if a closing parenthesis
+/*     were present at the end of the input.
 /* .IP "text after closing parenthesis"
 /*     The buffer pointer points to text as if the offending text
 /*     were not present.
@@ -70,7 +74,7 @@
 
 /* extpar - extract text from parentheses */
 
-char   *extpar(char **bp, const char *parens, int strip)
+char   *extpar(char **bp, const char *parens, int flags)
 {
     char   *cp = *bp;
     char   *err = 0;
@@ -89,7 +93,7 @@ char   *extpar(char **bp, const char *parens, int strip)
        cp += 1;
        cp[len -= 2] = 0;
     }
-    if (strip) {
+    if (flags & EXTPAR_FLAG_STRIP) {
        trimblanks(cp, len)[0] = 0;
        while (ISSPACE(*cp))
            cp++;
index 0e4cd7cdf4a9a89f62761107b4770702e8afec95..16b7b6cbf41c451c6594b0a35799e384982c2311 100644 (file)
 /*     named attribute expansion and logical expression evaluation.
 /*     Whitespace before or after {text1} or {text2} is ignored.
 /* .IP "${{text1} == ${text2} ? {text3} : {text4}}"
-/* .IP "${{text1} != ${text2} ? {text3} : {text4}}"
 /*     Logical expression-based substition.  First, the content
 /*     of {text1} and ${text2} is subjected to named attribute and
 /*     logical expression-based substitution.  Next, the logical
 /*     expression is evaluated. If it evaluates to "true", the
 /*     result is the content of {text3}, otherwise it is the content
 /*     of {text4}, after named attribute and logical expression-based
-/*     substitution.
+/*     substitution. In addition to ==, this supports !=, <, <=,
+/*     >=, and >. Comparisons are numerical when both operands are
+/*     all digits, otherwise the comparisons are lexicographical.
 /*
 /*     Arguments:
 /* .IP result
@@ -170,7 +171,7 @@ typedef struct {
 #define MAC_EXP_BVAL_FALSE     ""
 
  /*
-  * Relational operator. For now, we test only for (in)equality.
+  * Relational operators.
   */
 #define MAC_EXP_OP_STR_EQ      "=="
 #define MAC_EXP_OP_STR_NE      "!="
index e583badb34876b454b6a3d02a359bd1d6697bebf..43b97fcb5ffbf20b8d2d348a34164a604f93d660 100644 (file)
@@ -47,8 +47,16 @@ extern int valid_utf8_string(const char *, ssize_t);
 extern size_t balpar(const char *, const char *);
 extern char *extpar(char **, const char *, int);
 
-#define EXPAR_FLAG_NONE                (0)
-#define EXPAR_FLAG_STRIP       (1<<0)
+#define EXTPAR_FLAG_NONE               (0)
+#define EXTPAR_FLAG_STRIP      (1<<0)  /* "{ text }" -> "text" */
+#define EXTPAR_FLAG_EXTRACT    (1<<1)  /* hint from caller's caller */
+
+ /*
+  * Character sets for parsing.
+  */
+#define CHARS_COMMA_SP ", \t\r\n"      /* list separator */
+#define CHARS_SPACE    " \t\r\n"       /* word separator */
+#define CHARS_BRACE    "{}"            /* grouping */
 
 /* LICENSE
 /* .ad
index 2b8429b9bd4e4158cde0f530f990bb4bab0842a6..6b2251305ea81812f108d41ec599380d983cf3ba 100644 (file)
@@ -1,44 +1,55 @@
 ./dict_open: error: cidr:/xx map requires O_RDONLY access mode
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: cidr:/xx is unavailable. cidr:/xx map requires O_RDONLY access mode
 foo: error
 ./dict_open: error: open /xx: No such file or directory
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: cidr:/xx is unavailable. open /xx: No such file or directory
 foo: error
 ./dict_open: error: pcre:/xx map requires O_RDONLY access mode
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: pcre:/xx is unavailable. pcre:/xx map requires O_RDONLY access mode
 foo: error
 ./dict_open: error: open /xx: No such file or directory
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: pcre:/xx is unavailable. open /xx: No such file or directory
 foo: error
 ./dict_open: error: regexp:/xx map requires O_RDONLY access mode
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: regexp:/xx is unavailable. regexp:/xx map requires O_RDONLY access mode
 foo: error
 ./dict_open: error: open /xx: No such file or directory
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: regexp:/xx is unavailable. open /xx: No such file or directory
 foo: error
 ./dict_open: error: unix:xx map requires O_RDONLY access mode
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: unix:xx is unavailable. unix:xx map requires O_RDONLY access mode
 foo: error
 ./dict_open: error: unknown table: unix:xx
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: unix:xx is unavailable. unknown table: unix:xx
 foo: error
 ./dict_open: error: texthash:/xx map requires O_RDONLY access mode
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: texthash:/xx is unavailable. texthash:/xx map requires O_RDONLY access mode
 foo: error
 ./dict_open: error: open database /xx: No such file or directory
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: texthash:/xx is unavailable. open database /xx: No such file or directory
 foo: error
 ./dict_open: error: open database /xx.db: No such file or directory
+owner=trusted (uid=-1)
 > get foo
 ./dict_open: warning: hash:/xx is unavailable. open database /xx.db: No such file or directory
 foo: error