dovecot-2.0: lmtp: Don't write "+ext" part to Delivered-To: header.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jul 20 23:08:56 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/19231e3585db
changeset: 11872:19231e3585db
user: Timo Sirainen <tss at iki.fi>
date: Tue Jul 20 21:07:44 2010 +0100
description:
lmtp: Don't write "+ext" part to Delivered-To: header.
diffstat:
src/lmtp/commands.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 45b835e6f59c -r 19231e3585db src/lmtp/commands.c
--- a/src/lmtp/commands.c Tue Jul 20 20:23:20 2010 +0100
+++ b/src/lmtp/commands.c Tue Jul 20 21:07:44 2010 +0100
@@ -673,18 +673,20 @@
static const char *client_get_added_headers(struct client *client)
{
string_t *str = t_str_new(200);
- const char *host, *rcpt_to = NULL;
+ const char *host, *address = NULL, *username = NULL;
if (array_count(&client->state.rcpt_to) == 1) {
const struct mail_recipient *rcpt =
array_idx(&client->state.rcpt_to, 0);
+ const char *detail;
- rcpt_to = rcpt->address;
+ address = rcpt->address;
+ rcpt_address_parse(client, address, &username, &detail);
}
str_printfa(str, "Return-Path: <%s>\r\n", client->state.mail_from);
- if (rcpt_to != NULL)
- str_printfa(str, "Delivered-To: <%s>\r\n", rcpt_to);
+ if (username != NULL)
+ str_printfa(str, "Delivered-To: <%s>\r\n", username);
str_printfa(str, "Received: from %s", client->state.lhlo);
if ((host = net_ip2addr(&client->remote_ip)) != NULL)
@@ -693,8 +695,8 @@
client->my_domain, client->state.session_id);
str_append(str, "\r\n\t");
- if (rcpt_to != NULL)
- str_printfa(str, "for <%s>", rcpt_to);
+ if (address != NULL)
+ str_printfa(str, "for <%s>", address);
str_printfa(str, "; %s\r\n", message_date_create(ioloop_time));
return str_c(str);
}
More information about the dovecot-cvs
mailing list