dovecot-2.0: lmtp: Write "+ext" part to Delivered-To: header.

dovecot at dovecot.org dovecot at dovecot.org
Wed Jan 19 23:33:49 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/a3a7cc0172fd
changeset: 12569:a3a7cc0172fd
user:      Pascal Volk <user at localhost.localdomain.org>
date:      Wed Jan 19 20:06:39 2011 +0000
description:
lmtp: Write "+ext" part to Delivered-To: header.
(reverted changeset 19231e3585db)

diffstat:

 src/lmtp/commands.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r 4b16a5b1da62 -r a3a7cc0172fd src/lmtp/commands.c
--- a/src/lmtp/commands.c	Wed Jan 19 00:25:47 2011 +0200
+++ b/src/lmtp/commands.c	Wed Jan 19 20:06:39 2011 +0000
@@ -699,20 +699,18 @@
 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 @@
 		    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);
 }


More information about the dovecot-cvs mailing list