*/
void
-receive_add_recipient(uschar *recipient, int pno)
+receive_add_recipient(uschar * recipient, int pno)
{
if (recipients_count >= recipients_list_max)
{
that this has happened, in order to give a better error if there are
no recipients left. */
- else if (recipient != NULL)
+ else if (recipient)
{
if (tree_search(tree_nonrecipients, recipient) == NULL)
receive_add_recipient(recipient, -1);
/* Move on past this address */
- s = ss + (*ss? 1:0);
+ s = ss + (*ss ? 1 : 0);
while (isspace(*s)) s++;
} /* Next address */
if (rc == LOCAL_SCAN_ACCEPT)
{
if (local_scan_data)
- for (uschar * s = local_scan_data; *s != 0; s++) if (*s == '\n') *s = ' ';
- for (int i = 0; i < recipients_count; i++)
+ for (uschar * s = local_scan_data; *s; s++) if (*s == '\n') *s = ' ';
+ for (recipient_item * r = recipients_list;
+ r < recipients_list + recipients_count; r++)
{
- recipient_item *r = recipients_list + i;
r->address = rewrite_address_qualify(r->address, TRUE);
if (r->errors_to)
r->errors_to = rewrite_address_qualify(r->errors_to, TRUE);
signal(SIGINT, SIG_IGN);
#endif /* HAVE_LOCAL_SCAN */
+/* If we are faking a reject or defer, avoid sennding a DSN for the
+actually-accepted message */
+
+if (fake_response != OK)
+ for (recipient_item * r = recipients_list;
+ r < recipients_list + recipients_count; r++)
+ {
+ DEBUG(D_receive) if (r->dsn_flags & (rf_notify_success | rf_notify_delay))
+ debug_printf("DSN: clearing flags due to fake-response for message\n");
+ r->dsn_flags = r->dsn_flags & ~(rf_notify_success | rf_notify_delay)
+ | rf_notify_never;
+ }
+
/* Ensure the first time flag is set in the newly-received message. */
1999-03-02 09:44:33 10HmbA-000000005vi-0000 Completed
1999-03-02 09:44:33 10HmbA-000000005vi-0000 event msg:complete
1999-03-02 09:44:33 End queue run: pid=p1237
-1999-03-02 09:44:33 defer/delay
+1999-03-02 09:44:33 fakereject/success
1999-03-02 09:44:33 Start queue run: pid=p1238
1999-03-02 09:44:33 10HmbB-000000005vi-0000 event tcp:connect
1999-03-02 09:44:33 10HmbB-000000005vi-0000 event smtp:connect
1999-03-02 09:44:33 10HmbB-000000005vi-0000 event smtp:ehlo
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 event msg:rcpt:host:defer
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 event msg:rcpt:defer
1999-03-02 09:44:33 10HmbB-000000005vi-0000 event tcp:close
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 == rmt_defer@test.ex R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@test.ex>: 451 Temporary local problem - please try later
+1999-03-02 09:44:33 10HmbB-000000005vi-0000 ** rmt_fakereject@test.ex R=r2 T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after end of data: 550-Your message has been rejected but is being kept for evaluation.\n550-If it was a legitimate message, it may still be delivered to the target\n550 recipient(s).
+1999-03-02 09:44:33 10HmbB-000000005vi-0000 event msg:fail:delivery
+1999-03-02 09:44:33 10HmbB-000000005vi-0000 rmt_fakereject@test.ex: error ignored: RFC 3461 DSN, failure notify not requested
+1999-03-02 09:44:33 10HmbB-000000005vi-0000 Completed
+1999-03-02 09:44:33 10HmbB-000000005vi-0000 event msg:complete
1999-03-02 09:44:33 End queue run: pid=p1238
-1999-03-02 09:44:33 defer/never
1999-03-02 09:44:33 Start queue run: pid=p1239
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 == rmt_defer@test.ex routing defer (-52): retry time not reached
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 event tcp:connect
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 event smtp:connect
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 event smtp:ehlo
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 event msg:rcpt:host:defer
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 event msg:rcpt:defer
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 event tcp:close
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 == rmt_defer@test.ex R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@test.ex>: 451 Temporary local problem - please try later
+1999-03-02 09:44:33 10HmbC-000000005vi-0000 => rmt_fakereject <rmt_fakereject@test.ex> R=r1 T=tofile
+1999-03-02 09:44:33 10HmbC-000000005vi-0000 event msg:delivery
+1999-03-02 09:44:33 10HmbC-000000005vi-0000 Completed
+1999-03-02 09:44:33 10HmbC-000000005vi-0000 event msg:complete
1999-03-02 09:44:33 End queue run: pid=p1239
-1999-03-02 09:44:33 playout
1999-03-02 09:44:33 Start queue run: pid=p1240
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 == rmt_defer@test.ex routing defer (-52): retry time not reached
-1999-03-02 09:44:33 10HmbD-000000005vi-0000 <= <> R=10HmbB-000000005vi-0000 U=EXIMUSER P=local S=sss for c@dump.ex
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 == rmt_defer@test.ex routing defer (-52): retry time not reached
1999-03-02 09:44:33 End queue run: pid=p1240
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 event msg:fail:internal
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 event msg:complete
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 removed by CALLER
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 Completed
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 event msg:fail:internal
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 event msg:complete
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 removed by CALLER
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 Completed
-1999-03-02 09:44:33 rej/failure+delay
+1999-03-02 09:44:33 defer/delay
1999-03-02 09:44:33 Start queue run: pid=p1241
-1999-03-02 09:44:33 10HmbD-000000005vi-0000 => :blackhole: <c@dump.ex> R=r_dump
-1999-03-02 09:44:33 10HmbD-000000005vi-0000 Completed
-1999-03-02 09:44:33 10HmbD-000000005vi-0000 event msg:complete
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 event tcp:connect
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 event smtp:connect
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 event smtp:ehlo
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 event msg:rcpt:host:defer
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 event msg:rcpt:defer
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 event tcp:close
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 == rmt_defer@test.ex R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@test.ex>: 451 Temporary local problem - please try later
+1999-03-02 09:44:33 End queue run: pid=p1241
+1999-03-02 09:44:33 defer/never
+1999-03-02 09:44:33 Start queue run: pid=p1242
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 == rmt_defer@test.ex routing defer (-52): retry time not reached
1999-03-02 09:44:33 10HmbE-000000005vi-0000 event tcp:connect
1999-03-02 09:44:33 10HmbE-000000005vi-0000 event smtp:connect
1999-03-02 09:44:33 10HmbE-000000005vi-0000 event smtp:ehlo
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 event msg:rcpt:host:defer
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 event msg:rcpt:defer
1999-03-02 09:44:33 10HmbE-000000005vi-0000 event tcp:close
-1999-03-02 09:44:33 10HmbE-000000005vi-0000 ** rmt_reject@test.ex R=r2 T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_reject@test.ex>: 550 Administrative prohibition
-1999-03-02 09:44:33 10HmbF-000000005vi-0000 <= <> R=10HmbE-000000005vi-0000 U=EXIMUSER P=local S=sss for e@dump.ex
-1999-03-02 09:44:33 10HmbE-000000005vi-0000 Completed
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 == rmt_defer@test.ex R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@test.ex>: 451 Temporary local problem - please try later
+1999-03-02 09:44:33 End queue run: pid=p1242
+1999-03-02 09:44:33 playout
+1999-03-02 09:44:33 Start queue run: pid=p1243
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 == rmt_defer@test.ex routing defer (-52): retry time not reached
+1999-03-02 09:44:33 10HmbF-000000005vi-0000 <= <> R=10HmbD-000000005vi-0000 U=EXIMUSER P=local S=sss for c@dump.ex
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 == rmt_defer@test.ex routing defer (-52): retry time not reached
+1999-03-02 09:44:33 End queue run: pid=p1243
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 event msg:fail:internal
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 event msg:complete
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 removed by CALLER
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 Completed
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 event msg:fail:internal
1999-03-02 09:44:33 10HmbE-000000005vi-0000 event msg:complete
-1999-03-02 09:44:33 End queue run: pid=p1241
-1999-03-02 09:44:33 deliver DSN
-1999-03-02 09:44:33 Start queue run: pid=p1242
-1999-03-02 09:44:33 10HmbF-000000005vi-0000 => :blackhole: <e@dump.ex> R=r_dump
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 removed by CALLER
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 Completed
+1999-03-02 09:44:33 rej/failure+delay
+1999-03-02 09:44:33 Start queue run: pid=p1244
+1999-03-02 09:44:33 10HmbF-000000005vi-0000 => :blackhole: <c@dump.ex> R=r_dump
1999-03-02 09:44:33 10HmbF-000000005vi-0000 Completed
1999-03-02 09:44:33 10HmbF-000000005vi-0000 event msg:complete
-1999-03-02 09:44:33 End queue run: pid=p1242
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 event tcp:connect
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 event smtp:connect
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 event smtp:ehlo
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 event tcp:close
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 ** rmt_reject@test.ex R=r2 T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_reject@test.ex>: 550 Administrative prohibition
+1999-03-02 09:44:33 10HmbH-000000005vi-0000 <= <> R=10HmbG-000000005vi-0000 U=EXIMUSER P=local S=sss for e@dump.ex
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 Completed
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 event msg:complete
+1999-03-02 09:44:33 End queue run: pid=p1244
+1999-03-02 09:44:33 deliver DSN
+1999-03-02 09:44:33 Start queue run: pid=p1245
+1999-03-02 09:44:33 10HmbH-000000005vi-0000 => :blackhole: <e@dump.ex> R=r_dump
+1999-03-02 09:44:33 10HmbH-000000005vi-0000 Completed
+1999-03-02 09:44:33 10HmbH-000000005vi-0000 event msg:complete
+1999-03-02 09:44:33 End queue run: pid=p1245
******** SERVER ********
-1999-03-02 09:44:33 exim x.yz daemon started: pid=p1243, no queue runs, listening for SMTP on port PORT_D
-1999-03-02 09:44:33 exim x.yz daemon started: pid=p1244, no queue runs, listening for SMTP on port PORT_D
+1999-03-02 09:44:33 exim x.yz daemon started: pid=p1246, no queue runs, listening for SMTP on port PORT_D
+1999-03-02 09:44:33 exim x.yz daemon started: pid=p1247, no queue runs, listening for SMTP on port PORT_D
1999-03-02 09:44:33 10HmaX-000000005vi-0000 <= a@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_reject@test.ex
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<a@dump.ex> rejected RCPT <rmt_reject@test.ex>
1999-03-02 09:44:33 10HmaY-000000005vi-0000 <= b@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_accept@test.ex
1999-03-02 09:44:33 10HmaZ-000000005vi-0000 <= b@dump.ex H=localhost (myhost.test.ex) [127.0.0.1] P=esmtp S=sss for rmt_accept@test.ex
-1999-03-02 09:44:33 10HmbB-000000005vi-0000 <= c@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@test.ex
+1999-03-02 09:44:33 10HmbB-000000005vi-0000 <= b2@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_fakereject@test.ex
+1999-03-02 09:44:33 10HmbC-000000005vi-0000 (= b2@dump.ex H=localhost (myhost.test.ex) [127.0.0.1] P=esmtp S=sss for rmt_fakereject@test.ex
+1999-03-02 09:44:33 10HmbD-000000005vi-0000 <= c@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@test.ex
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<c@dump.ex> temporarily rejected RCPT <rmt_defer@test.ex>
-1999-03-02 09:44:33 10HmbC-000000005vi-0000 <= d@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@test.ex
+1999-03-02 09:44:33 10HmbE-000000005vi-0000 <= d@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@test.ex
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<d@dump.ex> temporarily rejected RCPT <rmt_defer@test.ex>
-1999-03-02 09:44:33 10HmbE-000000005vi-0000 <= e@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_reject@test.ex
+1999-03-02 09:44:33 10HmbG-000000005vi-0000 <= e@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_reject@test.ex
1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<e@dump.ex> rejected RCPT <rmt_reject@test.ex>