]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Change default postmaster_address setting to "postmaster@<user domain...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 5 Sep 2018 19:56:42 +0000 (21:56 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 20 Sep 2018 11:06:24 +0000 (11:06 +0000)
The former "postmaster@<user domain>" default would only yield a valid
postmaster address when there is a domain part in the username. The new default
uses a conditional variable expansion choose "%d" when it is not empty and the
new "%{hostname}" otherwise.

src/lib-storage/mail-storage-settings.c

index 3745dbe6a55f562d64e6c07d0b81f775ae21b2d2..e647cb7d9ca406bfb83df1aa6d0df92e2f1c9204 100644 (file)
@@ -326,7 +326,7 @@ static const struct mail_user_settings mail_user_default_settings = {
        .mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ",
 
        .hostname = "",
-       .postmaster_address = "postmaster@%d",
+       .postmaster_address = "postmaster@%{if;%d;ne;;%d;%{hostname}}",
 
        .namespaces = ARRAY_INIT,
        .plugin_envs = ARRAY_INIT