dovecot-2.2: lib-lda: Default postmaster_address wasn't being set.

dovecot at dovecot.org dovecot at dovecot.org
Tue Aug 13 21:00:07 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/40110f35ca64
changeset: 16692:40110f35ca64
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 13 20:58:56 2013 +0300
description:
lib-lda: Default postmaster_address wasn't being set.
This broke after it was set to allow %variables.

diffstat:

 src/lib-lda/lda-settings.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r 72ce58d50d2c -r 40110f35ca64 src/lib-lda/lda-settings.c
--- a/src/lib-lda/lda-settings.c	Tue Aug 13 20:57:41 2013 +0300
+++ b/src/lib-lda/lda-settings.c	Tue Aug 13 20:58:56 2013 +0300
@@ -77,14 +77,16 @@
 
 	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;
 }


More information about the dovecot-cvs mailing list