]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Default postmaster_address wasn't being set.
authorTimo Sirainen <tss@iki.fi>
Tue, 13 Aug 2013 17:58:56 +0000 (20:58 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 13 Aug 2013 17:58:56 +0000 (20:58 +0300)
This broke after it was set to allow %variables.

src/lib-lda/lda-settings.c

index 9deecde8f7c26c253246a1251c5c0d995f81db5d..981715de97cc3d637e2c8fc4b1358840eec6a8fd 100644 (file)
@@ -77,14 +77,16 @@ static bool lda_settings_check(void *_set, pool_t pool, const char **error_r)
 
        if (*set->hostname == '\0')
                set->hostname = p_strdup(pool, my_hostdomain());
-       if (*set->postmaster_address == '\0') {
+       i_assert(set->postmaster_address[0] == SETTING_STRVAR_UNEXPANDED[0]);
+       if (set->postmaster_address[1] == '\0') {
                /* check for valid looking fqdn in hostname */
                if (strchr(set->hostname, '.') == NULL) {
                        *error_r = "postmaster_address setting not given";
                        return FALSE;
                }
-               set->postmaster_address = p_strconcat(pool, "postmaster@",
-                                                     set->hostname, NULL);
+               set->postmaster_address =
+                       p_strconcat(pool, SETTING_STRVAR_UNEXPANDED,
+                                   "postmaster@", set->hostname, NULL);
        }
        return TRUE;
 }