From: Timo Sirainen Date: Thu, 20 Oct 2016 09:06:25 +0000 (+0300) Subject: %{auth_domain} shouldn't include the leading '@' X-Git-Tag: 2.2.27~336 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ada6d5fe1a4dee7764fd73f9b790f26b50a92611;p=thirdparty%2Fdovecot%2Fcore.git %{auth_domain} shouldn't include the leading '@' --- diff --git a/src/imap-hibernate/imap-client.c b/src/imap-hibernate/imap-client.c index 4e80812068..c53e5d3eec 100644 --- a/src/imap-hibernate/imap-client.c +++ b/src/imap-hibernate/imap-client.c @@ -485,6 +485,7 @@ imap_client_get_var_expand_table(struct imap_client *client) tab[11].value = auth_user; tab[12].value = t_strcut(auth_user, '@'); tab[13].value = strchr(auth_user, '@'); + if (tab[13].value != NULL) tab[13].value++; } return tab; } diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index f0befcf409..bedb33af98 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -436,6 +436,7 @@ get_var_expand_table(struct master_service *service, tab[10].value = user->auth_user; tab[11].value = t_strcut(user->auth_user, '@'); tab[12].value = strchr(user->auth_user, '@'); + if (tab[12].value != NULL) tab[12].value++; } return tab; } diff --git a/src/lib-storage/mail-user.c b/src/lib-storage/mail-user.c index 4b668fe080..b8a40b6fbe 100644 --- a/src/lib-storage/mail-user.c +++ b/src/lib-storage/mail-user.c @@ -260,6 +260,7 @@ mail_user_var_expand_table(struct mail_user *user) tab[11].value = user->auth_user; tab[12].value = p_strdup(user->pool, t_strcut(user->auth_user, '@')); tab[13].value = strchr(user->auth_user, '@'); + if (tab[13].value != NULL) tab[13].value++; } user->var_expand_table = tab;