# HG changeset patch # User Pascal Volk # Date 1295467599 0 # Node ID a3a7cc0172fdecbab036ee7bfedbaeda6a43fd33 # Parent 4b16a5b1da62f8a5ef8bec66374c0cf831f77135 lmtp: Write "+ext" part to Delivered-To: header. (reverted changeset 19231e3585db) 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); }