bounce_return_xxx.
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.334 2006/03/17 16:51:45 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.335 2006/03/20 10:55:21 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
PH/67 Fixed minor infelicity in the sorting of addresses to ensure that IPv6
is preferred over IPv4.
+PH/68 The bounce_return_message and bounce_return_body options were not being
+ honoured for bounces generated during the reception of non-SMTP messages.
+ In particular, this applied to messages rejected by the ACL. This bug has
+ been fixed. However, if bounce_return_message is true and bounce_return_
+ body is false, the headers that are returned for a non-SMTP message
+ include only those that have been read before the error was detected.
+ (In the case of an ACL rejection, they have all been read.)
+
Exim version 4.60
-----------------
-/* $Cambridge: exim/src/src/moan.c,v 1.5 2006/02/07 11:19:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/moan.c,v 1.6 2006/03/20 10:55:21 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
break;
}
-/* Now copy the message - headers then the rest of the input if
-available, up to the configured limit. */
+/* Now, if configured, copy the message; first the headers and then the rest of
+the input if available, up to the configured limit, if the option for including
+message bodies in bounces is set. */
-if (size_limit == 0 || size_limit > thismessage_size_limit)
- size_limit = thismessage_size_limit;
-
-if (size_limit > 0 && size_limit < message_size)
+if (bounce_return_message)
{
- int x = size_limit;
- uschar *k = US"";
- if ((x & 1023) == 0)
+ if (bounce_return_body)
{
- k = US"K";
- x >>= 10;
+ fprintf(f, "\n"
+ "------ This is a copy of your message, including all the headers.");
+ if (size_limit == 0 || size_limit > thismessage_size_limit)
+ size_limit = thismessage_size_limit;
+ if (size_limit > 0 && size_limit < message_size)
+ {
+ int x = size_limit;
+ uschar *k = US"";
+ if ((x & 1023) == 0)
+ {
+ k = US"K";
+ x >>= 10;
+ }
+ fprintf(f, "\n"
+ "------ No more than %d%s characters of the body are included.\n\n",
+ x, k);
+ }
+ else fprintf(f, " ------\n\n");
+ }
+ else
+ {
+ fprintf(f, "\n"
+ "------ This is a copy of the headers that were received before the "
+ "error\n was detected.\n\n");
}
- fprintf(f, "\n"
- "------ This is a copy of your message, including all the headers.\n"
- "------ No more than %d%s characters of the body are included.\n\n", x, k);
- }
-else fprintf(f, "\n"
- "------ This is a copy of your message, including all the headers. ------"
- "\n\n");
-/* If the error occurred before the Received: header was created, its text
-field will still be NULL; just omit such a header line. */
+ /* If the error occurred before the Received: header was created, its text
+ field will still be NULL; just omit such a header line. */
-while (headers != NULL)
- {
- if (headers->text != NULL) fprintf(f, "%s", CS headers->text);
- headers = headers->next;
- }
+ while (headers != NULL)
+ {
+ if (headers->text != NULL) fprintf(f, "%s", CS headers->text);
+ headers = headers->next;
+ }
-if (ident != ERRMESS_VLONGHEADER && ident != ERRMESS_VLONGHDRLINE)
- fputc('\n', f);
+ if (ident != ERRMESS_VLONGHEADER && ident != ERRMESS_VLONGHDRLINE)
+ fputc('\n', f);
-/* After early detection of an error, the message file may be STDIN,
-in which case we might have to terminate on a line containing just "."
-as well as on EOF. We may already have the first line in memory. */
+ /* After early detection of an error, the message file may be STDIN,
+ in which case we might have to terminate on a line containing just "."
+ as well as on EOF. We may already have the first line in memory. */
-if (message_file != NULL)
- {
- int ch;
- int state = 1;
- BOOL enddot = dot_ends && message_file == stdin;
- if (firstline != NULL) fprintf(f, "%s", CS firstline);
- while ((ch = fgetc(message_file)) != EOF)
+ if (bounce_return_body && message_file != NULL)
{
- fputc(ch, f);
- if (size_limit > 0 && ++written > size_limit) break;
- if (enddot)
+ int ch;
+ int state = 1;
+ BOOL enddot = dot_ends && message_file == stdin;
+ if (firstline != NULL) fprintf(f, "%s", CS firstline);
+ while ((ch = fgetc(message_file)) != EOF)
{
- if (state == 0) { if (ch == '\n') state = 1; }
- else if (state == 1)
- { if (ch == '.') state = 2; else if (ch != '\n') state = 0; }
- else
- { if (ch == '\n') break; else state = 0; }
+ fputc(ch, f);
+ if (size_limit > 0 && ++written > size_limit) break;
+ if (enddot)
+ {
+ if (state == 0) { if (ch == '\n') state = 1; }
+ else if (state == 1)
+ { if (ch == '.') state = 2; else if (ch != '\n') state = 0; }
+ else
+ { if (ch == '\n') break; else state = 0; }
+ }
}
}
}
-/* $Cambridge: exim/src/src/version.c,v 1.13 2006/02/07 11:19:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/version.c,v 1.14 2006/03/20 10:55:21 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
#include "exim.h"
-#define THIS_VERSION "4.61"
+#define THIS_VERSION "4.61-RC1"
/* The header file cnumber.h contains a single line containing the
# Exim test configuration 0021
SERVER=
+BR=
exim_path = EXIM_PATH
host_lookup_order = bydns
acl_smtp_mail = mail
acl_smtp_rcpt = rcpt
+BR
+
qualify_domain = test.ex
trusted_users = CALLER
1999-03-02 09:44:33 10HmaX-0005vi-00 F=<userx@test1> rejected by non-SMTP ACL: don't like sender userx@test1
-1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss
-1999-03-02 09:44:33 10HmbA-0005vi-00 => userx <userx@test1> R=accept T=appendfile
-1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
-1999-03-02 09:44:33 10HmbB-0005vi-00 <= ok@test1 U=CALLER P=local S=sss
-1999-03-02 09:44:33 10HmbB-0005vi-00 => userx <userx@test.ex> R=accept T=appendfile
-1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaY-0005vi-00 F=<ok@test2> rejected by non-SMTP ACL: cannot test hosts condition in non-SMTP ACL
-1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmaY-0005vi-00 U=EXIMUSER P=local S=sss
-1999-03-02 09:44:33 10HmbC-0005vi-00 => ok <ok@test2> R=accept T=appendfile
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss
+1999-03-02 09:44:33 10HmbC-0005vi-00 => userx <userx@test1> R=accept T=appendfile
1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
-1999-03-02 09:44:33 10HmbD-0005vi-00 <= ok@test3 U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= ok@test1 U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmbD-0005vi-00 => userx <userx@test.ex> R=accept T=appendfile
1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaZ-0005vi-00 F=<ok@test4> rejected by non-SMTP ACL: no verified certificate
-1999-03-02 09:44:33 10HmbE-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss
-1999-03-02 09:44:33 10HmbE-0005vi-00 => ok <ok@test4> R=accept T=appendfile
+1999-03-02 09:44:33 10HmaY-0005vi-00 F=<ok@test2> rejected by non-SMTP ACL: cannot test hosts condition in non-SMTP ACL
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= <> R=10HmaY-0005vi-00 U=EXIMUSER P=local S=sss
+1999-03-02 09:44:33 10HmbE-0005vi-00 => ok <ok@test2> R=accept T=appendfile
1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbF-0005vi-00 <= ok@test3 U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmbF-0005vi-00 => userx <userx@test.ex> R=accept T=appendfile
+1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaZ-0005vi-00 F=<ok@test4> rejected by non-SMTP ACL: no verified certificate
+1999-03-02 09:44:33 10HmbG-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss
+1999-03-02 09:44:33 10HmbG-0005vi-00 => ok <ok@test4> R=accept T=appendfile
+1999-03-02 09:44:33 10HmbG-0005vi-00 Completed
1999-03-02 09:44:33 H=[10.9.8.7] U=CALLER rejected connection in "connect" ACL
1999-03-02 09:44:33 10.9.8.8 accepted by connect ACL
1999-03-02 09:44:33 H=[10.9.8.8] U=CALLER rejected MAIL <bad@test1>
1999-03-02 09:44:33 H=(x.y.z) [10.9.8.10] U=CALLER rejected EHLO or HELO x.y.z
1999-03-02 09:44:33 10.9.8.8 accepted by connect ACL
1999-03-02 09:44:33 mail accepted
-1999-03-02 09:44:33 10HmbF-0005vi-00 <= ok@test3 H=[10.9.8.8] U=CALLER P=smtp S=sss
-1999-03-02 09:44:33 10HmbF-0005vi-00 => x <x@y> R=accept T=appendfile
-1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbH-0005vi-00 <= ok@test3 H=[10.9.8.8] U=CALLER P=smtp S=sss
+1999-03-02 09:44:33 10HmbH-0005vi-00 => x <x@y> R=accept T=appendfile
+1999-03-02 09:44:33 10HmbH-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbA-0005vi-00 F=<userx@test1> rejected by non-SMTP ACL: don't like sender userx@test1
+1999-03-02 09:44:33 10HmbI-0005vi-00 <= <> R=10HmbA-0005vi-00 U=EXIMUSER P=local S=sss
+1999-03-02 09:44:33 10HmbI-0005vi-00 => userx <userx@test1> R=accept T=appendfile
+1999-03-02 09:44:33 10HmbI-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbB-0005vi-00 F=<userx@test1> rejected by non-SMTP ACL: don't like sender userx@test1
+1999-03-02 09:44:33 10HmbJ-0005vi-00 <= <> R=10HmbB-0005vi-00 U=EXIMUSER P=local S=sss
+1999-03-02 09:44:33 10HmbJ-0005vi-00 => userx <userx@test1> R=accept T=appendfile
+1999-03-02 09:44:33 10HmbJ-0005vi-00 Completed
From MAILER-DAEMON Tue Mar 02 09:44:33 1999
Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz)
- id 10HmbC-0005vi-00
+ id 10HmbE-0005vi-00
for ok@test2; Tue, 2 Mar 1999 09:44:33 +0000
Auto-Submitted: auto-replied
From: Mail Delivery System <Mailer-Daemon@test.ex>
To: ok@test2
Subject: Mail failure - rejected by local scanning code
-Message-Id: <E10HmbC-0005vi-00@myhost.test.ex>
+Message-Id: <E10HmbE-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
A message that you sent was rejected by the local scanning code that
From MAILER-DAEMON Tue Mar 02 09:44:33 1999
Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz)
- id 10HmbE-0005vi-00
+ id 10HmbG-0005vi-00
for ok@test4; Tue, 2 Mar 1999 09:44:33 +0000
Auto-Submitted: auto-replied
From: Mail Delivery System <Mailer-Daemon@test.ex>
To: ok@test4
Subject: Mail failure - rejected by local scanning code
-Message-Id: <E10HmbE-0005vi-00@myhost.test.ex>
+Message-Id: <E10HmbG-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
A message that you sent was rejected by the local scanning code that
From MAILER-DAEMON Tue Mar 02 09:44:33 1999
Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz)
- id 10HmbA-0005vi-00
+ id 10HmbC-0005vi-00
for userx@test1; Tue, 2 Mar 1999 09:44:33 +0000
Auto-Submitted: auto-replied
From: Mail Delivery System <Mailer-Daemon@test.ex>
To: userx@test1
Subject: Mail failure - rejected by local scanning code
-Message-Id: <E10HmbA-0005vi-00@myhost.test.ex>
+Message-Id: <E10HmbC-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
A message that you sent was rejected by the local scanning code that
From ok@test1 Tue Mar 02 09:44:33 1999
Received: from CALLER by myhost.test.ex with local (Exim x.yz)
(envelope-from <ok@test1>)
- id 10HmbB-0005vi-00
+ id 10HmbD-0005vi-00
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
-Message-Id: <E10HmbB-0005vi-00@myhost.test.ex>
+Message-Id: <E10HmbD-0005vi-00@myhost.test.ex>
From: ok@test1
Date: Tue, 2 Mar 1999 09:44:33 +0000
From ok@test3 Tue Mar 02 09:44:33 1999
Received: from CALLER by myhost.test.ex with local (Exim x.yz)
(envelope-from <ok@test3>)
- id 10HmbD-0005vi-00
+ id 10HmbF-0005vi-00
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
-Message-Id: <E10HmbD-0005vi-00@myhost.test.ex>
+Message-Id: <E10HmbF-0005vi-00@myhost.test.ex>
From: ok@test3
Date: Tue, 2 Mar 1999 09:44:33 +0000
Test message 4.
+From MAILER-DAEMON Tue Mar 02 09:44:33 1999
+Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz)
+ id 10HmbI-0005vi-00
+ for userx@test1; Tue, 2 Mar 1999 09:44:33 +0000
+Auto-Submitted: auto-replied
+From: Mail Delivery System <Mailer-Daemon@test.ex>
+To: userx@test1
+Subject: Mail failure - rejected by local scanning code
+Message-Id: <E10HmbI-0005vi-00@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+A message that you sent was rejected by the local scanning code that
+checks incoming messages on this system. The following error was given:
+
+ don't like sender userx@test1
+
+From MAILER-DAEMON Tue Mar 02 09:44:33 1999
+Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz)
+ id 10HmbJ-0005vi-00
+ for userx@test1; Tue, 2 Mar 1999 09:44:33 +0000
+Auto-Submitted: auto-replied
+From: Mail Delivery System <Mailer-Daemon@test.ex>
+To: userx@test1
+Subject: Mail failure - rejected by local scanning code
+Message-Id: <E10HmbJ-0005vi-00@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+A message that you sent was rejected by the local scanning code that
+checks incoming messages on this system. The following error was given:
+
+ don't like sender userx@test1
+
+------ This is a copy of the headers that were received before the error
+ was detected.
+
+Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+ (envelope-from <userx@test1>)
+ id 10HmbB-0005vi-00
+ for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmbB-0005vi-00@myhost.test.ex>
+From: userx@test1
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+
Received: from [10.9.8.8] (ident=CALLER)
by myhost.test.ex with smtp (Exim x.yz)
(envelope-from <ok@test3>)
- id 10HmbF-0005vi-00
+ id 10HmbH-0005vi-00
for x@y; Tue, 2 Mar 1999 09:44:33 +0000
X-ACL-Warn: added header line
1999-03-02 09:44:33 U=CALLER rejected connection in "connect" ACL
1999-03-02 09:44:33 H=(x.y.z) [10.9.8.10] U=CALLER rejected EHLO or HELO x.y.z
1999-03-02 09:44:33 mail accepted
+1999-03-02 09:44:33 10HmbA-0005vi-00 F=<userx@test1> rejected by non-SMTP ACL: don't like sender userx@test1
+Envelope-from: <userx@test1>
+Envelope-to: <userx@test.ex>
+P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+ (envelope-from <userx@test1>)
+ id 10HmbA-0005vi-00
+ for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+I Message-Id: <E10HmbA-0005vi-00@myhost.test.ex>
+F From: userx@test1
+ Date: Tue, 2 Mar 1999 09:44:33 +0000
+1999-03-02 09:44:33 10HmbB-0005vi-00 F=<userx@test1> rejected by non-SMTP ACL: don't like sender userx@test1
+Envelope-from: <userx@test1>
+Envelope-to: <userx@test.ex>
+P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+ (envelope-from <userx@test1>)
+ id 10HmbB-0005vi-00
+ for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+I Message-Id: <E10HmbB-0005vi-00@myhost.test.ex>
+F From: userx@test1
+ Date: Tue, 2 Mar 1999 09:44:33 +0000
.
quit
****
+# Test unsetting bounce_return_message for non-SMTP
+1
+exim -DBR=no_bounce_return_message -odi -f userx@test1 userx
+Test message 1.
+.
+****
+# Test unsetting bounce_return_body for non-SMTP
+1
+exim -DBR=no_bounce_return_body -odi -f userx@test1 userx
+Test message 1.
+.
+****
250 OK\r
250 Accepted\r
354 Enter message, ending with "." on a line by itself\r
-250 OK id=10HmbF-0005vi-00\r
+250 OK id=10HmbH-0005vi-00\r
221 myhost.test.ex closing connection\r