From: Wietse Venema Date: Thu, 4 Jan 2007 05:00:00 +0000 (-0500) Subject: postfix-2.3.7-RC1 X-Git-Tag: v2.3.7-RC1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6554228f27fe6c869c80ff5d664910387d4ee478;p=thirdparty%2Fpostfix.git postfix-2.3.7-RC1 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 08f51e3ba..7dc529bbc 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -12907,3 +12907,14 @@ Apologies for any names omitted. reject_unknown_sender/recipient_domain, so that Postfix would still accept mail from domains with a zero-length MX hostname. File: smtpd/smtpd_check.c. + +20070104 + + Bugfix (introduced Postfix 2.3): when creating an alias map + on a NIS-enabled system, don't case-fold the YP_MASTER_NAME + and YP_LAST_MODIFIED lookup keys. This requires that an + application can turn off case folding on the fly. This is + a point fix. A complete fix requires updates to other map + types and to the proxymap protocol, which is too much change + for a stable release. Files: postalias/postalias.c, + util/dict_db.c, util/dict_dbm.c, util/dict_cdb.c. diff --git a/postfix/html/postalias.1.html b/postfix/html/postalias.1.html index dab7e015a..0d5daca65 100644 --- a/postfix/html/postalias.1.html +++ b/postfix/html/postalias.1.html @@ -21,13 +21,13 @@ POSTALIAS(1) POSTALIAS(1) able for the use as NIS alias maps. If the result files do not exist they will be created with - the same group and other read permissions as the source + the same group and other read permissions as their source file. While a database update is in progress, signal delivery is postponed, and an exclusive, advisory, lock is placed on the entire database, in order to avoid surprises in spec- - tator programs. + tator processes. The format of Postfix alias input files is described in aliases(5). @@ -60,111 +60,116 @@ POSTALIAS(1) POSTALIAS(1) -f Do not fold the lookup key to lower case while cre- ating or querying a table. - -i Incremental mode. Read entries from standard input + 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. + + -i Incremental mode. Read entries from standard input and do not truncate an existing database. By - default, postalias(1) creates a new database from + default, postalias(1) creates a new database from the entries in file_name. - -N Include the terminating null character that termi- - nates lookup keys and values. By default, postal- - ias(1) does whatever is the default for the host + -N Include the terminating null character that termi- + nates lookup keys and values. By default, postal- + ias(1) does whatever is the default for the host operating system. - -n Don't include the terminating null character that - terminates lookup keys and values. By default, - postalias(1) does whatever is the default for the + -n Don't include the terminating null character that + terminates lookup keys and values. By default, + postalias(1) does whatever is the default for the host operating system. - -o Do not release root privileges when processing a + -o Do not release root privileges when processing a non-root input file. By default, postalias(1) drops - root privileges and runs as the source file owner + root privileges and runs as the source file owner instead. -p Do not inherit the file access permissions from the input file when creating a new file. Instead, cre- - ate a new file with default access permissions + ate a new file with default access permissions (mode 0644). - -q key Search the specified maps for key and write the - first value found to the standard output stream. + -q key Search the specified maps for key and write the + first value found to the standard output stream. The exit status is zero when the requested informa- tion was found. If a key value of - is specified, the program reads - key values from the standard input stream and - writes one line of key: value output for each key - that was found. The exit status is zero when at + key values from the standard input stream and + writes one line of key: value output for each key + that was found. The exit status is zero when at least one of the requested keys was found. -r When updating a table, do not complain about attempts to update existing entries, and make those updates anyway. - -s Retrieve all database elements, and write one line + -s Retrieve all database elements, and write one line of key: value output for each element. The elements - are printed in database order, which is not neces- - sarily the same as the original input order. This - feature is available in Postfix version 2.2 and + are printed in database order, which is not neces- + sarily 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. -v Enable verbose logging for debugging purposes. Mul- - tiple -v options make the software increasingly + tiple -v options make the software increasingly verbose. -w When updating a table, do not complain about - attempts to update existing entries, and ignore + attempts to update existing entries, and ignore those attempts. Arguments: file_type - The database type. To find out what types are sup- + The database type. To find out what types are sup- ported, use the "postconf -m" command. - The postalias(1) command can query any supported - file type, but it can create only the following + The postalias(1) command can query any supported + file type, but it can create only the following file types: - btree The output is a btree file, named - file_name.db. This is available on systems + btree The output is a btree file, named + file_name.db. This is available on systems with support for db databases. - cdb The output is one file named file_name.cdb. - This is available on systems with support + cdb The output is one file named file_name.cdb. + This is available on systems with support for cdb databases. - dbm The output consists of two files, named - file_name.pag and file_name.dir. This is - available on systems with support for dbm + dbm The output consists of two files, named + file_name.pag and file_name.dir. This is + available on systems with support for dbm databases. - hash The output is a hashed file, named - file_name.db. This is available on systems + hash The output is a hashed file, named + file_name.db. This is available on systems with support for db databases. - sdbm The output consists of two files, named - file_name.pag and file_name.dir. This is - available on systems with support for sdbm + sdbm The output consists of two files, named + file_name.pag and file_name.dir. This is + available on systems with support for sdbm databases. - When no file_type is specified, the software uses - the database type specified via the default_data- + When no file_type is specified, the software uses + the database type specified via the default_data- base_type configuration parameter. The default - value for this parameter depends on the host envi- + value for this parameter depends on the host envi- ronment. file_name - The name of the alias database source file when + The name of the alias database source file when creating a database. DIAGNOSTICS - Problems are logged to the standard error stream and to - syslogd(8). No output means that no problems were - detected. Duplicate entries are skipped and are flagged + Problems are logged to the standard error stream and to + syslogd(8). No output means that no problems were + detected. Duplicate entries are skipped and are flagged with a warning. - postalias(1) terminates with zero exit status in case of - success (including successful "postalias -q" lookup) and + postalias(1) terminates with zero exit status in case of + success (including successful "postalias -q" lookup) and terminates with non-zero exit status in case of failure. ENVIRONMENT @@ -175,26 +180,26 @@ POSTALIAS(1) POSTALIAS(1) Enable verbose logging for debugging purposes. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant + The following main.cf parameters are especially relevant to this program. - The text below provides only a parameter summary. See + The text below provides only a parameter summary. See postconf(5) for more details including examples. alias_database (see 'postconf -d' output) - The alias databases for local(8) delivery that are + The alias databases for local(8) delivery that are updated with "newaliases" or with "sendmail -bi". config_directory (see 'postconf -d' output) - The default location of the Postfix main.cf and + The default location of the Postfix main.cf and master.cf configuration files. berkeley_db_create_buffer_size (16777216) - The per-table I/O buffer size for programs that + The per-table I/O buffer size for programs that create Berkeley DB hash or btree tables. berkeley_db_read_buffer_size (131072) - The per-table I/O buffer size for programs that + The per-table I/O buffer size for programs that read Berkeley DB hash or btree tables. default_database_type (see 'postconf -d' output) @@ -205,8 +210,8 @@ POSTALIAS(1) POSTALIAS(1) The syslog facility of Postfix logging. syslog_name (postfix) - The mail system name that is prepended to the - process name in syslog records, so that "smtpd" + The mail system name that is prepended to the + process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd". STANDARDS @@ -225,7 +230,7 @@ POSTALIAS(1) POSTALIAS(1) DATABASE_README, Postfix lookup table overview LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/html/postmap.1.html b/postfix/html/postmap.1.html index 53d86f0b3..0eafaf3d2 100644 --- a/postfix/html/postmap.1.html +++ b/postfix/html/postmap.1.html @@ -22,13 +22,13 @@ POSTMAP(1) POSTMAP(1) makemap file_type file_name < file_name If the result files do not exist they will be created with - the same group and other read permissions as the source + the same group and other read permissions as their source file. While the table update is in progress, signal delivery is postponed, and an exclusive, advisory, lock is placed on the entire table, in order to avoid surprises in spectator - programs. + processes. INPUT FILE FORMAT The format of a lookup table input file is as follows: @@ -78,109 +78,114 @@ POSTMAP(1) POSTMAP(1) -f Do not fold the lookup key to lower case while cre- ating or querying a table. - -i Incremental mode. Read entries from standard input + 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. + + -i Incremental mode. Read entries from standard input and do not truncate an existing database. By default, postmap(1) creates a new database from the entries in file_name. - -N Include the terminating null character that termi- - nates lookup keys and values. By default, - postmap(1) does whatever is the default for the + -N Include the terminating null character that termi- + nates lookup keys and values. By default, + postmap(1) does whatever is the default for the host operating system. - -n Don't include the terminating null character that - terminates lookup keys and values. By default, - postmap(1) does whatever is the default for the + -n Don't include the terminating null character that + terminates lookup keys and values. By default, + postmap(1) does whatever is the default for the host operating system. - -o Do not release root privileges when processing a - non-root input file. By default, postmap(1) drops - root privileges and runs as the source file owner + -o Do not release root privileges when processing a + non-root input file. By default, postmap(1) drops + root privileges and runs as the source file owner instead. -p Do not inherit the file access permissions from the input file when creating a new file. Instead, cre- - ate a new file with default access permissions + ate a new file with default access permissions (mode 0644). - -q key Search the specified maps for key and write the - first value found to the standard output stream. + -q key Search the specified maps for key and write the + first value found to the standard output stream. The exit status is zero when the requested informa- tion was found. If a key value of - is specified, the program reads - key values from the standard input stream and - writes one line of key value output for each key - that was found. The exit status is zero when at + key values from the standard input stream and + writes one line of key value output for each key + that was found. The exit status is zero when at least one of the requested keys was found. -r When updating a table, do not complain about attempts to update existing entries, and make those updates anyway. - -s Retrieve all database elements, and write one line - of key value output for each element. The elements - are printed in database order, which is not neces- - sarily the same as the original input order. This - feature is available in Postfix version 2.2 and + -s Retrieve all database elements, and write one line + of key value output for each element. The elements + are printed in database order, which is not neces- + sarily 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. -v Enable verbose logging for debugging purposes. Mul- - tiple -v options make the software increasingly + tiple -v options make the software increasingly verbose. -w When updating a table, do not complain about - attempts to update existing entries, and ignore + attempts to update existing entries, and ignore those attempts. Arguments: file_type - The database type. To find out what types are sup- + The database type. To find out what types are sup- ported, use the "postconf -m" command. The postmap(1) command can query any supported file - type, but it can create only the following file + type, but it can create only the following file types: - btree The output file is a btree file, named - file_name.db. This is available on systems + btree The output file is a btree file, named + file_name.db. This is available on systems with support for db databases. cdb The output consists of one file, named file_name.cdb. This is available on systems with support for cdb databases. - dbm The output consists of two files, named - file_name.pag and file_name.dir. This is - available on systems with support for dbm + dbm The output consists of two files, named + file_name.pag and file_name.dir. This is + available on systems with support for dbm databases. - hash The output file is a hashed file, named - file_name.db. This is available on systems + hash The output file is a hashed file, named + file_name.db. This is available on systems with support for db databases. - sdbm The output consists of two files, named - file_name.pag and file_name.dir. This is - available on systems with support for sdbm + sdbm The output consists of two files, named + file_name.pag and file_name.dir. This is + available on systems with support for sdbm databases. - When no file_type is specified, the software uses - the database type specified via the default_data- + When no file_type is specified, the software uses + the database type specified via the default_data- base_type configuration parameter. file_name - The name of the lookup table source file when + The name of the lookup table source file when rebuilding a database. DIAGNOSTICS - Problems are logged to the standard error stream and to - syslogd(8). No output means that no problems were - detected. Duplicate entries are skipped and are flagged + Problems are logged to the standard error stream and to + syslogd(8). No output means that no problems were + detected. Duplicate entries are skipped and are flagged with a warning. - postmap(1) terminates with zero exit status in case of - success (including successful "postmap -q" lookup) and + postmap(1) terminates with zero exit status in case of + success (including successful "postmap -q" lookup) and terminates with non-zero exit status in case of failure. ENVIRONMENT @@ -191,21 +196,21 @@ POSTMAP(1) POSTMAP(1) Enable verbose logging for debugging purposes. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant + The following main.cf parameters are especially relevant to this program. The text below provides only a parameter - summary. See postconf(5) for more details including exam- + summary. See postconf(5) for more details including exam- ples. berkeley_db_create_buffer_size (16777216) - The per-table I/O buffer size for programs that + The per-table I/O buffer size for programs that create Berkeley DB hash or btree tables. berkeley_db_read_buffer_size (131072) - The per-table I/O buffer size for programs that + The per-table I/O buffer size for programs that read Berkeley DB hash or btree tables. config_directory (see 'postconf -d' output) - The default location of the Postfix main.cf and + The default location of the Postfix main.cf and master.cf configuration files. default_database_type (see 'postconf -d' output) @@ -216,8 +221,8 @@ POSTMAP(1) POSTMAP(1) The syslog facility of Postfix logging. syslog_name (postfix) - The mail system name that is prepended to the - process name in syslog records, so that "smtpd" + The mail system name that is prepended to the + process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd". SEE ALSO @@ -230,7 +235,7 @@ POSTMAP(1) POSTMAP(1) DATABASE_README, Postfix lookup table overview LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/man/man1/postalias.1 b/postfix/man/man1/postalias.1 index c8bd57491..390a74e2c 100644 --- a/postfix/man/man1/postalias.1 +++ b/postfix/man/man1/postalias.1 @@ -21,12 +21,12 @@ file formats are expected to be compatible with Sendmail version 8, and are expected to be suitable for the use as NIS alias maps. If the result files do not exist they will be created with the -same group and other read permissions as the source file. +same group and other read permissions as their source file. While a database update is in progress, signal delivery is postponed, and an exclusive, advisory, lock is placed on the entire database, in order to avoid surprises in spectator -programs. +processes. The format of Postfix alias input files is described in \fBaliases\fR(5). @@ -54,6 +54,10 @@ when at least one of the requested keys was found. .IP \fB-f\fR 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 for regular expression tables. There, case folding +is controlled by appending a flag to a pattern. .IP \fB-i\fR Incremental mode. Read entries from standard input and do not truncate an existing database. By default, \fBpostalias\fR(1) creates diff --git a/postfix/man/man1/postmap.1 b/postfix/man/man1/postmap.1 index dc3e9bce7..c5ef94de9 100644 --- a/postfix/man/man1/postmap.1 +++ b/postfix/man/man1/postmap.1 @@ -23,12 +23,12 @@ file formats are expected to be compatible with: \fBmakemap \fIfile_type\fR \fIfile_name\fR < \fIfile_name\fR If the result files do not exist they will be created with the -same group and other read permissions as the source file. +same group and other read permissions as their source file. While the table update is in progress, signal delivery is postponed, and an exclusive, advisory, lock is placed on the entire table, in order to avoid surprises in spectator -programs. +processes. .SH "INPUT FILE FORMAT" .na .nf @@ -78,6 +78,10 @@ when at least one of the requested keys was found. .IP \fB-f\fR 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 for regular expression tables. There, case folding +is controlled by appending a flag to a pattern. .IP \fB-i\fR Incremental mode. Read entries from standard input and do not truncate an existing database. By default, \fBpostmap\fR(1) creates diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 96e58f687..e5f098e22 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,8 +20,8 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20070102" -#define MAIL_VERSION_NUMBER "2.3.6" +#define MAIL_RELEASE_DATE "20070104" +#define MAIL_VERSION_NUMBER "2.3.7-RC1" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff --git a/postfix/src/postalias/postalias.c b/postfix/src/postalias/postalias.c index a62d065f0..e50cebdd0 100644 --- a/postfix/src/postalias/postalias.c +++ b/postfix/src/postalias/postalias.c @@ -15,12 +15,12 @@ /* and are expected to be suitable for the use as NIS alias maps. /* /* If the result files do not exist they will be created with the -/* same group and other read permissions as the source file. +/* same group and other read permissions as their source file. /* /* While a database update is in progress, signal delivery is /* postponed, and an exclusive, advisory, lock is placed on the /* entire database, in order to avoid surprises in spectator -/* programs. +/* processes. /* /* The format of Postfix alias input files is described in /* \fBaliases\fR(5). @@ -48,6 +48,10 @@ /* .IP \fB-f\fR /* 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 for regular expression tables. There, case folding +/* is controlled by appending a flag to a pattern. /* .IP \fB-i\fR /* Incremental mode. Read entries from standard input and do not /* truncate an existing database. By default, \fBpostalias\fR(1) creates @@ -392,6 +396,7 @@ static void postalias(char *map_type, char *path_name, int postalias_flags, mkmap->dict->flags |= DICT_FLAG_TRY0NULL; vstring_sprintf(value_buffer, "%010ld", (long) time((time_t *) 0)); #if (defined(HAS_NIS) || defined(HAS_NISPLUS)) + mkmap->dict->flags &= ~DICT_FLAG_FOLD_FIX; mkmap_append(mkmap, "YP_LAST_MODIFIED", STR(value_buffer)); mkmap_append(mkmap, "YP_MASTER_NAME", var_myhostname); #endif diff --git a/postfix/src/postmap/postmap.c b/postfix/src/postmap/postmap.c index bc9e2bd8f..e8ba14695 100644 --- a/postfix/src/postmap/postmap.c +++ b/postfix/src/postmap/postmap.c @@ -17,12 +17,12 @@ /* \fBmakemap \fIfile_type\fR \fIfile_name\fR < \fIfile_name\fR /* /* If the result files do not exist they will be created with the -/* same group and other read permissions as the source file. +/* same group and other read permissions as their source file. /* /* While the table update is in progress, signal delivery is /* postponed, and an exclusive, advisory, lock is placed on the /* entire table, in order to avoid surprises in spectator -/* programs. +/* processes. /* INPUT FILE FORMAT /* .ad /* .fi @@ -68,6 +68,10 @@ /* .IP \fB-f\fR /* 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 for regular expression tables. There, case folding +/* is controlled by appending a flag to a pattern. /* .IP \fB-i\fR /* Incremental mode. Read entries from standard input and do not /* truncate an existing database. By default, \fBpostmap\fR(1) creates diff --git a/postfix/src/util/dict_cdb.c b/postfix/src/util/dict_cdb.c index 1aa67a3fd..c44e3d643 100644 --- a/postfix/src/util/dict_cdb.c +++ b/postfix/src/util/dict_cdb.c @@ -110,7 +110,9 @@ static const char *dict_cdbq_lookup(DICT *dict, const char *name) /* * Optionally fold the key. */ - if (dict->fold_buf) { + if (dict->flags & DICT_FLAG_FOLD_FIX) { + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); vstring_strcpy(dict->fold_buf, name); name = lowercase(vstring_str(dict->fold_buf)); } @@ -234,11 +236,12 @@ static void dict_cdbm_update(DICT *dict, const char *name, const char *value) /* * Optionally fold the key. */ - if (dict->fold_buf) { + if (dict->flags & DICT_FLAG_FOLD_FIX) { + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); vstring_strcpy(dict->fold_buf, name); name = lowercase(vstring_str(dict->fold_buf)); } - ksize = strlen(name); vsize = strlen(value); diff --git a/postfix/src/util/dict_db.c b/postfix/src/util/dict_db.c index a00a328b1..d58e3f459 100644 --- a/postfix/src/util/dict_db.c +++ b/postfix/src/util/dict_db.c @@ -194,7 +194,9 @@ static const char *dict_db_lookup(DICT *dict, const char *name) /* * Optionally fold the key. */ - if (dict->fold_buf) { + if (dict->flags & DICT_FLAG_FOLD_FIX) { + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); vstring_strcpy(dict->fold_buf, name); name = lowercase(vstring_str(dict->fold_buf)); } @@ -265,7 +267,9 @@ static void dict_db_update(DICT *dict, const char *name, const char *value) /* * Optionally fold the key. */ - if (dict->fold_buf) { + if (dict->flags & DICT_FLAG_FOLD_FIX) { + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); vstring_strcpy(dict->fold_buf, name); name = lowercase(vstring_str(dict->fold_buf)); } @@ -349,7 +353,9 @@ static int dict_db_delete(DICT *dict, const char *name) /* * Optionally fold the key. */ - if (dict->fold_buf) { + if (dict->flags & DICT_FLAG_FOLD_FIX) { + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); vstring_strcpy(dict->fold_buf, name); name = lowercase(vstring_str(dict->fold_buf)); } diff --git a/postfix/src/util/dict_dbm.c b/postfix/src/util/dict_dbm.c index d91497e9c..e034aecf6 100644 --- a/postfix/src/util/dict_dbm.c +++ b/postfix/src/util/dict_dbm.c @@ -93,7 +93,9 @@ static const char *dict_dbm_lookup(DICT *dict, const char *name) /* * Optionally fold the key. */ - if (dict->fold_buf) { + if (dict->flags & DICT_FLAG_FOLD_FIX) { + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); vstring_strcpy(dict->fold_buf, name); name = lowercase(vstring_str(dict->fold_buf)); } @@ -161,7 +163,9 @@ static void dict_dbm_update(DICT *dict, const char *name, const char *value) /* * Optionally fold the key. */ - if (dict->fold_buf) { + if (dict->flags & DICT_FLAG_FOLD_FIX) { + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); vstring_strcpy(dict->fold_buf, name); name = lowercase(vstring_str(dict->fold_buf)); } @@ -239,7 +243,9 @@ static int dict_dbm_delete(DICT *dict, const char *name) /* * Optionally fold the key. */ - if (dict->fold_buf) { + if (dict->flags & DICT_FLAG_FOLD_FIX) { + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); vstring_strcpy(dict->fold_buf, name); name = lowercase(vstring_str(dict->fold_buf)); }