- if (bounce_sender_authentication != NULL)
- child_exec_exim(CEE_EXEC_EXIT, FALSE, NULL, FALSE, 8,
- US"-t", US"-oem", US"-oi", US"-f", US"<>", US"-oMas",
- bounce_sender_authentication, message_id_option);
- else
- child_exec_exim(CEE_EXEC_EXIT, FALSE, NULL, FALSE, 6,
- US"-t", US"-oem", US"-oi", US"-f", US"<>", message_id_option);
- /* Control does not return here. */
+ if (running_in_test_harness && !queue_only)
+ {
+ if (sender_authentication != NULL)
+ child_exec_exim(CEE_EXEC_EXIT, FALSE, NULL, FALSE, 9,
+ US "-odi", US"-t", US"-oem", US"-oi", US"-f", sender, US"-oMas",
+ sender_authentication, message_id_option);
+ else
+ child_exec_exim(CEE_EXEC_EXIT, FALSE, NULL, FALSE, 7,
+ US "-odi", US"-t", US"-oem", US"-oi", US"-f", sender,
+ message_id_option);
+ /* Control does not return here. */
+ }
+ else /* Not test harness */
+ {
+ if (sender_authentication != NULL)
+ child_exec_exim(CEE_EXEC_EXIT, FALSE, NULL, FALSE, 8,
+ US"-t", US"-oem", US"-oi", US"-f", sender, US"-oMas",
+ sender_authentication, message_id_option);
+ else
+ child_exec_exim(CEE_EXEC_EXIT, FALSE, NULL, FALSE, 6,
+ US"-t", US"-oem", US"-oi", US"-f", sender, message_id_option);
+ /* Control does not return here. */
+ }