summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2006-07-13 14:46:05 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2006-07-13 14:46:05 +0000
commit5dff5817bb92191e4fd5f9d36fe20b1fec6c9969 (patch)
treee4fe0c000eae3f0c9db8952c215799f008701155
parenta5bd321b2f16ff323e3e268d59606e89b747a901 (diff)
Add a check for Auto-Submitted to the default for
delay_warning_condition.
-rw-r--r--doc/doc-txt/ChangeLog13
-rw-r--r--src/src/globals.c8
-rw-r--r--test/confs/00983
-rw-r--r--test/log/009814
-rw-r--r--test/scripts/0000-Basic/009820
-rw-r--r--test/stdout/00982
6 files changed, 57 insertions, 3 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index b4d476aac..e25f552d8 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.373 2006/07/13 13:53:32 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.374 2006/07/13 14:46:05 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -93,6 +93,17 @@ PH/16 Recognize SMTP codes at the start of "message" in ACLs and after :fail:
and :defer: in a redirect router. Add forbid_smtp_code to suppress the
latter.
+PH/17 Added an extra condition to the default value of delay_warning_condition
+ so that it is now:
+
+ ${if or {
+ { match{$h_precedence:}{(?i)bulk|list|junk} }
+ { match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }
+ }{no}{yes}}
+
+ The Auto-Submitted: header is standardised, whereas I don't think
+ Precedence: ever was.
+
Exim version 4.62
-----------------
diff --git a/src/src/globals.c b/src/src/globals.c
index 2a6aba592..e17eba728 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/globals.c,v 1.55 2006/07/13 13:53:33 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.56 2006/07/13 14:46:05 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -449,7 +449,11 @@ bit_table debug_options[] = {
int debug_options_count = sizeof(debug_options)/sizeof(bit_table);
unsigned int debug_selector = 0;
int delay_warning[DELAY_WARNING_SIZE] = { DELAY_WARNING_SIZE, 1, 24*60*60 };
-uschar *delay_warning_condition= US"${if match{$h_precedence:}{(?i)bulk|list|junk}{no}{yes}}";
+uschar *delay_warning_condition=
+ US"${if or {"
+ "{ match{$h_precedence:}{(?i)bulk|list|junk} }"
+ "{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }"
+ "} {no}{yes}}";
BOOL delivery_date_remove = TRUE;
uschar *deliver_address_data = NULL;
int deliver_datafile = -1;
diff --git a/test/confs/0098 b/test/confs/0098
index deec607e9..07346c87e 100644
--- a/test/confs/0098
+++ b/test/confs/0098
@@ -17,7 +17,10 @@ qualify_domain = test.ex
domainlist local_domains = test.ex : another.test.ex
delay_warning = 10s:40s:10m
+
+.ifndef DEFAULTDWC
delay_warning_condition = ${if !eq{$domain}{another.test.ex}{yes}{no}}
+.endif
log_selector = +subject
diff --git a/test/log/0098 b/test/log/0098
index 98e22e3a1..5e0c1da7f 100644
--- a/test/log/0098
+++ b/test/log/0098
@@ -89,3 +89,17 @@
1999-03-02 09:44:33 Start queue run: pid=pppp -qf
1999-03-02 09:44:33 10HmbI-0005vi-00 == defer@another.test.ex R=alias defer (-1): This address has been forced to defer.
1999-03-02 09:44:33 End queue run: pid=pppp -qf
+1999-03-02 09:44:33 10HmbI-0005vi-00 removed by CALLER
+1999-03-02 09:44:33 10HmbI-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbJ-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmbJ-0005vi-00 == defer@test.ex R=alias defer (-1): This address has been forced to defer.
+1999-03-02 09:44:33 Start queue run: pid=pppp -qf
+1999-03-02 09:44:33 10HmbJ-0005vi-00 == defer@test.ex R=alias defer (-1): This address has been forced to defer.
+1999-03-02 09:44:33 End queue run: pid=pppp -qf
+1999-03-02 09:44:33 10HmbJ-0005vi-00 removed by CALLER
+1999-03-02 09:44:33 10HmbJ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbK-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmbK-0005vi-00 == defer@test.ex R=alias defer (-1): This address has been forced to defer.
+1999-03-02 09:44:33 Start queue run: pid=pppp -qf
+1999-03-02 09:44:33 10HmbK-0005vi-00 == defer@test.ex R=alias defer (-1): This address has been forced to defer.
+1999-03-02 09:44:33 End queue run: pid=pppp -qf
diff --git a/test/scripts/0000-Basic/0098 b/test/scripts/0000-Basic/0098
index 18f348718..08a981f09 100644
--- a/test/scripts/0000-Basic/0098
+++ b/test/scripts/0000-Basic/0098
@@ -38,4 +38,24 @@ Testing
****
exim -Tqt 20s/ -odi -qf
****
+# Remove the previous message
+exim -Mrm $msg1
+****
+# Check no warnings for Precedence: list (in default config)
+exim -odi defer@test.ex
+Precedence: list
+Test message
+****
+exim -DDEFAULTDWC -Tqt 20s/ -odi -qf
+****
+# Remove the previous message
+exim -Mrm $msg1
+****
+# Check no warnings for Auto-Submitted: auto-generated (in default config)
+exim -odi defer@test.ex
+Auto-Submitted: auto-generated
+Test message
+****
+exim -DDEFAULTDWC -Tqt 20s/ -odi -qf
+****
no_msglog_check
diff --git a/test/stdout/0098 b/test/stdout/0098
index 59dcdba55..62e83a061 100644
--- a/test/stdout/0098
+++ b/test/stdout/0098
@@ -2,3 +2,5 @@ Message 10HmaX-0005vi-00 has been removed
Message 10HmaZ-0005vi-00 has been removed
Message 10HmbB-0005vi-00 has been removed
Message 10HmbD-0005vi-00 has been removed
+Message 10HmbI-0005vi-00 has been removed
+Message 10HmbJ-0005vi-00 has been removed