]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mail_storage_service_user - Add missing %{hostname}
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 7 Jan 2023 20:57:29 +0000 (22:57 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 20 Nov 2023 12:20:16 +0000 (14:20 +0200)
This existed for mail_user already.

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

index 6202bee92fa66ed956ee1fd389ed2ec694c313a4..5f339946a08ebad23812603a0472ad04d45df124 100644 (file)
@@ -417,7 +417,8 @@ get_var_expand_table(struct master_service *service,
 
        const char *service_name = input->service != NULL ?
                                   input->service : service->name;
-
+       const char *hostname = user != NULL ?
+               user->user_set->hostname : my_hostname;
        const struct var_expand_table stack_tab[] = {
                { 'u', input->username, "user" },
                { 'n', username, "username" },
@@ -432,6 +433,7 @@ get_var_expand_table(struct master_service *service,
                { '\0', auth_user, "auth_user" },
                { '\0', auth_username, "auth_username" },
                { '\0', auth_domain, "auth_domain" },
+               { '\0', hostname, "hostname" },
                /* aliases: */
                { '\0', net_ip2addr(&input->local_ip), "local_ip" },
                { '\0', net_ip2addr(&input->remote_ip), "remote_ip" },