1 diff --git a/src/src/transports/autoreply.c b/src/src/transports/autoreply.c
2 index 211e32810..ddf241c7b 100644
3 --- a/src/src/transports/autoreply.c
4 +++ b/src/src/transports/autoreply.c
5 @@ -271,6 +271,7 @@ uschar *logfile, *oncelog;
6 uschar *cache_buff = NULL;
7 uschar *cache_time = NULL;
8 uschar *message_id = NULL;
9 +uschar *ar_return_path = NULL;
11 time_t now = time(NULL);
12 time_t once_repeat_sec = 0;
13 @@ -564,8 +565,11 @@ if (file)
16 /* Make a subprocess to send the message */
18 -if ((pid = child_open_exim(&fd, US"autoreply")) < 0)
19 +if (tblock->return_path)
20 + ar_return_path = expand_string(tblock->return_path);
22 + ar_return_path = US"<>";
23 +if ((pid = child_open_exim2_function(&fd, ar_return_path, bounce_sender_authentication, US"autoreply")) < 0)
25 /* Creation of child failed; defer this delivery. */