From: Stephan Bosch Date: Tue, 17 Oct 2017 23:03:03 +0000 (+0200) Subject: lmtp: commands: Grouped deliver context field assignments by topic in client_deliver(). X-Git-Tag: 2.3.0.rc1~363 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad8d2060ac0eac3b61fa490bf42bdce54267c969;p=thirdparty%2Fdovecot%2Fcore.git lmtp: commands: Grouped deliver context field assignments by topic in client_deliver(). --- diff --git a/src/lmtp/commands.c b/src/lmtp/commands.c index c2399aa67f..89071f165e 100644 --- a/src/lmtp/commands.c +++ b/src/lmtp/commands.c @@ -790,14 +790,13 @@ client_deliver(struct client *client, const struct mail_recipient *rcpt, dctx.smtp_set = smtp_set; dctx.session_id = rcpt->session_id; dctx.src_mail = src_mail; + + /* MAIL FROM */ dctx.mail_from = client->state.mail_from; dctx.mail_params = client->state.mail_params; - dctx.rcpt_user = dest_user; - dctx.session_time_msecs = - timeval_diff_msecs(&client->state.data_end_timeval, - &client->state.mail_from_timeval); - dctx.delivery_time_started = delivery_time_started; + /* RCPT TO */ + dctx.rcpt_user = dest_user; dctx.rcpt_params = rcpt->params; if (dctx.rcpt_params.orcpt.addr != NULL) { /* used ORCPT */ @@ -820,6 +819,11 @@ client_deliver(struct client *client, const struct mail_recipient *rcpt, dctx.save_dest_mail = array_count(&client->state.rcpt_to) > 1 && client->state.first_saved_mail == NULL; + dctx.session_time_msecs = + timeval_diff_msecs(&client->state.data_end_timeval, + &client->state.mail_from_timeval); + dctx.delivery_time_started = delivery_time_started; + if (mail_deliver(&dctx, &storage) == 0) { if (dctx.dest_mail != NULL) { i_assert(client->state.first_saved_mail == NULL);