dovecot-2.2: lmtp: Make it clear that the lda_settings is unexpa...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Aug 13 21:02:13 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/ec62ea3c940e
changeset: 16694:ec62ea3c940e
user: Timo Sirainen <tss at iki.fi>
date: Tue Aug 13 21:02:04 2013 +0300
description:
lmtp: Make it clear that the lda_settings is unexpanded in struct client.
diffstat:
src/lmtp/client.c | 4 ++--
src/lmtp/client.h | 2 +-
src/lmtp/commands.c | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diffs (68 lines):
diff -r 2cbf5d7c7e4c -r ec62ea3c940e src/lmtp/client.c
--- a/src/lmtp/client.c Tue Aug 13 20:59:39 2013 +0300
+++ b/src/lmtp/client.c Tue Aug 13 21:02:04 2013 +0300
@@ -175,7 +175,7 @@
mail_storage_service_get_var_expand_table(storage_service, &input));
client->service_set = master_service_settings_get(master_service);
client->lmtp_set = lmtp_set;
- client->set = lda_set;
+ client->unexpanded_lda_set = lda_set;
}
static void client_generate_session_id(struct client *client)
@@ -241,7 +241,7 @@
client_read_settings(client);
client_raw_user_create(client);
client_generate_session_id(client);
- client->my_domain = client->set->hostname;
+ client->my_domain = client->unexpanded_lda_set->hostname;
client->lhlo = i_strdup("missing");
client->proxy_ttl = LMTP_PROXY_DEFAULT_TTL;
diff -r 2cbf5d7c7e4c -r ec62ea3c940e src/lmtp/client.h
--- a/src/lmtp/client.h Tue Aug 13 20:59:39 2013 +0300
+++ b/src/lmtp/client.h Tue Aug 13 21:02:04 2013 +0300
@@ -41,7 +41,7 @@
pool_t pool;
const struct setting_parser_info *user_set_info;
- const struct lda_settings *set;
+ const struct lda_settings *unexpanded_lda_set;
const struct lmtp_settings *lmtp_set;
const struct master_service_settings *service_set;
int fd_in, fd_out;
diff -r 2cbf5d7c7e4c -r ec62ea3c940e src/lmtp/commands.c
--- a/src/lmtp/commands.c Tue Aug 13 20:59:39 2013 +0300
+++ b/src/lmtp/commands.c Tue Aug 13 21:02:04 2013 +0300
@@ -222,7 +222,7 @@
address_add_detail(struct client *client, const char *username,
const char *detail)
{
- const char *delim = client->set->recipient_delimiter;
+ const char *delim = client->unexpanded_lda_set->recipient_delimiter;
const char *domain;
domain = strchr(username, '@');
@@ -317,7 +317,7 @@
struct lmtp_proxy_settings proxy_set;
memset(&proxy_set, 0, sizeof(proxy_set));
- proxy_set.my_hostname = client->set->hostname;
+ proxy_set.my_hostname = client->my_domain;
proxy_set.dns_client_socket_path = dns_client_socket_path;
proxy_set.session_id = client->state.session_id;
proxy_set.source_ip = client->remote_ip;
@@ -383,11 +383,11 @@
*username_r = address;
*detail_r = "";
- if (*client->set->recipient_delimiter == '\0')
+ if (*client->unexpanded_lda_set->recipient_delimiter == '\0')
return;
domain = strchr(address, '@');
- p = strstr(address, client->set->recipient_delimiter);
+ p = strstr(address, client->unexpanded_lda_set->recipient_delimiter);
if (p != NULL && (domain == NULL || p < domain)) {
/* user+detail at domain */
*username_r = t_strdup_until(*username_r, p);
More information about the dovecot-cvs
mailing list