In postfix 3.11, newaliases command doesn't work without arguments:
$ newaliases
postalias: warning: unsupported dictionary type: . Is the postfix-
package installed?
postalias: fatal: unsupported map type:
This happens with basically empty main.cf - I only have
compatibility_level here for test.
It seems like $default_database_type in the default alias_database
is not expanded when reading parameters in mail_params_init().
When var_alias_db_map variable is assigned value, it is already
":/etc/aliases" - with empty prefix.
For test, I built postfix with no other build options in CCARGS etc,
using all defaults. In particular, the build was with berkeley DB
available, and with DEF_DB_TYPE not specified so it's set to hash
by default.
When default_database_type is explicitly set in main.cf, the
problem goes away.
The following patch fixes the issue:
diff --git a/src/global/mail_params.c b/src/global/mail_params.c
index 47b4e1fa6..d7079dd2a 100644
--- a/src/global/mail_params.c
+++ b/src/global/mail_params.c
@@ -839,10 +839,10 @@ void mail_params_init()
VAR_PROXY_INTERFACES, DEF_PROXY_INTERFACES,
&var_proxy_interfaces, 0, 0,
VAR_DOUBLE_BOUNCE, DEF_DOUBLE_BOUNCE,
&var_double_bounce_sender, 1, 0,
VAR_DEFAULT_PRIVS, DEF_DEFAULT_PRIVS, &var_default_privs, 1, 0,
- VAR_ALIAS_DB_MAP, DEF_ALIAS_DB_MAP, &var_alias_db_map, 0, 0,
VAR_MAIL_RELEASE, DEF_MAIL_RELEASE, &var_mail_release, 1, 0,
VAR_DB_TYPE, DEF_DB_TYPE, &var_db_type, 1, 0,
VAR_CACHE_DB_TYPE, DEF_CACHE_DB_TYPE, &var_cache_db_type, 1, 0,
+ VAR_ALIAS_DB_MAP, DEF_ALIAS_DB_MAP, &var_alias_db_map, 0, 0,
VAR_HASH_QUEUE_NAMES, DEF_HASH_QUEUE_NAMES,
&var_hash_queue_names, 1, 0,
VAR_RCPT_DELIM, DEF_RCPT_DELIM, &var_rcpt_delim, 0, 0,
VAR_RELAY_DOMAINS, DEF_RELAY_DOMAINS, &var_relay_domains, 0, 0,
Additionally, nbdb_reindexd segfaults when asked to reindex alias
database:
#0 vbuf_print (bp=bp@entry=0x55879f3484e0,
format=0x55876f981016 "the %s service is disabled",
ap=ap@entry=0x7ffd2c554d70)
at /build/reproducible-path/postfix-3.11.0/src/util/vbuf_print.c:280
#1 0x00007f22d8ff2fad in vstring_vsprintf (vp=0x55879f3484e0,
format=<optimized out>, ap=ap@entry=0x7ffd2c554d70)
at /build/reproducible-path/postfix-3.11.0/src/util/vstring.c:639
#2 0x00007f22d8ff3058 in vstring_sprintf (vp=vp@entry=0x55879f3484e0,
format=format@entry=0x55876f981016 "the %s service is disabled")
at /build/reproducible-path/postfix-3.11.0/src/util/vstring.c:629
#3 0x000055876f97f97d in nbdb_process (leg_type=0x55879f347f40 "hash",
source_path=source_path@entry=0x55879f347f45 "/etc/aliases",
why=0x55879f3484e0) at ./src/nbdb_reindexd/nbdb_process.c:102
#4 0x000055876f98009a in nbdb_service (
stream=stream@entry=0x7f22d90122c0 <vstream_fstd>,
service=<optimized out>, argv=0x7ffd2c555448)
at ./src/nbdb_reindexd/nbdb_reindexd.c:224
#5 0x00007f22d90695be in single_server_main (argc=<optimized out>,
argv=<optimized out>, service=service@entry=0x55876f97fe50
<nbdb_service>)
at
/build/reproducible-path/postfix-3.11.0/src/master/single_server.c:782
#6 0x000055876f97f3a0 in main (argc=<optimized out>, argv=<optimized out>)
at ./src/nbdb_reindexd/nbdb_reindexd.c:305
I haven't looked at the other issue, as I can't (yet) reproduce it.
Thanks,
/mjt
_______________________________________________
Postfix-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]