]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Write "+ext" part to Delivered-To: header.
authorPascal Volk <user@localhost.localdomain.org>
Wed, 19 Jan 2011 20:06:39 +0000 (20:06 +0000)
committerPascal Volk <user@localhost.localdomain.org>
Wed, 19 Jan 2011 20:06:39 +0000 (20:06 +0000)
(reverted changeset 19231e3585db)

src/lmtp/commands.c

index 1ec0fd62d220425918a7c5a3664af451b3a125a3..07e7c4fc1b08e81680b4c7bff9c9024f450a481e 100644 (file)
@@ -699,20 +699,18 @@ static void client_proxy_finish(bool timeout, void *context)
 static const char *client_get_added_headers(struct client *client)
 {
        string_t *str = t_str_new(200);
-       const char *host, *address = NULL, *username = NULL;
+       const char *host, *rcpt_to = NULL;
 
        if (array_count(&client->state.rcpt_to) == 1) {
                const struct mail_recipient *rcpt =
                        array_idx(&client->state.rcpt_to, 0);
-               const char *detail;
 
-               address = rcpt->address;
-               rcpt_address_parse(client, address, &username, &detail);
+               rcpt_to = rcpt->address;
        }
 
        str_printfa(str, "Return-Path: <%s>\r\n", client->state.mail_from);
-       if (username != NULL)
-               str_printfa(str, "Delivered-To: <%s>\r\n", username);
+       if (rcpt_to != NULL)
+               str_printfa(str, "Delivered-To: <%s>\r\n", rcpt_to);
 
        str_printfa(str, "Received: from %s", client->state.lhlo);
        if ((host = net_ip2addr(&client->remote_ip)) != NULL)
@@ -721,8 +719,8 @@ static const char *client_get_added_headers(struct client *client)
                    client->my_domain, client->state.session_id);
 
        str_append(str, "\r\n\t");
-       if (address != NULL)
-               str_printfa(str, "for <%s>", address);
+       if (rcpt_to != NULL)
+               str_printfa(str, "for <%s>", rcpt_to);
        str_printfa(str, "; %s\r\n", message_date_create(ioloop_time));
        return str_c(str);
 }