Mercurial > dovecot > core-2.2
changeset 21775:347d2414ef01
pop3-login: Add FORWARD for XCLIENT
This allows passing passdb variables. They are prefixed
with forward_ when imported to extra fields.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Fri, 10 Mar 2017 10:05:14 +0200 |
parents | 9666b37cb252 |
children | 1481b5e5e717 |
files | src/pop3-login/client.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pop3-login/client.c Fri Mar 10 10:04:33 2017 +0200 +++ b/src/pop3-login/client.c Fri Mar 10 10:05:14 2017 +0200 @@ -65,6 +65,14 @@ } else if (strncasecmp(*tmp, "TTL=", 4) == 0) { if (str_to_uint(*tmp + 4, &client->common.proxy_ttl) < 0) args_ok = FALSE; + } else if (strncasecmp(*tmp, "FORWARD=", 8) == 0) { + size_t value_len = strlen((*tmp)+8); + client->common.forward_fields = + str_new(client->common.preproxy_pool, + MAX_BASE64_DECODED_SIZE(value_len)); + if (base64_decode((*tmp)+8, value_len, NULL, + client->common.forward_fields) < 0) + args_ok = FALSE; } } if (!args_ok) {