Mercurial > dovecot > core-2.2
diff src/lda/main.c @ 12111:8bd2bd410c73
Added lda_original_recipient_header setting. Removed non-standard use of Envelope-To: header.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 14 Sep 2010 13:45:57 +0100 |
parents | d56a28e83f32 |
children | 942bb9258e49 |
line wrap: on
line diff
--- a/src/lda/main.c Tue Sep 14 13:17:18 2010 +0100 +++ b/src/lda/main.c Tue Sep 14 13:45:57 2010 +0100 @@ -405,13 +405,14 @@ mailbox_header_lookup_unref(&headers_ctx); mail_set_seq(ctx.src_mail, 1); - if (ctx.dest_addr == NULL) { + if (ctx.dest_addr == NULL && + *ctx.set->lda_original_recipient_header != '\0') { ctx.dest_addr = mail_deliver_get_address(ctx.src_mail, - "Envelope-To"); - if (ctx.dest_addr == NULL) { - ctx.dest_addr = strchr(user, '@') != NULL ? user : - t_strconcat(user, "@", ctx.set->hostname, NULL); - } + ctx.set->lda_original_recipient_header); + } + if (ctx.dest_addr == NULL) { + ctx.dest_addr = strchr(user, '@') != NULL ? user : + t_strconcat(user, "@", ctx.set->hostname, NULL); } if (ctx.final_dest_addr == NULL) ctx.final_dest_addr = ctx.dest_addr;