mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-23 02:17:44 +00:00
postfix-2.9-20120117
This commit is contained in:
parent
beab543c46
commit
ce7eb1e2fe
1
postfix/.indent.pro
vendored
1
postfix/.indent.pro
vendored
@ -192,6 +192,7 @@
|
|||||||
-TNAME_CODE
|
-TNAME_CODE
|
||||||
-TNAME_MASK
|
-TNAME_MASK
|
||||||
-TNBBIO
|
-TNBBIO
|
||||||
|
-TPC_DBMS_INFO
|
||||||
-TPC_MASTER_ENT
|
-TPC_MASTER_ENT
|
||||||
-TPC_PARAM_NODE
|
-TPC_PARAM_NODE
|
||||||
-TPC_SERVICE_DEF
|
-TPC_SERVICE_DEF
|
||||||
|
@ -17557,3 +17557,13 @@ Apologies for any names omitted.
|
|||||||
|
|
||||||
Cleanup: tiny memory leaks after surrogate database opens.
|
Cleanup: tiny memory leaks after surrogate database opens.
|
||||||
Files: util/dict_cidr.c, util/dict_db.c.
|
Files: util/dict_cidr.c, util/dict_db.c.
|
||||||
|
|
||||||
|
20111217
|
||||||
|
|
||||||
|
Cleanup: support for legacy-style database configuration
|
||||||
|
where parameter names are generated by appending suffixes
|
||||||
|
to the database name. Files: postconf/postconf_dbms.c.
|
||||||
|
|
||||||
|
Other: build without Berkeley DB support (make makefiles
|
||||||
|
"CCARGS=$CCARGS -DNO_DB"). Files: makedefs, util/sys_defs.h,
|
||||||
|
proto/DB_README.html, proto/INSTALL.html.
|
||||||
|
@ -14,16 +14,33 @@ Note: Berkeley DB version 4 is not supported by Postfix versions before 2.0.
|
|||||||
|
|
||||||
This document describes:
|
This document describes:
|
||||||
|
|
||||||
1. How to build Postfix on systems without Berkeley DB library.
|
1. How to build Postfix without Berkeley DB support even if the system comes
|
||||||
|
with Berkeley DB.
|
||||||
|
|
||||||
2. How to build Postfix on BSD or Linux systems with multiple Berkeley DB
|
2. How to build Postfix on systems that normally have no Berkeley DB library.
|
||||||
|
|
||||||
|
3. How to build Postfix on BSD or Linux systems with multiple Berkeley DB
|
||||||
versions.
|
versions.
|
||||||
|
|
||||||
3. How to tweak performance.
|
4. How to tweak performance.
|
||||||
|
|
||||||
4. Missing pthread library trouble.
|
5. Missing pthread library trouble.
|
||||||
|
|
||||||
BBuuiillddiinngg PPoossttffiixx oonn ssyysstteemmss wwiitthhoouutt BBeerrkkeelleeyy DDBB
|
BBuuiillddiinngg PPoossttffiixx wwiitthhoouutt BBeerrkkeelleeyy DDBB ssuuppppoorrtt eevveenn iiff tthhee ssyysstteemm ccoommeess wwiitthh
|
||||||
|
BBeerrkkeelleeyy DDBB
|
||||||
|
|
||||||
|
Note: The following instructions apply to Postfix 2.9 and later.
|
||||||
|
|
||||||
|
Postfix will normally enable Berkeley DB support if the system is known to have
|
||||||
|
it. To build Postfix without Berkeley DB support, build the makefiles as
|
||||||
|
follows:
|
||||||
|
|
||||||
|
% make makefiles CCARGS="-DNO_DB"
|
||||||
|
% make
|
||||||
|
|
||||||
|
This will disable support for "hash" and "btree" files.
|
||||||
|
|
||||||
|
BBuuiillddiinngg PPoossttffiixx oonn ssyysstteemmss tthhaatt nnoorrmmaallllyy hhaavvee nnoo BBeerrkkeelleeyy DDBB lliibbrraarryy
|
||||||
|
|
||||||
Some UNIXes ship without Berkeley DB support; for historical reasons these use
|
Some UNIXes ship without Berkeley DB support; for historical reasons these use
|
||||||
DBM files instead. A problem with DBM files is that they can store only limited
|
DBM files instead. A problem with DBM files is that they can store only limited
|
||||||
@ -44,14 +61,12 @@ way to keep things from falling apart.
|
|||||||
To build Postfix after you installed the Berkeley DB from source code, use
|
To build Postfix after you installed the Berkeley DB from source code, use
|
||||||
something like:
|
something like:
|
||||||
|
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
||||||
AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
|
AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
|
||||||
% make
|
% make
|
||||||
|
|
||||||
Solaris needs this:
|
Solaris needs this:
|
||||||
|
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
||||||
AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
|
AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
|
||||||
% make
|
% make
|
||||||
@ -78,7 +93,6 @@ Postfix builds with the default DB version that ships with the system.
|
|||||||
To build Postfix on BSD systems with a non-default DB version, use a variant of
|
To build Postfix on BSD systems with a non-default DB version, use a variant of
|
||||||
the following commands:
|
the following commands:
|
||||||
|
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
|
% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
|
||||||
% make
|
% make
|
||||||
|
|
||||||
|
@ -246,6 +246,11 @@ The following is an extensive list of names and values.
|
|||||||
| |following directives turn off Postfix features|
|
| |following directives turn off Postfix features|
|
||||||
| |at compile time: |
|
| |at compile time: |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
|| |Do not build with Berkeley DB support. By |
|
||||||
|
||-DNO_DB |default, Berkeley DB support is compiled in on|
|
||||||
|
|| |platforms that are known to support this |
|
||||||
|
|| |feature. |
|
||||||
|
|_|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|| |Do not build with Solaris /dev/poll support. |
|
|| |Do not build with Solaris /dev/poll support. |
|
||||||
||-DNO_DEVPOLL |By default, /dev/poll support is compiled in |
|
||-DNO_DEVPOLL |By default, /dev/poll support is compiled in |
|
||||||
|| |on Solaris versions that are known to support |
|
|| |on Solaris versions that are known to support |
|
||||||
|
@ -33,8 +33,11 @@ before 2.0. </p>
|
|||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<li> <p> How to build Postfix on <a href="#no_db">systems without
|
<li> <p> How to build Postfix <a href="#disable_db">without Berkeley
|
||||||
Berkeley DB library</a>. </p>
|
DB support</a> even if the system comes with Berkeley DB. </p>
|
||||||
|
|
||||||
|
<li> <p> How to build Postfix on <a href="#no_db">systems that
|
||||||
|
normally have no Berkeley DB library</a>. </p>
|
||||||
|
|
||||||
<li> <p> How to build Postfix on <a href="#bsd">BSD</a> or <a
|
<li> <p> How to build Postfix on <a href="#bsd">BSD</a> or <a
|
||||||
href="#linux">Linux</a> systems with multiple Berkeley DB
|
href="#linux">Linux</a> systems with multiple Berkeley DB
|
||||||
@ -46,8 +49,26 @@ versions. </p>
|
|||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<h2><a name="no_db">Building Postfix on systems without Berkeley
|
<h2><a name="disable_db">Building Postfix without Berkeley
|
||||||
DB</a></h2>
|
DB support even if the system comes with Berkeley DB</a></h2>
|
||||||
|
|
||||||
|
<p> Note: The following instructions apply to Postfix 2.9 and later. </p>
|
||||||
|
|
||||||
|
<p> Postfix will normally enable Berkeley DB support if the system
|
||||||
|
is known to have it. To build Postfix without Berkeley DB support,
|
||||||
|
build the makefiles as follows: </p>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre>
|
||||||
|
% make makefiles CCARGS="-DNO_DB"
|
||||||
|
% make
|
||||||
|
</pre>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<p> This will disable support for "hash" and "btree" files. </p>
|
||||||
|
|
||||||
|
<h2><a name="no_db">Building Postfix on systems that normally have
|
||||||
|
no Berkeley DB library</a></h2>
|
||||||
|
|
||||||
<p> Some UNIXes ship without Berkeley DB support; for historical
|
<p> Some UNIXes ship without Berkeley DB support; for historical
|
||||||
reasons these use DBM files instead. A problem with DBM files is
|
reasons these use DBM files instead. A problem with DBM files is
|
||||||
@ -73,7 +94,6 @@ source code, use something like: </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
||||||
AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
|
AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
|
||||||
% make
|
% make
|
||||||
@ -84,7 +104,6 @@ source code, use something like: </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
||||||
AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
|
AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
|
||||||
% make
|
% make
|
||||||
@ -119,7 +138,6 @@ use a variant of the following commands: </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
|
% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
|
||||||
% make
|
% make
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -372,6 +372,10 @@ Specifies non-default compiler arguments, for example, a non-default
|
|||||||
<tt>include</tt> directory. The following directives turn
|
<tt>include</tt> directory. The following directives turn
|
||||||
off Postfix features at compile time:</td> </tr>
|
off Postfix features at compile time:</td> </tr>
|
||||||
|
|
||||||
|
<tr> <td> </td> <td> -DNO_DB </td> <td> Do not build with Berkeley
|
||||||
|
DB support. By default, Berkeley DB support is compiled in on
|
||||||
|
platforms that are known to support this feature. </td> </tr>
|
||||||
|
|
||||||
<tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
|
<tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
|
||||||
Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
|
Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
|
||||||
support is compiled in on Solaris versions that are known to support
|
support is compiled in on Solaris versions that are known to support
|
||||||
|
@ -181,11 +181,13 @@ MEMCACHE_TABLE(5) MEMCACHE_TABLE(5)
|
|||||||
|
|
||||||
<b>max_try (default: 2)</b>
|
<b>max_try (default: 2)</b>
|
||||||
The number of times to try a memcache command
|
The number of times to try a memcache command
|
||||||
before giving up.
|
before giving up. The memcache client does not
|
||||||
|
retry a command when the memcache server accepts no
|
||||||
|
connection.
|
||||||
|
|
||||||
<b>retry_pause (default: 1)</b>
|
<b>retry_pause (default: 1)</b>
|
||||||
The time in seconds to wait after a memcache com-
|
The time in seconds before retrying a failed mem-
|
||||||
mand fails.
|
cache command.
|
||||||
|
|
||||||
<b>timeout (default: 2)</b>
|
<b>timeout (default: 2)</b>
|
||||||
The time limit for sending a memcache command and
|
The time limit for sending a memcache command and
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
# \fIinclude\fR directory.
|
# \fIinclude\fR directory.
|
||||||
# The following directives are special:
|
# The following directives are special:
|
||||||
# .RS
|
# .RS
|
||||||
|
# .IP \fB-DNO_DB\fR
|
||||||
|
# Do not build with Berkeley DB support.
|
||||||
# .IP \fB-DNO_DEVPOLL\fR
|
# .IP \fB-DNO_DEVPOLL\fR
|
||||||
# Do not build with Solaris /dev/poll support.
|
# Do not build with Solaris /dev/poll support.
|
||||||
# By default, /dev/poll support is compiled in on platforms that
|
# By default, /dev/poll support is compiled in on platforms that
|
||||||
|
@ -182,9 +182,11 @@ The maximal memcache reply data length in bytes.
|
|||||||
.IP "\fBline_size_limit (default: 1024)\fR"
|
.IP "\fBline_size_limit (default: 1024)\fR"
|
||||||
The maximal memcache reply line length in bytes.
|
The maximal memcache reply line length in bytes.
|
||||||
.IP "\fBmax_try (default: 2)\fR"
|
.IP "\fBmax_try (default: 2)\fR"
|
||||||
The number of times to try a memcache command before giving up.
|
The number of times to try a memcache command before giving
|
||||||
|
up. The memcache client does not retry a command when the
|
||||||
|
memcache server accepts no connection.
|
||||||
.IP "\fBretry_pause (default: 1)\fR"
|
.IP "\fBretry_pause (default: 1)\fR"
|
||||||
The time in seconds to wait after a memcache command fails.
|
The time in seconds before retrying a failed memcache command.
|
||||||
.IP "\fBtimeout (default: 2)\fR"
|
.IP "\fBtimeout (default: 2)\fR"
|
||||||
The time limit for sending a memcache command and for
|
The time limit for sending a memcache command and for
|
||||||
receiving a memcache reply.
|
receiving a memcache reply.
|
||||||
|
@ -33,8 +33,11 @@ before 2.0. </p>
|
|||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
|
|
||||||
<li> <p> How to build Postfix on <a href="#no_db">systems without
|
<li> <p> How to build Postfix <a href="#disable_db">without Berkeley
|
||||||
Berkeley DB library</a>. </p>
|
DB support</a> even if the system comes with Berkeley DB. </p>
|
||||||
|
|
||||||
|
<li> <p> How to build Postfix on <a href="#no_db">systems that
|
||||||
|
normally have no Berkeley DB library</a>. </p>
|
||||||
|
|
||||||
<li> <p> How to build Postfix on <a href="#bsd">BSD</a> or <a
|
<li> <p> How to build Postfix on <a href="#bsd">BSD</a> or <a
|
||||||
href="#linux">Linux</a> systems with multiple Berkeley DB
|
href="#linux">Linux</a> systems with multiple Berkeley DB
|
||||||
@ -46,8 +49,26 @@ versions. </p>
|
|||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<h2><a name="no_db">Building Postfix on systems without Berkeley
|
<h2><a name="disable_db">Building Postfix without Berkeley
|
||||||
DB</a></h2>
|
DB support even if the system comes with Berkeley DB</a></h2>
|
||||||
|
|
||||||
|
<p> Note: The following instructions apply to Postfix 2.9 and later. </p>
|
||||||
|
|
||||||
|
<p> Postfix will normally enable Berkeley DB support if the system
|
||||||
|
is known to have it. To build Postfix without Berkeley DB support,
|
||||||
|
build the makefiles as follows: </p>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre>
|
||||||
|
% make makefiles CCARGS="-DNO_DB"
|
||||||
|
% make
|
||||||
|
</pre>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<p> This will disable support for "hash" and "btree" files. </p>
|
||||||
|
|
||||||
|
<h2><a name="no_db">Building Postfix on systems that normally have
|
||||||
|
no Berkeley DB library</a></h2>
|
||||||
|
|
||||||
<p> Some UNIXes ship without Berkeley DB support; for historical
|
<p> Some UNIXes ship without Berkeley DB support; for historical
|
||||||
reasons these use DBM files instead. A problem with DBM files is
|
reasons these use DBM files instead. A problem with DBM files is
|
||||||
@ -73,7 +94,6 @@ source code, use something like: </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
||||||
AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
|
AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
|
||||||
% make
|
% make
|
||||||
@ -84,7 +104,6 @@ source code, use something like: </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
|
||||||
AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
|
AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
|
||||||
% make
|
% make
|
||||||
@ -119,7 +138,6 @@ use a variant of the following commands: </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
% make tidy
|
|
||||||
% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
|
% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
|
||||||
% make
|
% make
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -372,6 +372,10 @@ Specifies non-default compiler arguments, for example, a non-default
|
|||||||
<tt>include</tt> directory. The following directives turn
|
<tt>include</tt> directory. The following directives turn
|
||||||
off Postfix features at compile time:</td> </tr>
|
off Postfix features at compile time:</td> </tr>
|
||||||
|
|
||||||
|
<tr> <td> </td> <td> -DNO_DB </td> <td> Do not build with Berkeley
|
||||||
|
DB support. By default, Berkeley DB support is compiled in on
|
||||||
|
platforms that are known to support this feature. </td> </tr>
|
||||||
|
|
||||||
<tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
|
<tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
|
||||||
Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
|
Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
|
||||||
support is compiled in on Solaris versions that are known to support
|
support is compiled in on Solaris versions that are known to support
|
||||||
|
@ -170,9 +170,11 @@
|
|||||||
# .IP "\fBline_size_limit (default: 1024)\fR"
|
# .IP "\fBline_size_limit (default: 1024)\fR"
|
||||||
# The maximal memcache reply line length in bytes.
|
# The maximal memcache reply line length in bytes.
|
||||||
# .IP "\fBmax_try (default: 2)\fR"
|
# .IP "\fBmax_try (default: 2)\fR"
|
||||||
# The number of times to try a memcache command before giving up.
|
# The number of times to try a memcache command before giving
|
||||||
|
# up. The memcache client does not retry a command when the
|
||||||
|
# memcache server accepts no connection.
|
||||||
# .IP "\fBretry_pause (default: 1)\fR"
|
# .IP "\fBretry_pause (default: 1)\fR"
|
||||||
# The time in seconds to wait after a memcache command fails.
|
# The time in seconds before retrying a failed memcache command.
|
||||||
# .IP "\fBtimeout (default: 2)\fR"
|
# .IP "\fBtimeout (default: 2)\fR"
|
||||||
# The time limit for sending a memcache command and for
|
# The time limit for sending a memcache command and for
|
||||||
# receiving a memcache reply.
|
# receiving a memcache reply.
|
||||||
|
@ -173,6 +173,7 @@
|
|||||||
#include <safe.h>
|
#include <safe.h>
|
||||||
#include <safe_open.h>
|
#include <safe_open.h>
|
||||||
#include <mymalloc.h>
|
#include <mymalloc.h>
|
||||||
|
#include <dict.h>
|
||||||
#ifdef HAS_DB
|
#ifdef HAS_DB
|
||||||
#include <dict_db.h>
|
#include <dict_db.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20120115"
|
#define MAIL_RELEASE_DATE "20120117"
|
||||||
#define MAIL_VERSION_NUMBER "2.9"
|
#define MAIL_VERSION_NUMBER "2.9"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
SRCS = postconf.c postconf_builtin.c postconf_edit.c postconf_main.c \
|
SRCS = postconf.c postconf_builtin.c postconf_edit.c postconf_main.c \
|
||||||
postconf_master.c postconf_misc.c postconf_node.c postconf_other.c \
|
postconf_master.c postconf_misc.c postconf_node.c postconf_other.c \
|
||||||
postconf_service.c postconf_unused.c postconf_user.c
|
postconf_service.c postconf_unused.c postconf_user.c postconf_dbms.c
|
||||||
OBJS = postconf.o postconf_builtin.o postconf_edit.o postconf_main.o \
|
OBJS = postconf.o postconf_builtin.o postconf_edit.o postconf_main.o \
|
||||||
postconf_master.o postconf_misc.o postconf_node.o postconf_other.o \
|
postconf_master.o postconf_misc.o postconf_node.o postconf_other.o \
|
||||||
postconf_service.o postconf_unused.o postconf_user.o
|
postconf_service.o postconf_unused.o postconf_user.o postconf_dbms.o
|
||||||
HDRS = postconf.h
|
HDRS = postconf.h
|
||||||
TESTSRC =
|
TESTSRC =
|
||||||
DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
|
DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
|
||||||
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
|
CFLAGS = $(DEBUG) $(OPT) $(DEFS) -DLEGACY_DBMS_SUPPORT
|
||||||
TESTPROG=
|
TESTPROG=
|
||||||
MAKES = bool_table.h bool_vars.h int_table.h int_vars.h str_table.h \
|
MAKES = bool_table.h bool_vars.h int_table.h int_vars.h str_table.h \
|
||||||
str_vars.h time_table.h time_vars.h raw_table.h raw_vars.h \
|
str_vars.h time_table.h time_vars.h raw_table.h raw_vars.h \
|
||||||
@ -42,7 +42,7 @@ test: $(TESTPROG)
|
|||||||
|
|
||||||
tests: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
|
tests: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
|
||||||
test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 \
|
test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 \
|
||||||
test22 test23 test24 test25 test26 test27
|
test22 test23 test24 test25 test26 test27 test28 test29
|
||||||
|
|
||||||
root_tests:
|
root_tests:
|
||||||
|
|
||||||
@ -354,6 +354,50 @@ test27: $(PROG) test27.ref
|
|||||||
diff test27.ref test27.tmp
|
diff test27.ref test27.tmp
|
||||||
rm -f main.cf master.cf test27.tmp
|
rm -f main.cf master.cf test27.tmp
|
||||||
|
|
||||||
|
# Test macro expansion, type:table parsing and scoping.
|
||||||
|
|
||||||
|
test28: $(PROG) test28.ref
|
||||||
|
rm -f main.cf master.cf
|
||||||
|
touch main.cf master.cf
|
||||||
|
echo 'xx = proxy:ldap:foo' >> main.cf
|
||||||
|
echo 'foo_domain = bar' >> main.cf
|
||||||
|
echo 'header_checks = ldap:hh' >> main.cf
|
||||||
|
echo 'hh_domain = whatever' >> main.cf
|
||||||
|
echo 'zz = $$yy' >> main.cf
|
||||||
|
echo 'yy = aap' >> main.cf
|
||||||
|
echo 'db = memcache' >> main.cf
|
||||||
|
echo whatevershebrings unix - n n - 0 other >> master.cf
|
||||||
|
echo ' -o body_checks=$$db:zz' >> master.cf
|
||||||
|
echo 'zz_domain = whatever' >> main.cf
|
||||||
|
echo 'aa_domain = whatever' >> main.cf
|
||||||
|
./$(PROG) -nc . >test28.tmp 2>&1
|
||||||
|
diff test28.ref test28.tmp
|
||||||
|
rm -f main.cf master.cf test28.tmp
|
||||||
|
|
||||||
|
# Test the handling of known and unknown database-defined suffixes.
|
||||||
|
|
||||||
|
test29: $(PROG) test29.ref
|
||||||
|
rm -f main.cf master.cf
|
||||||
|
touch main.cf master.cf
|
||||||
|
echo 'ldapxx = proxy:ldap:ldapfoo' >> main.cf
|
||||||
|
echo 'ldapfoo_domain = bar' >> main.cf
|
||||||
|
echo 'ldapfoo_domainx = bar' >> main.cf
|
||||||
|
echo 'mysqlxx = proxy:mysql:mysqlfoo' >> main.cf
|
||||||
|
echo 'mysqlfoo_domain = bar' >> main.cf
|
||||||
|
echo 'mysqlfoo_domainx = bar' >> main.cf
|
||||||
|
echo 'pgsqlxx = proxy:pgsql:pgsqlfoo' >> main.cf
|
||||||
|
echo 'pgsqlfoo_domain = bar' >> main.cf
|
||||||
|
echo 'pgsqlfoo_domainx = bar' >> main.cf
|
||||||
|
echo 'sqlitexx = proxy:sqlite:sqlitefoo' >> main.cf
|
||||||
|
echo 'sqlitefoo_domain = bar' >> main.cf
|
||||||
|
echo 'sqlitefoo_domainx = bar' >> main.cf
|
||||||
|
echo 'memcachexx = proxy:memcache:memcachefoo' >> main.cf
|
||||||
|
echo 'memcachefoo_domain = bar' >> main.cf
|
||||||
|
echo 'memcachefoo_domainx = bar' >> main.cf
|
||||||
|
./$(PROG) -nc . >test29.tmp 2>&1
|
||||||
|
diff test29.ref test29.tmp
|
||||||
|
rm -f main.cf master.cf test29.tmp
|
||||||
|
|
||||||
printfck: $(OBJS) $(PROG)
|
printfck: $(OBJS) $(PROG)
|
||||||
rm -rf printfck
|
rm -rf printfck
|
||||||
mkdir printfck
|
mkdir printfck
|
||||||
@ -441,6 +485,26 @@ postconf_builtin.o: str_table.h
|
|||||||
postconf_builtin.o: str_vars.h
|
postconf_builtin.o: str_vars.h
|
||||||
postconf_builtin.o: time_table.h
|
postconf_builtin.o: time_table.h
|
||||||
postconf_builtin.o: time_vars.h
|
postconf_builtin.o: time_vars.h
|
||||||
|
postconf_dbms.o: ../../include/argv.h
|
||||||
|
postconf_dbms.o: ../../include/dict.h
|
||||||
|
postconf_dbms.o: ../../include/dict_ldap.h
|
||||||
|
postconf_dbms.o: ../../include/dict_memcache.h
|
||||||
|
postconf_dbms.o: ../../include/dict_mysql.h
|
||||||
|
postconf_dbms.o: ../../include/dict_pgsql.h
|
||||||
|
postconf_dbms.o: ../../include/dict_proxy.h
|
||||||
|
postconf_dbms.o: ../../include/dict_sqlite.h
|
||||||
|
postconf_dbms.o: ../../include/htable.h
|
||||||
|
postconf_dbms.o: ../../include/mac_expand.h
|
||||||
|
postconf_dbms.o: ../../include/mac_parse.h
|
||||||
|
postconf_dbms.o: ../../include/mail_conf.h
|
||||||
|
postconf_dbms.o: ../../include/split_at.h
|
||||||
|
postconf_dbms.o: ../../include/stringops.h
|
||||||
|
postconf_dbms.o: ../../include/sys_defs.h
|
||||||
|
postconf_dbms.o: ../../include/vbuf.h
|
||||||
|
postconf_dbms.o: ../../include/vstream.h
|
||||||
|
postconf_dbms.o: ../../include/vstring.h
|
||||||
|
postconf_dbms.o: postconf.h
|
||||||
|
postconf_dbms.o: postconf_dbms.c
|
||||||
postconf_edit.o: ../../include/argv.h
|
postconf_edit.o: ../../include/argv.h
|
||||||
postconf_edit.o: ../../include/dict.h
|
postconf_edit.o: ../../include/dict.h
|
||||||
postconf_edit.o: ../../include/edit_file.h
|
postconf_edit.o: ../../include/edit_file.h
|
||||||
|
@ -161,6 +161,13 @@ extern void register_service_parameters(void);
|
|||||||
*/
|
*/
|
||||||
extern void register_user_parameters(void);
|
extern void register_user_parameters(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* postconf_dbms.c
|
||||||
|
*/
|
||||||
|
extern void register_dbms_parameters(const char *,
|
||||||
|
const char *(*) (const char *, int, char *),
|
||||||
|
PC_MASTER_ENT *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* postconf_unused.c.
|
* postconf_unused.c.
|
||||||
*/
|
*/
|
||||||
|
@ -335,7 +335,7 @@ void register_builtin_parameters(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Add the built-in parameters to the global name space. The class
|
* Add the built-in parameters to the global name space. The class
|
||||||
* (built-i) is tentative; some parameters are actually service-defined,
|
* (built-in) is tentative; some parameters are actually service-defined,
|
||||||
* but they have their own default value.
|
* but they have their own default value.
|
||||||
*/
|
*/
|
||||||
for (ctt = time_table; ctt->name; ctt++)
|
for (ctt = time_table; ctt->name; ctt++)
|
||||||
|
231
postfix/src/postconf/postconf_dbms.c
Normal file
231
postfix/src/postconf/postconf_dbms.c
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
/*++
|
||||||
|
/* NAME
|
||||||
|
/* postconf_dbms 3
|
||||||
|
/* SUMMARY
|
||||||
|
/* legacy support for database-defined main.cf parameter names
|
||||||
|
/* SYNOPSIS
|
||||||
|
/* #include <postconf.h>
|
||||||
|
/*
|
||||||
|
/* void register_dbms_parameters(param_value, flag_parameter,
|
||||||
|
/* local_scope)
|
||||||
|
/* const char *param_value;
|
||||||
|
/* const char *(flag_parameter) (const char *, int, char *);
|
||||||
|
/* PC_MASTER_ENT *local_scope;
|
||||||
|
/* DESCRIPTION
|
||||||
|
/* This module implements legacy support for database configuration
|
||||||
|
/* where main.cf parameter names are generated by prepending
|
||||||
|
/* the database name to a database-defined suffix.
|
||||||
|
/*
|
||||||
|
/* Arguments:
|
||||||
|
/* .IP param_value
|
||||||
|
/* A parameter value to be searched for "type:table" strings.
|
||||||
|
/* When a database type is found that supports legacy-style
|
||||||
|
/* configuration, the table name is combined with each of the
|
||||||
|
/* database-defined suffixes to generate candidate parameter
|
||||||
|
/* names for that database type.
|
||||||
|
/* .IP flag_parameter
|
||||||
|
/* A function that takes as arguments a candidate parameter
|
||||||
|
/* name, an unused value, and a local namespace pointer. The
|
||||||
|
/* function will flag the parameter as "used" if it has a
|
||||||
|
/* "name=value" entry in the local or global namespace.
|
||||||
|
/* .IP local_scope
|
||||||
|
/* The local namespace.
|
||||||
|
/* DIAGNOSTICS
|
||||||
|
/* No explicit diagnostics.
|
||||||
|
/* 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>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
/* Utility library. */
|
||||||
|
|
||||||
|
#include <stringops.h>
|
||||||
|
#include <split_at.h>
|
||||||
|
#include <mac_expand.h>
|
||||||
|
#include <dict.h>
|
||||||
|
|
||||||
|
/* Global library. */
|
||||||
|
|
||||||
|
#include <mail_conf.h>
|
||||||
|
#include <dict_proxy.h>
|
||||||
|
#include <dict_ldap.h>
|
||||||
|
#include <dict_mysql.h>
|
||||||
|
#include <dict_pgsql.h>
|
||||||
|
#include <dict_sqlite.h>
|
||||||
|
#include <dict_memcache.h>
|
||||||
|
|
||||||
|
/* Application-specific. */
|
||||||
|
|
||||||
|
#include <postconf.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SLMs.
|
||||||
|
*/
|
||||||
|
#define STR(x) vstring_str(x)
|
||||||
|
|
||||||
|
#ifdef LEGACY_DBMS_SUPPORT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The legacy database interface automagically instantiates a list of
|
||||||
|
* parameters by prepending the table name to database-specific suffixes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* See ldap_table(5). */
|
||||||
|
|
||||||
|
static const char *ldap_suffixes[] = {
|
||||||
|
"bind", "bind_dn", "bind_pw", "cache", "cache_expiry", "cache_size",
|
||||||
|
"chase_referrals", "debuglevel", "dereference", "domain",
|
||||||
|
"expansion_limit", "leaf_result_attribute", "query_filter",
|
||||||
|
"recursion_limit", "result_attribute", "result_format", "scope",
|
||||||
|
"search_base", "server_host", "server_port", "size_limit",
|
||||||
|
"special_result_attribute", "terminal_result_attribute",
|
||||||
|
"timeout", "version", 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* See mysql_table(5). */
|
||||||
|
|
||||||
|
static const char *mysql_suffixes[] = {
|
||||||
|
"additional_conditions", "dbname", "domain", "expansion_limit",
|
||||||
|
"hosts", "password", "query", "result_format", "select_field",
|
||||||
|
"table", "user", "where_field", 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* See pgsql_table(5). */
|
||||||
|
|
||||||
|
static const char *pgsql_suffixes[] = {
|
||||||
|
"additional_conditions", "dbname", "domain", "expansion_limit",
|
||||||
|
"hosts", "password", "query", "result_format", "select_field",
|
||||||
|
"select_function", "table", "user", "where_field", 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* See sqlite_table(5). */
|
||||||
|
|
||||||
|
static const char *sqlite_suffixes[] = {
|
||||||
|
"additional_conditions", "dbpath", "domain", "expansion_limit",
|
||||||
|
"query", "result_format", "select_field", "table", "where_field",
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* See memcache_table(5). */
|
||||||
|
|
||||||
|
static const char *memcache_suffixes[] = {
|
||||||
|
"backup", "data_size_limit", "domain", "flags", "key_format",
|
||||||
|
"line_size_limit", "max_try", "memcache", "retry_pause",
|
||||||
|
"timeout", "ttl", 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bundle up the database types and their suffix lists.
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
const char *db_type;
|
||||||
|
const char **db_suffixes;
|
||||||
|
} PC_DBMS_INFO;
|
||||||
|
|
||||||
|
static const PC_DBMS_INFO dbms_info[] = {
|
||||||
|
DICT_TYPE_LDAP, ldap_suffixes,
|
||||||
|
DICT_TYPE_MYSQL, mysql_suffixes,
|
||||||
|
DICT_TYPE_PGSQL, pgsql_suffixes,
|
||||||
|
DICT_TYPE_SQLITE, sqlite_suffixes,
|
||||||
|
DICT_TYPE_MEMCACHE, memcache_suffixes,
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* register_dbms_parameters_cb - mac_expand() call-back */
|
||||||
|
|
||||||
|
static const char *register_dbms_parameters_cb(const char *mac_name,
|
||||||
|
int unused_mode,
|
||||||
|
char *context)
|
||||||
|
{
|
||||||
|
PC_MASTER_ENT *local_scope = (PC_MASTER_ENT *) context;
|
||||||
|
const char *mac_val;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Local namespace "name=value" settings are always explicit. They have
|
||||||
|
* precedence over global namespace "name=value" settings which are
|
||||||
|
* either explicit or defined by their default value.
|
||||||
|
*/
|
||||||
|
if (local_scope == 0
|
||||||
|
|| (mac_val = dict_get(local_scope->all_params, mac_name)) == 0)
|
||||||
|
mac_val = mail_conf_lookup(mac_name);
|
||||||
|
return (mac_val);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* register_dbms_parameters - look for database_type:prefix_name */
|
||||||
|
|
||||||
|
void register_dbms_parameters(const char *param_value,
|
||||||
|
const char *(flag_parameter) (const char *, int, char *),
|
||||||
|
PC_MASTER_ENT *local_scope)
|
||||||
|
{
|
||||||
|
const PC_DBMS_INFO *dp;
|
||||||
|
char *bufp;
|
||||||
|
char *db_type;
|
||||||
|
char *prefix;
|
||||||
|
static VSTRING *buffer = 0;
|
||||||
|
static VSTRING *candidate = 0;
|
||||||
|
const char **cpp;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Emulate Postfix parameter value expansion, prepending the appropriate
|
||||||
|
* local (master.cf "-o name-value") namespace to the global (main.cf
|
||||||
|
* "name=value") namespace.
|
||||||
|
*
|
||||||
|
* XXX This does not examine both sides of conditional macro expansion, and
|
||||||
|
* may expand the "wrong" conditional macros. This is the best we can do
|
||||||
|
* for legacy database configuration support.
|
||||||
|
*/
|
||||||
|
#define NO_SCAN_FILTER ((char *) 0)
|
||||||
|
|
||||||
|
(void) mac_expand(buffer ? buffer : (buffer = vstring_alloc(100)),
|
||||||
|
param_value, MAC_EXP_FLAG_RECURSE, NO_SCAN_FILTER,
|
||||||
|
register_dbms_parameters_cb, (char *) local_scope);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Naive parsing. We don't really know if the parameter specifies free
|
||||||
|
* text or a list of databases.
|
||||||
|
*/
|
||||||
|
bufp = STR(buffer);
|
||||||
|
while ((db_type = mystrtok(&bufp, " ,\t\r\n")) != 0) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Skip over "proxy:" indirections.
|
||||||
|
*/
|
||||||
|
while ((prefix = split_at(db_type, ':')) != 0
|
||||||
|
&& strcmp(db_type, DICT_TYPE_PROXY) == 0)
|
||||||
|
db_type = prefix;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Look for database:prefix where the prefix is not a pathname and
|
||||||
|
* the database is a known type. Synthesize candidate parameter names
|
||||||
|
* from the user-defined prefix and from the database-defined suffix
|
||||||
|
* list, and see if those parameters have a "name=value" entry in the
|
||||||
|
* local or global namespace.
|
||||||
|
*/
|
||||||
|
if (prefix != 0 && *prefix != '/' && *prefix != '.') {
|
||||||
|
for (dp = dbms_info; dp->db_type != 0; dp++) {
|
||||||
|
if (strcmp(db_type, dp->db_type) == 0) {
|
||||||
|
for (cpp = dp->db_suffixes; *cpp; cpp++) {
|
||||||
|
vstring_sprintf(candidate ? candidate :
|
||||||
|
(candidate = vstring_alloc(30)),
|
||||||
|
"%s_%s", prefix, *cpp);
|
||||||
|
flag_parameter(STR(candidate), 0, (char *) local_scope);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -77,6 +77,11 @@
|
|||||||
*/
|
*/
|
||||||
static HTABLE *rest_class_table;
|
static HTABLE *rest_class_table;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SLMs.
|
||||||
|
*/
|
||||||
|
#define STR(x) vstring_str(x)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macros to make code with obscure constants more readable.
|
* Macros to make code with obscure constants more readable.
|
||||||
*/
|
*/
|
||||||
@ -196,16 +201,20 @@ static void scan_user_parameter_namespace(const char *dict_name,
|
|||||||
dict->sequence(dict, how, &cparam_name, &cparam_value) == 0;
|
dict->sequence(dict, how, &cparam_name, &cparam_value) == 0;
|
||||||
how = DICT_SEQ_FUN_NEXT) {
|
how = DICT_SEQ_FUN_NEXT) {
|
||||||
if (local_scope != 0
|
if (local_scope != 0
|
||||||
&& PC_PARAM_TABLE_LOCATE(local_scope->valid_names, cparam_name) == 0
|
&& PC_PARAM_TABLE_LOCATE(local_scope->valid_names, cparam_name) == 0
|
||||||
&& htable_locate(rest_class_table, cparam_name) != 0)
|
&& htable_locate(rest_class_table, cparam_name) != 0)
|
||||||
PC_PARAM_TABLE_ENTER(local_scope->valid_names, cparam_name,
|
PC_PARAM_TABLE_ENTER(local_scope->valid_names, cparam_name,
|
||||||
PC_PARAM_FLAG_USER, PC_PARAM_NO_DATA,
|
PC_PARAM_FLAG_USER, PC_PARAM_NO_DATA,
|
||||||
convert_user_parameter);
|
convert_user_parameter);
|
||||||
/* Skip "do not expand" parameters. */
|
/* Skip "do not expand" parameters. */
|
||||||
if ((node = PC_PARAM_TABLE_FIND(param_table, cparam_name)) != 0
|
if ((node = PC_PARAM_TABLE_FIND(param_table, cparam_name)) != 0
|
||||||
&& PC_RAW_PARAMETER(node))
|
&& PC_RAW_PARAMETER(node))
|
||||||
continue;
|
continue;
|
||||||
SCAN_USER_PARAMETER_VALUE(cparam_value, local_scope);
|
SCAN_USER_PARAMETER_VALUE(cparam_value, local_scope);
|
||||||
|
#ifdef LEGACY_DBMS_SUPPORT
|
||||||
|
register_dbms_parameters(cparam_value, flag_user_parameter,
|
||||||
|
local_scope);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,10 +238,11 @@ static void scan_default_parameter_values(HTABLE *valid_params,
|
|||||||
if (dict_lookup(dict_name, PC_PARAM_INFO_NAME(*ht)))
|
if (dict_lookup(dict_name, PC_PARAM_INFO_NAME(*ht)))
|
||||||
continue;
|
continue;
|
||||||
if ((param_value = convert_param_node(SHOW_DEFS, PC_PARAM_INFO_NAME(*ht),
|
if ((param_value = convert_param_node(SHOW_DEFS, PC_PARAM_INFO_NAME(*ht),
|
||||||
PC_PARAM_INFO_NODE(*ht))) == 0)
|
PC_PARAM_INFO_NODE(*ht))) == 0)
|
||||||
msg_panic("%s: parameter %s has no default value",
|
msg_panic("%s: parameter %s has no default value",
|
||||||
myname, PC_PARAM_INFO_NAME(*ht));
|
myname, PC_PARAM_INFO_NAME(*ht));
|
||||||
SCAN_USER_PARAMETER_VALUE(param_value, local_scope);
|
SCAN_USER_PARAMETER_VALUE(param_value, local_scope);
|
||||||
|
/* No need to scan default values for legacy DBMS configuration. */
|
||||||
}
|
}
|
||||||
myfree((char *) list);
|
myfree((char *) list);
|
||||||
}
|
}
|
||||||
|
10
postfix/src/postconf/test28.ref
Normal file
10
postfix/src/postconf/test28.ref
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
config_directory = .
|
||||||
|
db = memcache
|
||||||
|
foo_domain = bar
|
||||||
|
header_checks = ldap:hh
|
||||||
|
hh_domain = whatever
|
||||||
|
yy = aap
|
||||||
|
zz_domain = whatever
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: zz=$yy
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: aa_domain=whatever
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: xx=proxy:ldap:foo
|
16
postfix/src/postconf/test29.ref
Normal file
16
postfix/src/postconf/test29.ref
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
config_directory = .
|
||||||
|
ldapfoo_domain = bar
|
||||||
|
memcachefoo_domain = bar
|
||||||
|
mysqlfoo_domain = bar
|
||||||
|
pgsqlfoo_domain = bar
|
||||||
|
sqlitefoo_domain = bar
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: sqlitexx=proxy:sqlite:sqlitefoo
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: pgsqlxx=proxy:pgsql:pgsqlfoo
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: memcachefoo_domainx=bar
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: sqlitefoo_domainx=bar
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: memcachexx=proxy:memcache:memcachefoo
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: mysqlxx=proxy:mysql:mysqlfoo
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: ldapxx=proxy:ldap:ldapfoo
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: ldapfoo_domainx=bar
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: pgsqlfoo_domainx=bar
|
||||||
|
./postconf: warning: ./main.cf: unused parameter: mysqlfoo_domainx=bar
|
@ -48,7 +48,7 @@
|
|||||||
/* Expand macros in lookup results. This should never be done with
|
/* Expand macros in lookup results. This should never be done with
|
||||||
/* data whose origin is untrusted.
|
/* data whose origin is untrusted.
|
||||||
/* .IP MAC_EXP_FLAG_APPEND
|
/* .IP MAC_EXP_FLAG_APPEND
|
||||||
/* Append text to the result buffer.
|
/* Append text to the result buffer without truncating it.
|
||||||
/* .IP MAC_EXP_FLAG_SCAN
|
/* .IP MAC_EXP_FLAG_SCAN
|
||||||
/* Invoke the call-back function each macro name in the input
|
/* Invoke the call-back function each macro name in the input
|
||||||
/* string, including macro names in the values of conditional
|
/* string, including macro names in the values of conditional
|
||||||
|
@ -1432,6 +1432,10 @@ typedef int WAIT_STATUS_T;
|
|||||||
#undef HAVE_POSIX_GETPW_R
|
#undef HAVE_POSIX_GETPW_R
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_DB
|
||||||
|
#undef HAS_DB
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef OCTAL_TO_UNSIGNED
|
#ifndef OCTAL_TO_UNSIGNED
|
||||||
#define OCTAL_TO_UNSIGNED(res, str) ((res) = strtoul((str), (char **) 0, 8))
|
#define OCTAL_TO_UNSIGNED(res, str) ((res) = strtoul((str), (char **) 0, 8))
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user