]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Make it clear that the lda_settings is unexpanded in struct client.
authorTimo Sirainen <tss@iki.fi>
Tue, 13 Aug 2013 18:02:04 +0000 (21:02 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 13 Aug 2013 18:02:04 +0000 (21:02 +0300)
src/lmtp/client.c
src/lmtp/client.h
src/lmtp/commands.c

index 3b63758d7d1300d22137ccffb47a65d5f02bf2cb..023991a59dfc96955a9e326cc6310d23ec964299 100644 (file)
@@ -175,7 +175,7 @@ static void client_read_settings(struct client *client)
                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 @@ struct client *client_create(int fd_in, int fd_out,
        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;
 
index f1dd37c02f0c18af67664011528fb734a8d19ed9..18ef1f53dab562b8615e2e9825368776c89783c3 100644 (file)
@@ -41,7 +41,7 @@ struct client {
        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;
index b3f288564693c6d5b5512572638e994ad560a654..bcfbe7dac7654bd4a6b0d0cfd3734b3db596bd73 100644 (file)
@@ -222,7 +222,7 @@ static const char *
 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 @@ static bool client_proxy_rcpt(struct client *client, const char *address,
                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 @@ static void rcpt_address_parse(struct client *client, const char *address,
        *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@domain */
                *username_r = t_strdup_until(*username_r, p);