]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
%{auth_domain} shouldn't include the leading '@'
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 20 Oct 2016 09:06:25 +0000 (12:06 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 20 Oct 2016 20:04:41 +0000 (23:04 +0300)
src/imap-hibernate/imap-client.c
src/lib-storage/mail-storage-service.c
src/lib-storage/mail-user.c

index 4e80812068657ba5fbd1fe4c35b298638348f7c8..c53e5d3eec1127c48dd0360465a3f0ff7cc5e827 100644 (file)
@@ -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;
 }
index f0befcf4095e76d5138f5cec82b3d46bf9e8acd1..bedb33af9834d5476dcf0610c22131b9286c6f56 100644 (file)
@@ -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;
 }
index 4b668fe080faf7402d6dcedf2df7d8f1aadbc762..b8a40b6fbee5b39156e773b58f7fcb39be6f47d8 100644 (file)
@@ -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;