propagated. Report by Michael Tokarev, fix by Wietse. Files:
global/mail_params.c, global/mail_params.h
- Bugfix (defect introduced: 20260219): spurious error message
- from nbdb_reindexd(8). File: conf/postfix-script.
+ Cleanup: during Postfix start-up, avoid a spurious error
+ message from nbdb_reindexd(8), when non_bdb_migration_level
+ disables automatic re-indexing. File: conf/postfix-script.
20260310
implementation-defined behavior (shift one bit into the
sign position). This works today but may break later.
Reported by Kamil Frankowicz. File: util/sys_defs.h.
+
+20260311
+
+ Preparation: move src/global/dynamicmaps.[hc] to src/util
+ without making any other code changes. This is a baseline
+ for developing support to build tests with "shared=yes
+ dynamicmaps=yes". Curently, tests must be built with
+ "shared=yes dynamicmaps=no", which is annoying. Files:
+ util/dynamicmaps.[hc], util/Makefile.in, global/Makefile.in.
+
+20260312
+
+ Technical debt elimination: make postalias behavior consistent
+ with postmap behavior that was introduced with Postfix 3.2.
+ Store search keys in the external (quoted) form, and update
+ the local(8) delivery agent to search with the legacy
+ internal (unquoted) form only if the preferred external
+ form is not found, and the internal and external forms
+ differ. Files: postalias/postalias.c, local/alias.c,
+ local/local.[hc], local/Makefile.
+
+ Future proofing: added IfThisThenThat linter hints to remove
+ the legacy internal-form lookups consistently from database
+ client programs. Files: global/mail_addr_find.h, local/alias.c.
+
+ Deleted mail_version_parse() and mail_version_free()
+ infrastructure. It was used only by test code. Files:
+ src/global/mail_version.[hc].
(EPL) 2.0. Recipients can choose to take the software under the
license of their choice. Those who are more comfortable with the
IPL can continue with that license.
+
+Incompatible changes with snapshot 20260312
+===========================================
+
+For consistency with postmap, the postalias command now stores the
+alias database search key in external (quoted) form. For example,
+if an alias name contains whitespace between the words 'foo' and
+'bar', then it will be stored as "foo bar" including the double
+quotes.
+
+For consistency with "postmap -s", the "postalias -s" command now
+outputs the search key in external (quoted) form.
+
+For backwards compatibility, the local(8) delivery agent will look
+up the legacy internal (unquoted) form of an alias name only if the
+preferred external (quoted) form is not found, and the internal and
+external forms differ.
<a href="regexp_table.5.html">regexp</a>: and <a href="pcre_table.5.html">pcre</a>:. This resulted in loss of information with $<i>number</i>
substitutions.
+ In a database file, <a href="postalias.1.html"><b>postalias</b>(1)</a> stores keys in the external (quoted)
+ form. Historically, Postfix versions 3.10 and earlier stored the inter-
+ nal (unquoted) form. This was not consistent with <a href="postmap.1.html"><b>postmap</b>(1)</a> behavior.
+ For backwards compatibility, Postfix programs will search with the
+ legacy internal form only if the preferred external form is not found,
+ and the internal and external forms differ.
+
Options:
<b>-c</b> <i>config</i><b>_</b><i>dir</i>
- Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named directory
+ Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named directory
instead of the default configuration directory.
- <b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one entry per map.
- The exit status is zero when the requested information was
+ <b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one entry per map.
+ The exit status is zero when the requested information was
found.
- If a key value of <b>-</b> is specified, the program reads key values
- from the standard input stream. The exit status is zero when at
+ If a key value of <b>-</b> is specified, the program reads key values
+ from the standard input stream. The exit status is zero when at
least one of the requested keys was found.
- <b>-f</b> Do not fold the lookup key to lower case while creating or
+ <b>-f</b> Do not fold the lookup key to lower case while creating or
querying a table.
- With Postfix version 2.3 and later, this option has no effect
+ With Postfix version 2.3 and later, this option has no effect
for regular expression tables. There, case folding is controlled
by appending a flag to a pattern.
- <b>-i</b> Incremental mode. Read entries from standard input and do not
- truncate an existing database. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> creates
+ <b>-i</b> Incremental mode. Read entries from standard input and do not
+ truncate an existing database. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> creates
a new database from the entries in <i>file</i><b>_</b><i>name</i>.
- <b>-j</b> JSON output. Format the output from <b>-q</b> and <b>-s</b> as one <b>{"</b><i>key</i><b>":</b>
+ <b>-j</b> JSON output. Format the output from <b>-q</b> and <b>-s</b> as one <b>{"</b><i>key</i><b>":</b>
<b>"</b><i>value</i><b>"}</b> object per line.
This feature is available in Postfix version 3.11 and later.
- <b>-N</b> Include the terminating null character that terminates lookup
- keys and values. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever is the
+ <b>-N</b> Include the terminating null character that terminates lookup
+ keys and values. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever is the
default for the host operating system.
- <b>-n</b> Don't include the terminating null character that terminates
- lookup keys and values. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever
+ <b>-n</b> Don't include the terminating null character that terminates
+ lookup keys and values. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever
is the default for the host operating system.
- <b>-o</b> Do not release root privileges when processing a non-root input
+ <b>-o</b> Do not release root privileges when processing a non-root input
file. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> drops root privileges and runs as
the source file owner instead.
- <b>-p</b> Do not inherit the file access permissions from the input file
- when creating a new file. Instead, create a new file with
+ <b>-p</b> Do not inherit the file access permissions from the input file
+ when creating a new file. Instead, create a new file with
default access permissions (mode 0644).
- <b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the first value
- found to the standard output stream. The exit status is zero
+ <b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the first value
+ found to the standard output stream. The exit status is zero
when the requested information was found.
- Note: this performs a single query with the key as specified,
- and does not make iterative queries with substrings of the key
+ Note: this performs a single query with the key as specified,
+ and does not make iterative queries with substrings of the key
as described in the <a href="aliases.5.html">aliases(5)</a> manual page.
- If a key value of <b>-</b> is specified, the program reads key values
+ If a key value of <b>-</b> is specified, the program reads key values
from the standard input stream and writes one line of <i>key: value</i>
output for each key that was found. The exit status is zero when
at least one of the requested keys was found.
- <b>-r</b> When updating a table, do not complain about attempts to update
+ <b>-r</b> When updating a table, do not complain about attempts to update
existing entries, and make those updates anyway.
<b>-s</b> Retrieve all database elements, and write one line of <i>key: value</i>
- output for each element. The elements are printed in database
- order, which is not necessarily the same as the original input
- order. This feature is available in Postfix version 2.2 and
+ output for each element. The elements are printed in database
+ order, which is not necessarily the same as the original input
+ order. This feature is available in Postfix version 2.2 and
later, and is not available for all database types.
- <b>-u</b> Disable UTF-8 support. UTF-8 support is enabled by default when
- "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes". It requires that keys and values are
+ <b>-u</b> Disable UTF-8 support. UTF-8 support is enabled by default when
+ "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes". It requires that keys and values are
valid UTF-8 strings.
- <b>-v</b> Enable verbose logging for debugging purposes. Multiple <b>-v</b>
+ <b>-v</b> Enable verbose logging for debugging purposes. Multiple <b>-v</b>
options make the software increasingly verbose.
- <b>-w</b> When updating a table, do not complain about attempts to update
+ <b>-w</b> When updating a table, do not complain about attempts to update
existing entries, and ignore those attempts.
Arguments:
The database type. To find out what types are supported, use the
"<b>postconf -m</b>" command.
- When no <i>file</i><b>_</b><i>type</i> is specified, the software uses the database
- type specified via the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b> configuration
- parameter. The default value for this parameter depends on the
+ When no <i>file</i><b>_</b><i>type</i> is specified, the software uses the database
+ type specified via the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b> configuration
+ parameter. The default value for this parameter depends on the
host environment.
- The <a href="postalias.1.html"><b>postalias</b>(1)</a> command can query any supported file type, but
+ The <a href="postalias.1.html"><b>postalias</b>(1)</a> command can query any supported file type, but
it can create only the following file types:
- <b>btree</b> The output is a btree file, named <i>file</i><b>_</b><i>name</i><b>.db</b>. This is
+ <b>btree</b> The output is a btree file, named <i>file</i><b>_</b><i>name</i><b>.db</b>. This is
available on systems with support for <b>db</b> databases.
- <b>cdb</b> The output is one file named <i>file</i><b>_</b><i>name</i><b>.cdb</b>. This is
+ <b>cdb</b> The output is one file named <i>file</i><b>_</b><i>name</i><b>.cdb</b>. This is
available on systems with support for <b>cdb</b> databases.
<b>dbm</b> The output consists of two files, named <i>file</i><b>_</b><i>name</i><b>.pag</b> and
<i>file</i><b>_</b><i>name</i><b>.dir</b>. This is available on systems with support
for <b>dbm</b> databases.
- <b>fail</b> A table that reliably fails all requests. The lookup ta-
- ble name is used for logging only. This table exists to
+ <b>fail</b> A table that reliably fails all requests. The lookup ta-
+ ble name is used for logging only. This table exists to
simplify Postfix error tests.
<b>hash</b> The output is a hashed file, named <i>file</i><b>_</b><i>name</i><b>.db</b>. This is
available on systems with support for <b>db</b> databases.
- <b>lmdb</b> The output is a btree-based file, named <i>file</i><b>_</b><i>name</i><b>.lmdb</b>.
- <b>lmdb</b> supports concurrent writes and reads from different
+ <b>lmdb</b> The output is a btree-based file, named <i>file</i><b>_</b><i>name</i><b>.lmdb</b>.
+ <b>lmdb</b> supports concurrent writes and reads from different
processes, unlike other supported file-based tables.
- This is available on systems with support for <b>lmdb</b> data-
+ This is available on systems with support for <b>lmdb</b> data-
bases.
<b>sdbm</b> The output consists of two files, named <i>file</i><b>_</b><i>name</i><b>.pag</b> and
base.
<b><a name="diagnostics">DIAGNOSTICS</a></b>
- Problems are logged to the standard error stream and to <b>syslogd</b>(8) or
- <a href="postlogd.8.html"><b>postlogd</b>(8)</a>. No output means that no problems were detected. Duplicate
+ Problems are logged to the standard error stream and to <b>syslogd</b>(8) or
+ <a href="postlogd.8.html"><b>postlogd</b>(8)</a>. No output means that no problems were detected. Duplicate
entries are skipped and are flagged with a warning.
- <a href="postalias.1.html"><b>postalias</b>(1)</a> terminates with zero exit status in case of success
+ <a href="postalias.1.html"><b>postalias</b>(1)</a> terminates with zero exit status in case of success
(including successful "<b>postalias -q</b>" lookup) and terminates with
non-zero exit status in case of failure.
Enable verbose logging for debugging purposes.
<b><a name="configuration_parameters">CONFIGURATION PARAMETERS</a></b>
- The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro-
+ The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro-
gram.
- The text below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for
+ The text below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for
more details including examples.
<b><a href="postconf.5.html#alias_database">alias_database</a> (see 'postconf -d' output)</b>
- The alias databases for <a href="local.8.html"><b>local</b>(8)</a> delivery that are updated with
+ The alias databases for <a href="local.8.html"><b>local</b>(8)</a> delivery that are updated with
"<b>newaliases</b>" or with "<b>sendmail -bi</b>".
<b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
- The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
+ The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
figuration files.
<b><a href="postconf.5.html#berkeley_db_create_buffer_size">berkeley_db_create_buffer_size</a> (16777216)</b>
- The per-table I/O buffer size for programs that create Berkeley
+ The per-table I/O buffer size for programs that create Berkeley
DB hash or btree tables.
<b><a href="postconf.5.html#berkeley_db_read_buffer_size">berkeley_db_read_buffer_size</a> (131072)</b>
and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands.
<b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b>
- The list of environment variables that a privileged Postfix
- process will import from a non-Postfix parent process, or
+ The list of environment variables that a privileged Postfix
+ process will import from a non-Postfix parent process, or
name=value environment overrides.
<b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
- Enable preliminary SMTPUTF8 support for the protocols described
+ Enable preliminary SMTPUTF8 support for the protocols described
in <a href="https://tools.ietf.org/html/rfc6531">RFC 6531</a>, <a href="https://tools.ietf.org/html/rfc6532">RFC 6532</a>, and <a href="https://tools.ietf.org/html/rfc6533">RFC 6533</a>.
<b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
The syslog facility of Postfix logging.
<b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
- A prefix that is prepended to the process name in syslog
+ A prefix that is prepended to the process name in syslog
records, so that, for example, "smtpd" becomes "prefix/smtpd".
Available in Postfix 2.11 and later:
space is stripped off. Whitespace in lookup keys is supported in Post-
fix 3.2 and later, by surrounding the key with double quote characters
`"'. Within the double quotes, double quote `"' and backslash `\' char-
- acters can be included by quoting them with a preceding backslash.
+ acters can be included by quoting them with a preceding backslash. For
+ backwards compatibility, Postfix programs will search with the legacy
+ internal form only if the preferred external form is not found, and the
+ internal and external forms differ.
- When the <b>-F</b> option is given, the <i>value</i> must specify one or more file-
+ When the <b>-F</b> option is given, the <i>value</i> must specify one or more file-
names separated by comma and/or whitespace; <a href="postmap.1.html"><b>postmap</b>(1)</a> will concatenate
- the file content (with a newline character inserted between files) and
+ the file content (with a newline character inserted between files) and
will store the base64-encoded result instead of the <i>value</i>.
- When the <i>key</i> specifies email address information, the localpart should
+ When the <i>key</i> specifies email address information, the localpart should
be enclosed with double quotes if required by <a href="https://tools.ietf.org/html/rfc5322">RFC 5322</a>. For example, an
address localpart that contains ";", or a localpart that starts or ends
with ".".
- By default the lookup key is mapped to lowercase to make the lookups
+ By default the lookup key is mapped to lowercase to make the lookups
case insensitive; as of Postfix 2.3 this case folding happens only with
tables whose lookup keys are fixed-case strings such as <a href="DATABASE_README.html#types">btree</a>:, <a href="DATABASE_README.html#types">dbm</a>: or
<a href="DATABASE_README.html#types">hash</a>:. With earlier versions, the lookup key is folded even with tables
- where a lookup field can match both upper and lower case text, such as
- <a href="regexp_table.5.html">regexp</a>: and <a href="pcre_table.5.html">pcre</a>:. This resulted in loss of information with $<i>number</i>
+ where a lookup field can match both upper and lower case text, such as
+ <a href="regexp_table.5.html">regexp</a>: and <a href="pcre_table.5.html">pcre</a>:. This resulted in loss of information with $<i>number</i>
substitutions.
<b><a name="command-line_arguments">COMMAND-LINE ARGUMENTS</a></b>
- <b>-b</b> Enable message body query mode. When reading lookup keys from
- standard input with "<b>-q -</b>", process the input as if it is an
- email message in <a href="https://tools.ietf.org/html/rfc5322">RFC 5322</a> format. Each line of body content
+ <b>-b</b> Enable message body query mode. When reading lookup keys from
+ standard input with "<b>-q -</b>", process the input as if it is an
+ email message in <a href="https://tools.ietf.org/html/rfc5322">RFC 5322</a> format. Each line of body content
becomes one lookup key.
- By default, the <b>-b</b> option starts generating lookup keys at the
- first non-header line, and stops when the end of the message is
- reached. To simulate <a href="header_checks.5.html"><b>body_checks</b>(5)</a> processing, enable MIME
- parsing with <b>-m</b>. With this, the <b>-b</b> option generates no
- body-style lookup keys for attachment MIME headers and for
+ By default, the <b>-b</b> option starts generating lookup keys at the
+ first non-header line, and stops when the end of the message is
+ reached. To simulate <a href="header_checks.5.html"><b>body_checks</b>(5)</a> processing, enable MIME
+ parsing with <b>-m</b>. With this, the <b>-b</b> option generates no
+ body-style lookup keys for attachment MIME headers and for
attached message/* headers.
NOTE: with "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes", the <b>-b</b> option disables UTF-8
- syntax checks on query keys and lookup results. Specify the <b>-U</b>
+ syntax checks on query keys and lookup results. Specify the <b>-U</b>
option to force UTF-8 syntax checks anyway.
This feature is available in Postfix version 2.6 and later.
<b>-c</b> <i>config</i><b>_</b><i>dir</i>
- Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named directory
+ Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named directory
instead of the default configuration directory.
- <b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one entry per map.
- The exit status is zero when the requested information was
+ <b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one entry per map.
+ The exit status is zero when the requested information was
found.
- If a key value of <b>-</b> is specified, the program reads key values
- from the standard input stream. The exit status is zero when at
+ If a key value of <b>-</b> is specified, the program reads key values
+ from the standard input stream. The exit status is zero when at
least one of the requested keys was found.
- <b>-f</b> Do not fold the lookup key to lower case while creating or
+ <b>-f</b> Do not fold the lookup key to lower case while creating or
querying a table.
- With Postfix version 2.3 and later, this option has no effect
+ With Postfix version 2.3 and later, this option has no effect
for regular expression tables. There, case folding is controlled
by appending a flag to a pattern.
<b>-F</b> When querying a map, or listing a map, base64-decode each value.
- When creating a map from source file, process each value as a
- list of filenames, concatenate the content of those files, and
- store the base64-encoded result instead of the value (see INPUT
+ When creating a map from source file, process each value as a
+ list of filenames, concatenate the content of those files, and
+ store the base64-encoded result instead of the value (see INPUT
FILE FORMAT for details).
This feature is available in Postfix version 3.4 and later.
- <b>-h</b> Enable message header query mode. When reading lookup keys from
- standard input with "<b>-q -</b>", process the input as if it is an
- email message in <a href="https://tools.ietf.org/html/rfc5322">RFC 5322</a> format. Each logical header line
- becomes one lookup key. A multi-line header becomes one lookup
+ <b>-h</b> Enable message header query mode. When reading lookup keys from
+ standard input with "<b>-q -</b>", process the input as if it is an
+ email message in <a href="https://tools.ietf.org/html/rfc5322">RFC 5322</a> format. Each logical header line
+ becomes one lookup key. A multi-line header becomes one lookup
key with one or more embedded newline characters.
- By default, the <b>-h</b> option generates lookup keys until the first
- non-header line is reached. To simulate <a href="header_checks.5.html"><b>header_checks</b>(5)</a> pro-
- cessing, enable MIME parsing with <b>-m</b>. With this, the <b>-h</b> option
- also generates header-style lookup keys for attachment MIME
+ By default, the <b>-h</b> option generates lookup keys until the first
+ non-header line is reached. To simulate <a href="header_checks.5.html"><b>header_checks</b>(5)</a> pro-
+ cessing, enable MIME parsing with <b>-m</b>. With this, the <b>-h</b> option
+ also generates header-style lookup keys for attachment MIME
headers and for attached message/* headers.
- NOTE: with "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes", the <b>-h</b> option option dis-
- ables UTF-8 syntax checks on query keys and lookup results.
+ NOTE: with "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes", the <b>-h</b> option option dis-
+ ables UTF-8 syntax checks on query keys and lookup results.
Specify the <b>-U</b> option to force UTF-8 syntax checks anyway.
This feature is available in Postfix version 2.6 and later.
- <b>-i</b> Incremental mode. Read entries from standard input and do not
- truncate an existing database. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> creates a
+ <b>-i</b> Incremental mode. Read entries from standard input and do not
+ truncate an existing database. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> creates a
new database from the entries in <b>file_name</b>.
- <b>-j</b> JSON output. Format the output from <b>-q</b> and <b>-s</b> as one <b>{"</b><i>key</i><b>":</b>
+ <b>-j</b> JSON output. Format the output from <b>-q</b> and <b>-s</b> as one <b>{"</b><i>key</i><b>":</b>
<b>"</b><i>value</i><b>"}</b> object per line.
This feature is available in Postfix version 3.11 and later.
This feature is available in Postfix version 2.6 and later.
- <b>-N</b> Include the terminating null character that terminates lookup
- keys and values. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> does whatever is the
+ <b>-N</b> Include the terminating null character that terminates lookup
+ keys and values. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> does whatever is the
default for the host operating system.
- <b>-n</b> Don't include the terminating null character that terminates
- lookup keys and values. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> does whatever is
+ <b>-n</b> Don't include the terminating null character that terminates
+ lookup keys and values. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> does whatever is
the default for the host operating system.
- <b>-o</b> Do not release root privileges when processing a non-root input
- file. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> drops root privileges and runs as
+ <b>-o</b> Do not release root privileges when processing a non-root input
+ file. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> drops root privileges and runs as
the source file owner instead.
- <b>-p</b> Do not inherit the file access permissions from the input file
- when creating a new file. Instead, create a new file with
+ <b>-p</b> Do not inherit the file access permissions from the input file
+ when creating a new file. Instead, create a new file with
default access permissions (mode 0644).
- <b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the first value
- found to the standard output stream. The exit status is zero
+ <b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the first value
+ found to the standard output stream. The exit status is zero
when the requested information was found.
- Note: this performs a single query with the key as specified,
- and does not make iterative queries with substrings of the key
- as described for <a href="access.5.html">access(5)</a>, <a href="canonical.5.html">canonical(5)</a>, <a href="transport.5.html">transport(5)</a>, <a href="virtual.5.html">vir-</a>
+ Note: this performs a single query with the key as specified,
+ and does not make iterative queries with substrings of the key
+ as described for <a href="access.5.html">access(5)</a>, <a href="canonical.5.html">canonical(5)</a>, <a href="transport.5.html">transport(5)</a>, <a href="virtual.5.html">vir-</a>
<a href="virtual.5.html">tual(5)</a> and other Postfix table-driven features.
- If a key value of <b>-</b> is specified, the program reads key values
- from the standard input stream and writes one line of <i>key value</i>
+ If a key value of <b>-</b> is specified, the program reads key values
+ from the standard input stream and writes one line of <i>key value</i>
output for each key that was found. The exit status is zero when
at least one of the requested keys was found.
- <b>-r</b> When updating a table, do not complain about attempts to update
+ <b>-r</b> When updating a table, do not complain about attempts to update
existing entries, and make those updates anyway.
- <b>-s</b> Retrieve all database elements, and write one line of <i>key value</i>
- output for each element. The elements are printed in database
- order, which is not necessarily the same as the original input
+ <b>-s</b> Retrieve all database elements, and write one line of <i>key value</i>
+ output for each element. The elements are printed in database
+ order, which is not necessarily the same as the original input
order.
- This feature is available in Postfix version 2.2 and later, and
+ This feature is available in Postfix version 2.2 and later, and
is not available for all database types.
- <b>-u</b> Disable UTF-8 support. UTF-8 support is enabled by default when
- "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes". It requires that keys and values are
+ <b>-u</b> Disable UTF-8 support. UTF-8 support is enabled by default when
+ "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes". It requires that keys and values are
valid UTF-8 strings.
<b>-U</b> With "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes", force UTF-8 syntax checks with the
<b>-b</b> and <b>-h</b> options.
- <b>-v</b> Enable verbose logging for debugging purposes. Multiple <b>-v</b>
+ <b>-v</b> Enable verbose logging for debugging purposes. Multiple <b>-v</b>
options make the software increasingly verbose.
- <b>-w</b> When updating a table, do not complain about attempts to update
+ <b>-w</b> When updating a table, do not complain about attempts to update
existing entries, and ignore those attempts.
Arguments:
The database type. To find out what types are supported, use the
"<b>postconf -m</b>" command.
- When no <i>file</i><b>_</b><i>type</i> is specified, the software uses the database
- type specified via the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b> configuration
- parameter. The default value for this parameter depends on the
+ When no <i>file</i><b>_</b><i>type</i> is specified, the software uses the database
+ type specified via the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b> configuration
+ parameter. The default value for this parameter depends on the
host environment.
The <a href="postmap.1.html"><b>postmap</b>(1)</a> command can query any supported file type, but it
can create only the following file types:
- <b>btree</b> The output file is a btree file, named <i>file</i><b>_</b><i>name</i><b>.db</b>.
- This is available on systems with support for <b>db</b> data-
+ <b>btree</b> The output file is a btree file, named <i>file</i><b>_</b><i>name</i><b>.db</b>.
+ This is available on systems with support for <b>db</b> data-
bases.
- <b>cdb</b> The output consists of one file, named <i>file</i><b>_</b><i>name</i><b>.cdb</b>.
- This is available on systems with support for <b>cdb</b> data-
+ <b>cdb</b> The output consists of one file, named <i>file</i><b>_</b><i>name</i><b>.cdb</b>.
+ This is available on systems with support for <b>cdb</b> data-
bases.
<b>dbm</b> The output consists of two files, named <i>file</i><b>_</b><i>name</i><b>.pag</b> and
<i>file</i><b>_</b><i>name</i><b>.dir</b>. This is available on systems with support
for <b>dbm</b> databases.
- <b>fail</b> A table that reliably fails all requests. The lookup ta-
- ble name is used for logging only. This table exists to
+ <b>fail</b> A table that reliably fails all requests. The lookup ta-
+ ble name is used for logging only. This table exists to
simplify Postfix error tests.
- <b>hash</b> The output file is a hashed file, named <i>file</i><b>_</b><i>name</i><b>.db</b>.
- This is available on systems with support for <b>db</b> data-
+ <b>hash</b> The output file is a hashed file, named <i>file</i><b>_</b><i>name</i><b>.db</b>.
+ This is available on systems with support for <b>db</b> data-
bases.
- <b>lmdb</b> The output is a btree-based file, named <i>file</i><b>_</b><i>name</i><b>.lmdb</b>.
- <b>lmdb</b> supports concurrent writes and reads from different
+ <b>lmdb</b> The output is a btree-based file, named <i>file</i><b>_</b><i>name</i><b>.lmdb</b>.
+ <b>lmdb</b> supports concurrent writes and reads from different
processes, unlike other supported file-based tables.
- This is available on systems with support for <b>lmdb</b> data-
+ This is available on systems with support for <b>lmdb</b> data-
bases.
<b>sdbm</b> The output consists of two files, named <i>file</i><b>_</b><i>name</i><b>.pag</b> and
base.
<b><a name="diagnostics">DIAGNOSTICS</a></b>
- Problems are logged to the standard error stream and to <b>syslogd</b>(8) or
+ Problems are logged to the standard error stream and to <b>syslogd</b>(8) or
<a href="postlogd.8.html"><b>postlogd</b>(8)</a>. No output means that no problems were detected. Duplicate
entries are skipped and are flagged with a warning.
<a href="postmap.1.html"><b>postmap</b>(1)</a> terminates with zero exit status in case of success (includ-
- ing successful "<b>postmap -q</b>" lookup) and terminates with non-zero exit
+ ing successful "<b>postmap -q</b>" lookup) and terminates with non-zero exit
status in case of failure.
<b><a name="environment">ENVIRONMENT</a></b>
Enable verbose logging for debugging purposes.
<b><a name="configuration_parameters">CONFIGURATION PARAMETERS</a></b>
- The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro-
- gram. The text below provides only a parameter summary. See <a href="postconf.5.html"><b>post-</b></a>
+ The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro-
+ gram. The text below provides only a parameter summary. See <a href="postconf.5.html"><b>post-</b></a>
<a href="postconf.5.html"><b>conf</b>(5)</a> for more details including examples.
<b><a href="postconf.5.html#berkeley_db_create_buffer_size">berkeley_db_create_buffer_size</a> (16777216)</b>
- The per-table I/O buffer size for programs that create Berkeley
+ The per-table I/O buffer size for programs that create Berkeley
DB hash or btree tables.
<b><a href="postconf.5.html#berkeley_db_read_buffer_size">berkeley_db_read_buffer_size</a> (131072)</b>
hash or btree tables.
<b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
- The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
+ The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
figuration files.
<b><a href="postconf.5.html#default_database_type">default_database_type</a> (see 'postconf -d' output)</b>
and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands.
<b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b>
- The list of environment variables that a privileged Postfix
- process will import from a non-Postfix parent process, or
+ The list of environment variables that a privileged Postfix
+ process will import from a non-Postfix parent process, or
name=value environment overrides.
<b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
- Enable preliminary SMTPUTF8 support for the protocols described
+ Enable preliminary SMTPUTF8 support for the protocols described
in <a href="https://tools.ietf.org/html/rfc6531">RFC 6531</a>, <a href="https://tools.ietf.org/html/rfc6532">RFC 6532</a>, and <a href="https://tools.ietf.org/html/rfc6533">RFC 6533</a>.
<b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
The syslog facility of Postfix logging.
<b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
- A prefix that is prepended to the process name in syslog
+ A prefix that is prepended to the process name in syslog
records, so that, for example, "smtpd" becomes "prefix/smtpd".
Available in Postfix 2.11 and later:
text, such as regexp: and pcre:. This resulted in loss of
information with $\fInumber\fR substitutions.
+In a database file, \fBpostalias\fR(1) stores keys in the external
+(quoted) form. Historically, Postfix versions 3.10 and earlier
+stored the internal (unquoted) form. This was not consistent
+with \fBpostmap\fR(1) behavior. For backwards compatibility,
+Postfix programs will search with the legacy internal form only
+if the preferred external form is not found, and the internal
+and external forms differ.
+
Options:
.IP "\fB\-c \fIconfig_dir\fR"
Read the \fBmain.cf\fR configuration file in the named directory
keys is supported in Postfix 3.2 and later, by surrounding the
key with double quote characters `"'. Within the double quotes,
double quote `"' and backslash `\\' characters can be included
-by quoting them with a preceding backslash.
+by quoting them with a preceding backslash. For backwards
+compatibility, Postfix programs will search with the legacy
+internal form only if the preferred external form is not found,
+and the internal and external forms differ.
When the \fB\-F\fR option is given, the \fIvalue\fR must
specify one or more filenames separated by comma and/or
proto stop spell proto html postfix postfix c conf postfix files
File nbdb_reindexd nbdb_reindexd c
tls tls h tls tls_misc c tls tls_verify c
+ differ Files postalias postalias c local alias c
+ local local hc local Makefile
reindexing
surr
whoami
+IfChange
+ThenChange
Avram
Berindeie
Teodor
+IfThisThenThat
+linter
+MAXINT
match_service.c mail_conf_nint.c addr_match_list.c mail_conf_nbool.c \
smtp_reply_footer.c safe_ultostr.c verify_sender_addr.c \
dict_memcache.c mail_version.c memcache_proto.c server_acl.c \
- haproxy_srvr.c dsn_filter.c dynamicmaps.c uxtext.c \
+ haproxy_srvr.c dsn_filter.c uxtext.c \
smtputf8.c mail_conf_over.c mail_parm_split.c midna_adomain.c \
mail_addr_form.c quote_flags.c maillog_client.c \
normalize_mailhost_addr.c map_search.c reject_deliver_request.c \
match_service.o mail_conf_nint.o addr_match_list.o mail_conf_nbool.o \
smtp_reply_footer.o safe_ultostr.o verify_sender_addr.o \
dict_memcache.o mail_version.o memcache_proto.o server_acl.o \
- haproxy_srvr.o dsn_filter.o dynamicmaps.o uxtext.o \
+ haproxy_srvr.o dsn_filter.o uxtext.o \
smtputf8.o attr_override.o mail_parm_split.o midna_adomain.o \
$(NON_PLUGIN_MAP_OBJ) mail_addr_form.o quote_flags.o maillog_client.o \
normalize_mailhost_addr.o map_search.o reject_deliver_request.o \
fold_addr.h header_body_checks.h data_redirect.h match_service.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 \
+ haproxy_srvr.h dsn_filter.h uxtext.h smtputf8.h \
attr_override.h mail_parm_split.h midna_adomain.h mail_addr_form.h \
maillog_client.h normalize_mailhost_addr.h map_search.h \
info_log_addr_form.h sasl_mech_filter.h login_sender_match.h \
verify_clnt xtext anvil_clnt scache ehlo_mask_test \
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_parm_split \
+ mail_dict server_acl uxtext mail_parm_split \
fold_addr smtp_reply_footer mail_addr_map normalize_mailhost_addr \
haproxy_srvr_test map_search delivered_hdr login_sender_match_test \
compat_level config_known_tcp_ports hfrom_format rfc2047_code \
tests: tok822_test mime_tests strip_addr_test tok822_limit_test \
xtext_test scache_multi_test test_ehlo_mask \
namadr_list_test mail_conf_time_test header_body_checks_tests \
- mail_version_test server_acl_test resolve_local_test maps_test \
+ server_acl_test resolve_local_test maps_test \
safe_ultostr_test mail_parm_split_test fold_addr_test \
smtp_reply_footer_test off_cvt_test mail_addr_crunch_test \
mail_addr_find_test mail_addr_map_test quote_822_local_test \
cmp xtext.ref xtext.tmp
rm -f xtext.ref xtext.tmp
-mail_version_test: mail_version mail_version.in mail_version.ref
- $(SHLIB_ENV) $(VALGRIND) ./mail_version <mail_version.in >mail_version.tmp
- diff mail_version.ref mail_version.tmp
- rm -f mail_version.tmp
-
server_acl_test: server_acl server_acl.in server_acl.ref
$(SHLIB_ENV) $(VALGRIND) ./server_acl <server_acl.in >server_acl.tmp 2>&1
diff server_acl.ref server_acl.tmp
dsn_util.o: ../../include/vstring.h
dsn_util.o: dsn_util.c
dsn_util.o: dsn_util.h
-dynamicmaps.o: ../../include/argv.h
-dynamicmaps.o: ../../include/check_arg.h
-dynamicmaps.o: ../../include/dict.h
-dynamicmaps.o: ../../include/htable.h
-dynamicmaps.o: ../../include/load_lib.h
-dynamicmaps.o: ../../include/mkmap.h
-dynamicmaps.o: ../../include/msg.h
-dynamicmaps.o: ../../include/myflock.h
-dynamicmaps.o: ../../include/mymalloc.h
-dynamicmaps.o: ../../include/scan_dir.h
-dynamicmaps.o: ../../include/split_at.h
-dynamicmaps.o: ../../include/stringops.h
-dynamicmaps.o: ../../include/sys_defs.h
-dynamicmaps.o: ../../include/vbuf.h
-dynamicmaps.o: ../../include/vstream.h
-dynamicmaps.o: ../../include/vstring.h
-dynamicmaps.o: ../../include/vstring_vstream.h
-dynamicmaps.o: dynamicmaps.c
-dynamicmaps.o: dynamicmaps.h
ehlo_mask.o: ../../include/check_arg.h
ehlo_mask.o: ../../include/name_mask.h
ehlo_mask.o: ../../include/sys_defs.h
mail_dict.o: ../../include/argv.h
mail_dict.o: ../../include/check_arg.h
mail_dict.o: ../../include/dict.h
+mail_dict.o: ../../include/dynamicmaps.h
mail_dict.o: ../../include/mkmap.h
mail_dict.o: ../../include/msg.h
mail_dict.o: ../../include/myflock.h
mail_dict.o: dict_pgsql.h
mail_dict.o: dict_proxy.h
mail_dict.o: dict_sqlite.h
-mail_dict.o: dynamicmaps.h
mail_dict.o: mail_dict.c
mail_dict.o: mail_dict.h
mail_dict.o: mail_params.h
MA_FORM_EXTERNAL, MA_FIND_DEFAULT)
/* The legacy forms. */
+ /* LINT.IfChange */
#define MA_FIND_FORM_LEGACY \
MA_FORM_INTERNAL, MA_FORM_EXTERNAL_FIRST, \
MA_FORM_EXTERNAL
#define mail_addr_find_to_internal(maps, address, extension) \
mail_addr_find_opt((maps), (address), (extension), \
MA_FIND_FORM_LEGACY, MA_FIND_DEFAULT)
+ /* LINT.ThenChange(../local/alias.c) */
/* LICENSE
/* .ad
#include <mail_version.h>
-/* mail_version_int - convert integer */
-
-static int mail_version_int(const char *strval)
-{
- char *end;
- int intval;
- long longval;
-
- errno = 0;
- intval = longval = strtol(strval, &end, 10);
- if (*strval == 0 || *end != 0 || errno == ERANGE || longval != intval)
- intval = (-1);
- return (intval);
-}
-
-/* mail_version_worker - do the parsing work */
-
-static const char *mail_version_worker(MAIL_VERSION *mp, char *cp)
-{
- char *major_field;
- char *minor_field;
- char *patch_field;
-
- /*
- * Program name.
- */
- if (*cp == '-' || (mp->program = mystrtok(&cp, "-")) == 0)
- return ("no program name");
-
- /*
- * Major, minor, patchlevel. If this is a stable release, then we ignore
- * text after the patchlevel, in case there are vendor extensions.
- */
- if ((major_field = mystrtok(&cp, "-")) == 0)
- return ("missing major version");
-
- if ((minor_field = split_at(major_field, '.')) == 0)
- return ("missing minor version");
- if ((mp->major = mail_version_int(major_field)) < 0)
- return ("bad major version");
- patch_field = split_at(minor_field, '.');
- if ((mp->minor = mail_version_int(minor_field)) < 0)
- return ("bad minor version");
-
- if (patch_field == 0)
- mp->patch = -1;
- else if ((mp->patch = mail_version_int(patch_field)) < 0)
- return ("bad patchlevel");
-
- /*
- * Experimental release. If this is not a stable release, we take
- * everything to the end of the string.
- */
- if (patch_field != 0)
- mp->snapshot = 0;
- else if ((mp->snapshot = mystrtok(&cp, "")) == 0)
- return ("missing snapshot field");
-
- return (0);
-}
-
-/* mail_version_parse - driver */
-
-MAIL_VERSION *mail_version_parse(const char *string, const char **why)
-{
- MAIL_VERSION *mp;
- char *saved_string;
- const char *err;
-
- mp = (MAIL_VERSION *) mymalloc(sizeof(*mp));
- saved_string = mystrdup(string);
- if ((err = mail_version_worker(mp, saved_string)) != 0) {
- *why = err;
- myfree(saved_string);
- myfree((void *) mp);
- return (0);
- } else {
- return (mp);
- }
-}
-
-/* mail_version_free - destroy version information */
-
-void mail_version_free(MAIL_VERSION *mp)
-{
- myfree(mp->program);
- myfree((void *) mp);
-}
-
-/* get_mail_version - return parsed mail version string */
-
-const char *get_mail_version(void)
-{
- return (DEF_MAIL_VERSION);
-}
-
/* check_mail_version - compare caller version with library version */
void check_mail_version(const char *version_string)
msg_warn("Postfix library version mis-match: wanted %s, found %s",
version_string, DEF_MAIL_VERSION);
}
-
-#ifdef TEST
-
-#include <unistd.h>
-#include <vstring.h>
-#include <vstream.h>
-#include <vstring_vstream.h>
-
-#define STR(x) vstring_str(x)
-
-/* parse_sample - parse a sample string from argv or stdin */
-
-static void parse_sample(const char *sample)
-{
- MAIL_VERSION *mp;
- const char *why;
-
- mp = mail_version_parse(sample, &why);
- if (mp == 0) {
- vstream_printf("ERROR: %s: %s\n", sample, why);
- } else {
- vstream_printf("program: %s\t", mp->program);
- vstream_printf("major: %d\t", mp->major);
- vstream_printf("minor: %d\t", mp->minor);
- if (mp->patch < 0)
- vstream_printf("snapshot: %s\n", mp->snapshot);
- else
- vstream_printf("patch: %d\n", mp->patch);
- mail_version_free(mp);
- }
- vstream_fflush(VSTREAM_OUT);
-}
-
-/* main - the main program */
-
-int main(int argc, char **argv)
-{
- VSTRING *inbuf = vstring_alloc(1);
- int have_tty = isatty(0);
-
- if (argc > 1) {
- while (--argc > 0 && *++argv)
- parse_sample(*argv);
- } else {
- for (;;) {
- if (have_tty) {
- vstream_printf("> ");
- vstream_fflush(VSTREAM_OUT);
- }
- if (vstring_fgets_nonl(inbuf, VSTREAM_IN) <= 0)
- break;
- if (have_tty == 0)
- vstream_printf("> %s\n", STR(inbuf));
- if (*STR(inbuf) == 0 || *STR(inbuf) == '#')
- continue;
- parse_sample(STR(inbuf));
- }
- }
- vstring_free(inbuf);
- return (0);
-}
-
-#endif
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20260310"
+#define MAIL_RELEASE_DATE "20260312"
#define MAIL_VERSION_NUMBER "3.12"
#ifdef SNAPSHOT
#define MAIL_VERSION_STAMP_ALLOCATE \
mail_version_stamp = strdup(VAR_MAIL_VERSION "=" DEF_MAIL_VERSION)
- /*
- * Mail version string parser, plus support to compare the compile-time
- * version string of a Postfix program with the run-time version string of a
- * Postfix shared library. When programs are not updated, they may fail in
- * erratic ways when linked against a newer run-time library. Of course the
- * right solution is so-number versioning of the Postfix run-time library.
- */
-typedef struct {
- char *program; /* postfix */
- int major; /* 2 */
- int minor; /* 9 */
- int patch; /* null */
- char *snapshot; /* 20111209-nonprod */
-} MAIL_VERSION;
-
-extern MAIL_VERSION *mail_version_parse(const char *, const char **);
-extern void mail_version_free(MAIL_VERSION *);
-extern const char *get_mail_version(void);
extern void check_mail_version(const char *);
#define MAIL_VERSION_CHECK \
alias.o: ../../include/mypwd.h
alias.o: ../../include/nvtable.h
alias.o: ../../include/pol_stats.h
+alias.o: ../../include/quote_822_local.h
+alias.o: ../../include/quote_flags.h
alias.o: ../../include/recipient_list.h
alias.o: ../../include/resolve_clnt.h
alias.o: ../../include/sent.h
#include <sent.h>
#include <trace.h>
#include <dsn_mask.h>
+#include <quote_822_local.h>
/* Application-specific. */
#define NO 0
#define YES 1
+/* get_alias - look up alias expansion, with legacy search key support */
+
+static const char *get_alias(LOCAL_STATE state, DICT *dict, const char *name)
+{
+ const char *alias_result;
+
+ /*
+ * The legacy query with the unquoted form should be removed when the
+ * legacy strategy is removed in mail_addr_find.h.
+ */
+ quote_822_local_flags(state.alias_key, name, QUOTE_FLAG_DEFAULT
+ | QUOTE_FLAG_BARE_LOCALPART);
+ alias_result = dict_get(dict, STR(state.alias_key));
+ /* LINT.IfChange */
+ if (alias_result == 0 && dict->error == 0
+ && strcmp(name, STR(state.alias_key)) != 0)
+ alias_result = dict_get(dict, name);
+ /* LINT.ThenChange(../global/mail_addr_find.h) */
+ return (alias_result);
+}
+
/* deliver_alias - expand alias file entry */
int deliver_alias(LOCAL_STATE state, USER_ATTR usr_attr,
for (cpp = alias_maps->argv->argv; *cpp; cpp++) {
if ((dict = dict_handle(*cpp)) == 0)
msg_panic("%s: dictionary not found: %s", myname, *cpp);
- if ((alias_result = dict_get(dict, name)) != 0) {
+ if ((alias_result = get_alias(state, dict, name)) != 0) {
if (msg_verbose)
msg_info("%s: %s: %s = %s", myname, *cpp, name, alias_result);
state.loop_info = delivered_hdr_init(rqst->fp, rqst->data_offset,
FOLD_ADDR_ALL);
state.request = rqst;
+ state.alias_key = vstring_alloc(100);
/*
* Iterate over each recipient named in the delivery request. When the
*/
delivered_hdr_free(state.loop_info);
deliver_attr_free(&state.msg_attr);
+ vstring_free(state.alias_key);
return (msg_stat);
}
BH_TABLE *dup_filter; /* internal duplicate filter */
DELIVERED_HDR_INFO *loop_info; /* external loop filter */
DELIVER_REQUEST *request; /* as from queue manager */
+ VSTRING *alias_key; /* external-form search key */
} LOCAL_STATE;
#define RESET_OWNER_ATTR(msg_attr, level) { \
/* text, such as regexp: and pcre:. This resulted in loss of
/* information with $\fInumber\fR substitutions.
/*
+/* In a database file, \fBpostalias\fR(1) stores keys in the external
+/* (quoted) form. Historically, Postfix versions 3.10 and earlier
+/* stored the internal (unquoted) form. This was not consistent
+/* with \fBpostmap\fR(1) behavior. For backwards compatibility,
+/* Postfix programs will search with the legacy internal form only
+/* if the preferred external form is not found, and the internal
+/* and external forms differ.
+/*
/* Options:
/* .IP "\fB-c \fIconfig_dir\fR"
/* Read the \fBmain.cf\fR configuration file in the named directory
tok822_unlink(colon);
tok822_free(colon);
- tok822_internalize(key_buffer, key_list, TOK822_STR_DEFL);
+ tok822_externalize(key_buffer, key_list, TOK822_STR_DEFL);
tok822_free_tree(key_list);
tok822_externalize(value_buffer, value_list, TOK822_STR_DEFL);
/* keys is supported in Postfix 3.2 and later, by surrounding the
/* key with double quote characters `"'. Within the double quotes,
/* double quote `"' and backslash `\\' characters can be included
-/* by quoting them with a preceding backslash.
+/* by quoting them with a preceding backslash. For backwards
+/* compatibility, Postfix programs will search with the legacy
+/* internal form only if the preferred external form is not found,
+/* and the internal and external forms differ.
/*
/* When the \fB-F\fR option is given, the \fIvalue\fR must
/* specify one or more filenames separated by comma and/or
inet_addr_sizes.c quote_for_json.c mystrerror.c \
sane_sockaddr_to_hostaddr.c normalize_ws.c valid_uri_scheme.c \
clean_ascii_cntrl_space.c normalize_v4mapped_addr.c ossl_digest.c \
- mac_midna.c wrap_stat.c
+ mac_midna.c wrap_stat.c dynamicmaps.c
OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \
attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \
mkmap_fail.o mkmap_open.o inet_prefix_top.o inet_addr_sizes.o \
quote_for_json.o mystrerror.o sane_sockaddr_to_hostaddr.o \
normalize_ws.o valid_uri_scheme.o clean_ascii_cntrl_space.o \
- normalize_v4mapped_addr.o ossl_digest.o mac_midna.o wrap_stat.o
+ normalize_v4mapped_addr.o ossl_digest.o mac_midna.o wrap_stat.o \
+ dynamicmaps.o
# MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf.
# When hard-linking these, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
# otherwise it sets the PLUGIN_* macros.
known_tcp_ports.h sane_strtol.h hash_fnv.h ldseed.h mkmap.h \
inet_prefix_top.h inet_addr_sizes.h valid_uri_scheme.h \
clean_ascii_cntrl_space.h normalize_v4mapped_addr.h ossl_digest.h \
- mac_midna.h wrap_stat.h
+ mac_midna.h wrap_stat.h dynamicmaps.h
TESTSRC = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
stream_test.c dup2_pass_on_exec.c
DEFS = -I. -D$(SYSTYPE)
duplex_pipe.o: iostuff.h
duplex_pipe.o: sane_socketpair.h
duplex_pipe.o: sys_defs.h
+dynamicmaps.o: argv.h
+dynamicmaps.o: check_arg.h
+dynamicmaps.o: dict.h
+dynamicmaps.o: dynamicmaps.c
+dynamicmaps.o: dynamicmaps.h
+dynamicmaps.o: htable.h
+dynamicmaps.o: load_lib.h
+dynamicmaps.o: mkmap.h
+dynamicmaps.o: msg.h
+dynamicmaps.o: myflock.h
+dynamicmaps.o: mymalloc.h
+dynamicmaps.o: scan_dir.h
+dynamicmaps.o: split_at.h
+dynamicmaps.o: stringops.h
+dynamicmaps.o: sys_defs.h
+dynamicmaps.o: vbuf.h
+dynamicmaps.o: vstream.h
+dynamicmaps.o: vstring.h
+dynamicmaps.o: vstring_vstream.h
edit_file.o: check_arg.h
edit_file.o: edit_file.c
edit_file.o: edit_file.h
#include <stringops.h>
#include <split_at.h>
#include <scan_dir.h>
-
- /*
- * Global library.
- */
#include <dynamicmaps.h>
#ifdef USE_DYNAMIC_MAPS