]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-hibernate: Add variable aliases
authorSiavash Tavakoli <siavash.tavakoli@open-xchange.com>
Wed, 30 Dec 2020 10:05:17 +0000 (10:05 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 11 Jan 2021 15:08:14 +0000 (15:08 +0000)
Accept new aliases "local_ip" (="lip") and "remote_ip" (="rip") when expanding
variables.

src/imap-hibernate/imap-client.c

index c511f95b32123962bea5ab50d1fe6652f3b18b3b..358030f887f7aeb8ead0ca927a2fb22e05c8c5e5 100644 (file)
@@ -520,6 +520,9 @@ imap_client_get_var_expand_table(struct imap_client *client)
                { '\0', auth_user, "auth_user" },
                { '\0', auth_username, "auth_username" },
                { '\0', auth_domain, "auth_domain" },
+               /* aliases: */
+               { '\0', local_ip, "local_ip" },
+               { '\0', remote_ip, "remote_ip" },
                /* NOTE: keep this synced with lib-storage's
                   mail_user_var_expand_table() */
                { '\0', NULL, NULL }