static struct pollfd *parpoll;
static int return_count;
static uschar *frozen_info = US"";
-static const uschar * used_return_path = NULL;
when it is not set is for a delivery to /dev/null which is optimised by not
being run at all. */
-if (used_return_path && LOGGING(return_path_on_delivery))
- g = string_append(g, 3, US" P=<", used_return_path, US">");
+if (addr->return_path && LOGGING(return_path_on_delivery))
+ g = string_append(g, 3, US" P=<", addr->return_path, US">");
if (msg)
g = string_append(g, 2, US" ", msg);
/* Return path may not be set if no delivery actually happened */
-if (used_return_path && LOGGING(return_path_on_delivery))
- g = string_append(g, 3, US" P=<", used_return_path, US">");
+if (addr->return_path && LOGGING(return_path_on_delivery))
+ g = string_append(g, 3, US" P=<", addr->return_path, US">");
if (addr->router)
g = string_append(g, 2, US" R=", addr->router->drinst.name);
/* For local deliveries, one at a time, the value used for logging can just be
set directly, once and for all. */
-used_return_path = return_path;
+addr->return_path = return_path;
/* Sort out the uid, gid, and initgroups flag. If an error occurs, the message
gets put into the address(es), and the expansions are unset, so we can just
par_wait(void)
{
int poffset, status;
-address_item * addr, * addrlist;
+address_item * addrlist;
pid_t pid;
set_process_info("delivering %s: waiting for a remote delivery subprocess "
if (msb != 0 || (code != SIGTERM && code != SIGKILL && code != SIGQUIT))
addrlist->special_action = SPECIAL_FREEZE;
- for (addr = addrlist; addr; addr = addr->next)
+ for (address_item * addr = addrlist; addr; addr = addr->next)
{
addr->transport_return = DEFER;
addr->message = msg;
decrement the count of subprocesses, and return the address chain. */
transport_count = parlist[poffset].transport_count;
-used_return_path = parlist[poffset].return_path;
+for (address_item * addr = addrlist; addr; addr = addr->next)
+ addr->return_path = parlist[poffset].return_path;
parlist[poffset].pid = 0;
parcount--;
return addrlist;
**NOTE: The delivery lines in this file have been sorted.
1999-03-02 09:44:33 rcpt for userx@domain.com
-1999-03-02 09:44:33 10HmaX-000000005vi-0000 >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmaX-000000005vi-0000 >> userx@domain.com P=<CALLER@myhost.test.ex> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmaX-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain.com
1999-03-02 09:44:33 10HmaX-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for userz@domain.com
-1999-03-02 09:44:33 10HmaY-000000005vi-0000 >> userz@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmaY-000000005vi-0000 >> userz@domain.com P=<CALLER@myhost.test.ex> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmaY-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userz@domain.com
1999-03-02 09:44:33 10HmaY-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for usery@domain.com
1999-03-02 09:44:33 rcpt for userx@domain.com
-1999-03-02 09:44:33 10HmaZ-000000005vi-0000 >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmaZ-000000005vi-0000 >> usery@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmaZ-000000005vi-0000 >> userx@domain.com P=<CALLER@myhost.test.ex> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmaZ-000000005vi-0000 >> usery@domain.com P=<CALLER@myhost.test.ex> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmaZ-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for usery@domain.com userx@domain.com
1999-03-02 09:44:33 10HmaZ-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for userx@domain.com
-1999-03-02 09:44:33 10HmbA-000000005vi-0000 >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbA-000000005vi-0000 >> userx@domain.com P=<CALLER@myhost.test.ex> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbA-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain.com
1999-03-02 09:44:33 10HmbA-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for no@domain.com
1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>
1999-03-02 09:44:33 rcpt for userx@domain.com
1999-03-02 09:44:33 10HmbB-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain.com
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 => userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbB-000000005vi-0000 => userx@domain.com P=<> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbB-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for userx@domain.com
1999-03-02 09:44:33 rcpt for no@domain.com
1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>
1999-03-02 09:44:33 10HmbC-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain.com
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 => userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbC-000000005vi-0000 => userx@domain.com P=<> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbC-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for userx@domain.com
1999-03-02 09:44:33 rcpt for special_tpt@domain.com
1999-03-02 09:44:33 10HmbD-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain.com special_tpt@domain.com
-1999-03-02 09:44:33 10HmbD-000000005vi-0000 => special_tpt@domain.com R=all T=smtp2 H=127.0.0.1 [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmbD-000000005vi-0000 => userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 => special_tpt@domain.com P=<> R=all T=smtp2 H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 => userx@domain.com P=<> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbD-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for userx@domain1.com
1999-03-02 09:44:33 rcpt for usery@domain2.com
-1999-03-02 09:44:33 10HmbE-000000005vi-0000 >> usery@domain2.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmbE-000000005vi-0000 >> userx@domain1.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 >> usery@domain2.com P=<CALLER@myhost.test.ex> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 >> userx@domain1.com P=<CALLER@myhost.test.ex> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbE-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain1.com usery@domain2.com
1999-03-02 09:44:33 10HmbE-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for userx@domain.com
1999-03-02 09:44:33 rcpt for usery@special.com
1999-03-02 09:44:33 10HmbF-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain.com usery@special.com
-1999-03-02 09:44:33 10HmbF-000000005vi-0000 => userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmbF-000000005vi-0000 => usery@special.com R=all T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] C="250 OK"
+1999-03-02 09:44:33 10HmbF-000000005vi-0000 => userx@domain.com P=<> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbF-000000005vi-0000 => usery@special.com P=<> R=all T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] C="250 OK"
1999-03-02 09:44:33 10HmbF-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for userx@localhost4.test.ex
1999-03-02 09:44:33 rcpt for usery@thishost.test.ex
-1999-03-02 09:44:33 10HmbG-000000005vi-0000 >> usery@thishost.test.ex R=dns T=smtp H=localhost4.test.ex [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmbG-000000005vi-0000 >> userx@localhost4.test.ex R=dns T=smtp H=localhost4.test.ex [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 >> usery@thishost.test.ex P=<CALLER@myhost.test.ex> R=dns T=smtp H=localhost4.test.ex [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 >> userx@localhost4.test.ex P=<CALLER@myhost.test.ex> R=dns T=smtp H=localhost4.test.ex [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbG-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@localhost4.test.ex usery@thishost.test.ex
1999-03-02 09:44:33 10HmbG-000000005vi-0000 Completed
1999-03-02 09:44:33 rcpt for userx@domain.com
-1999-03-02 09:44:33 10HmbH-000000005vi-0000 >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbH-000000005vi-0000 >> userx@domain.com P=<CALLER@myhost.test.ex> R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbH-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain.com
1999-03-02 09:44:33 10HmbH-000000005vi-0000 Completed