Testsuite: testcase for misordered ARC headers. Bug 2493
authorJeremy Harris <jgh146exb@wizmail.org>
Thu, 12 Dec 2019 19:17:47 +0000 (19:17 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Thu, 12 Dec 2019 19:23:04 +0000 (19:23 +0000)
12 files changed:
test/confs/4562 [deleted file]
test/confs/4563 [new symlink]
test/confs/4565 [new file with mode: 0644]
test/log/4562 [deleted file]
test/log/4563 [new file with mode: 0644]
test/log/4565 [new file with mode: 0644]
test/mail/4562.a [deleted file]
test/mail/4563.a [new file with mode: 0644]
test/mail/4565.a [new file with mode: 0644]
test/scripts/4560-ARC/4562 [deleted file]
test/scripts/4560-ARC/4563 [new file with mode: 0644]
test/scripts/4560-ARC/4565 [new file with mode: 0644]

diff --git a/test/confs/4562 b/test/confs/4562
deleted file mode 100644 (file)
index 4360554..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# Exim test configuration 4562
-
-SERVER=
-VALUE=
-INSERT=
-
-.include DIR/aux-var/std_conf_prefix
-
-primary_hostname = test.ex
-
-# ----- Main settings -----
-
-acl_smtp_rcpt = accept
-acl_smtp_data = check_data
-
-log_selector = +received_recipients +dkim_verbose
-queue_only
-
-# ----- ACL -----
-begin acl
-
-check_data:
-  warn !verify =       arc VALUE
-       INSERT
-
-  warn logwrite =      arc_state:      <$arc_state>
-       logwrite =      arc_oldest_pass <$arc_oldest_pass>
-       logwrite =      domains:        <$arc_domains>
-       condition =     ${if def:arc_state_reason}
-       logwrite =      reason:         <$arc_state_reason>
-
-.ifdef OPTION
-  accept
-.else
-  accept add_header =  :at_start:${authresults {$primary_hostname}}
-.endif
-  
-# ----- Routers -----
-
-begin routers
-
-d1:
-  driver = accept
-  local_parts = ^a
-  transport = tfile
-
-redir:
-  driver =     redirect
-  data =       ${substr_1:$local_part}@$domain
-  redirect_router = fwd
-
-fwd:
-  driver =     accept
-  transport =  tsmtp
-
-# ----- Transports -----
-
-begin transports
-
-tfile:
-  driver =     appendfile
-  file =       DIR/test-mail/$local_part
-  user =       CALLER
-
-tsmtp:
-  driver =     smtp
-  hosts =      127.0.0.1
-  port =       PORT_D
-  allow_localhost
-  dkim_domain =        $primary_hostname
-  dkim_selector = sel
-  dkim_private_key = DIR/aux-fixed/dkim/dkim.private
-.ifndef OPTION
-  arc_sign =   $primary_hostname : sel : DIR/aux-fixed/dkim/dkim.private
-.endif
-
-# End
diff --git a/test/confs/4563 b/test/confs/4563
new file mode 120000 (symlink)
index 0000000..359a76c
--- /dev/null
@@ -0,0 +1 @@
+4560
\ No newline at end of file
diff --git a/test/confs/4565 b/test/confs/4565
new file mode 100644 (file)
index 0000000..4e90606
--- /dev/null
@@ -0,0 +1,77 @@
+# Exim test configuration 4565
+
+SERVER=
+VALUE=
+INSERT=
+
+.include DIR/aux-var/std_conf_prefix
+
+primary_hostname = test.ex
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+acl_smtp_data = check_data
+
+log_selector = +received_recipients +dkim_verbose
+queue_only
+
+# ----- ACL -----
+begin acl
+
+check_data:
+  warn !verify =       arc VALUE
+       INSERT
+
+  warn logwrite =      arc_state:      <$arc_state>
+       logwrite =      arc_oldest_pass <$arc_oldest_pass>
+       logwrite =      domains:        <$arc_domains>
+       condition =     ${if def:arc_state_reason}
+       logwrite =      reason:         <$arc_state_reason>
+
+.ifdef OPTION
+  accept
+.else
+  accept add_header =  :at_start:${authresults {$primary_hostname}}
+.endif
+  
+# ----- Routers -----
+
+begin routers
+
+d1:
+  driver = accept
+  local_parts = ^a
+  transport = tfile
+
+redir:
+  driver =     redirect
+  data =       ${substr_1:$local_part}@$domain
+  redirect_router = fwd
+
+fwd:
+  driver =     accept
+  transport =  tsmtp
+
+# ----- Transports -----
+
+begin transports
+
+tfile:
+  driver =     appendfile
+  file =       DIR/test-mail/$local_part
+  user =       CALLER
+
+tsmtp:
+  driver =     smtp
+  hosts =      127.0.0.1
+  port =       PORT_D
+  allow_localhost
+  dkim_domain =        $primary_hostname
+  dkim_selector = sel
+  dkim_private_key = DIR/aux-fixed/dkim/dkim.private
+.ifndef OPTION
+  arc_sign =   $primary_hostname : sel : DIR/aux-fixed/dkim/dkim.private
+.endif
+
+# End
diff --git a/test/log/4562 b/test/log/4562
deleted file mode 100644 (file)
index 1538e6a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-******** SERVER ********
-1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D
-1999-03-02 09:44:33 10HmaX-0005vi-00 DKIM: d=example.com s=sel c=relaxed/relaxed a=rsa-sha256 b=2048 [verification failed - body hash mismatch (body probably modified in transit)]
-1999-03-02 09:44:33 10HmaX-0005vi-00 arc_state:      <none>
-1999-03-02 09:44:33 10HmaX-0005vi-00 arc_oldest_pass <0>
-1999-03-02 09:44:33 10HmaX-0005vi-00 domains:        <>
-1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=smtp S=sss id=qwerty1234@disco-zombie.net for za@test.ex
-1999-03-02 09:44:33 Start queue run: pid=pppp
-1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=test.ex s=sel c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
-1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=example.com s=sel c=relaxed/relaxed a=rsa-sha256 b=2048 [verification failed - body hash mismatch (body probably modified in transit)]
-1999-03-02 09:44:33 10HmaY-0005vi-00 arc_state:      <pass>
-1999-03-02 09:44:33 10HmaY-0005vi-00 arc_oldest_pass <1>
-1999-03-02 09:44:33 10HmaY-0005vi-00 domains:        <test.ex>
-1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@bloggs.com H=localhost (test.ex) [127.0.0.1] P=esmtp S=sss DKIM=test.ex ARC id=qwerty1234@disco-zombie.net for a@test.ex
-1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex <za@test.ex> R=fwd T=tsmtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmaY-0005vi-00"
-1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
-1999-03-02 09:44:33 End queue run: pid=pppp
-1999-03-02 09:44:33 Start queue run: pid=pppp
-1999-03-02 09:44:33 10HmaY-0005vi-00 => a <a@test.ex> R=d1 T=tfile
-1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
-1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4563 b/test/log/4563
new file mode 100644 (file)
index 0000000..930844b
--- /dev/null
@@ -0,0 +1,15 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D
+1999-03-02 09:44:33 10HmaX-0005vi-00 arc_state:      <fail>
+1999-03-02 09:44:33 10HmaX-0005vi-00 domains:        <test.ex:test.ex>
+1999-03-02 09:44:33 10HmaX-0005vi-00 arc_oldest_pass <0>
+1999-03-02 09:44:33 10HmaX-0005vi-00 reason:         <AMS sig nonverify>
+1999-03-02 09:44:33 10HmaX-0005vi-00 lh_A-R:         < test.ex; arc=none>
+1999-03-02 09:44:33 10HmaX-0005vi-00 lh-ams:         < i=2; test.ex; arc=none: i=1; test.ex; arc=none>
+1999-03-02 09:44:33 10HmaX-0005vi-00 oldest-p-ams:   <>
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=smtp S=sss id=qwerty1234@disco-zombie.net for a@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => a <a@test.ex> R=d1 T=tfile
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4565 b/test/log/4565
new file mode 100644 (file)
index 0000000..1538e6a
--- /dev/null
@@ -0,0 +1,22 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D
+1999-03-02 09:44:33 10HmaX-0005vi-00 DKIM: d=example.com s=sel c=relaxed/relaxed a=rsa-sha256 b=2048 [verification failed - body hash mismatch (body probably modified in transit)]
+1999-03-02 09:44:33 10HmaX-0005vi-00 arc_state:      <none>
+1999-03-02 09:44:33 10HmaX-0005vi-00 arc_oldest_pass <0>
+1999-03-02 09:44:33 10HmaX-0005vi-00 domains:        <>
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=smtp S=sss id=qwerty1234@disco-zombie.net for za@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=test.ex s=sel c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
+1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=example.com s=sel c=relaxed/relaxed a=rsa-sha256 b=2048 [verification failed - body hash mismatch (body probably modified in transit)]
+1999-03-02 09:44:33 10HmaY-0005vi-00 arc_state:      <pass>
+1999-03-02 09:44:33 10HmaY-0005vi-00 arc_oldest_pass <1>
+1999-03-02 09:44:33 10HmaY-0005vi-00 domains:        <test.ex>
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@bloggs.com H=localhost (test.ex) [127.0.0.1] P=esmtp S=sss DKIM=test.ex ARC id=qwerty1234@disco-zombie.net for a@test.ex
+1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex <za@test.ex> R=fwd T=tsmtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => a <a@test.ex> R=d1 T=tfile
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/mail/4562.a b/test/mail/4562.a
deleted file mode 100644 (file)
index 7346a7c..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From CALLER@bloggs.com Tue Mar 02 09:44:33 1999
-Authentication-Results: test.ex;
-       iprev=pass (localhost) smtp.remote-ip=127.0.0.1;
-       dkim=pass header.d=test.ex header.s=sel header.a=rsa-sha256;
-       dkim=fail (body hash mismatch; body probably modified in transit)
-                header.d=example.com header.s=sel header.a=rsa-sha256;
-       arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.remote-ip=127.0.0.1
-Received: from localhost ([127.0.0.1] helo=test.ex)
-       by test.ex with esmtp (Exim x.yz)
-       (envelope-from <CALLER@bloggs.com>)
-       id 10HmaY-0005vi-00
-       for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
-ARC-Seal: i=1; cv=none; a=rsa-sha256; d=test.ex; s=sel;
-        b=1J94ImExSjtnwHY/c/aN3BX/xlnQfi6CPdGQvbeSdsbCCEtOqK9547tA54tYFh8beeVECAR0xu
-         9fCSAjZ/0WM7mrxKNMbWkoHNoejUhNkcxJOtFmiS/0JKPQGk8HTE7FHLbogUQvEJoVBBnqo6xW
-         nFtzlI3JfLnWvB3FQ316xLs=;
-ARC-Authentication-Results: i=1; test.ex;
-       dkim=fail (body hash mismatch; body probably modified in transit)
-                header.d=example.com header.s=sel header.a=rsa-sha256;
-       arc=none
-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=test.ex; s=sel;
-       bh=3UbbJTudPxmejzh7U1Zg33U3QT+16kfV2eOTvMeiEis=;
-       h=Subject:Message-ID:Date:To:From:DKIM-Signature:DKIM-Signature;
-       b=cOGacpDRcKUs8d6NK5vfwKQ9OJ3QbHRjxkBgZr2goYGe4M+9/tWjxgbwrpFGkgqqqVE1iHxp73
-         XiycAmipwr0J+Hu1PjkqIXLIY+LsCY+Oq/g1roC2VnphFpfQjaelQQxAIk8RSvmhvIN0WWZG5V
-         UYCQCkQeY+URg26dYoPZRoY=;
-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=test.ex;
-       s=sel; h=Subject:Message-ID:Date:To:From:Sender:Reply-To:Cc:MIME-Version:
-       Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:
-       Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
-       In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
-       List-Post:List-Owner:List-Archive;
-       bh=3UbbJTudPxmejzh7U1Zg33U3QT+16kfV2eOTvMeiEis=; b=kN1wFOnQGZMmJkwnBgDwrqe3xg
-       +YlqMcd3tS2KBPcnA71tzAKBiX+QMrcIkp9PgEiJkHOCbM44SEoW/GT/aN0FqeGUuIoZ22nNc9wJq
-       9u4dqiZV6L0EFx0+BmAcKN/Ban7hsQASjP8USIMomgaG9ymJhrkOoDcQhkQTBriYt91c=;
-Authentication-Results: test.ex;
-       dkim=fail (body hash mismatch; body probably modified in transit)
-                header.d=example.com header.s=sel header.a=rsa-sha256;
-       arc=none
-Received: from [127.0.0.1] (helo=xxx)
-       by test.ex with smtp (Exim x.yz)
-       (envelope-from <CALLER@bloggs.com>)
-       id 10HmaX-0005vi-00
-       for za@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
-       d=example.com; s=sel; h=List-Archive;
-        bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=uslVEq1LzHDR2ACoSTiErsGhe
-       GcuqL5no/4XYjsEJOIXkKFp4FFTj7QTcblHqyqsjgd5Dgs7zuFV4U3lwU9jSZtqJNQI+BtYZ5dS48
-       sjr9PbLiguw8rAv5eDXBQKi5XcNCnZlUnWEjl10OXEgJZ9UXdKToWHpSfWEw1nFvOlKAfPBfkznnA
-       EOQXSTJOTanLpr7EZ4Yw5LWE+9BWJfnl6snn6W0mmJl4tbfEXEV1ZzOxdQF1rwjJqmojoCG36Z+v5
-       sWKswl7HgSlKo2GKgxh9zIIhoxg5+7zfmHdKUQ2/6zuR8nqjDAjl3bSdOMgZVM0L6G6EMxQP6Sj6f
-       oEr6ePt9A==;
-From: mrgus@text.ex
-To: bakawolf@yahoo.com
-Date: Tue, 2 Mar 1999 09:44:33 +0000
-Message-ID: <qwerty1234@disco-zombie.net>
-Subject: simple test
-
-This is a simple test.
-
diff --git a/test/mail/4563.a b/test/mail/4563.a
new file mode 100644 (file)
index 0000000..e4082a5
--- /dev/null
@@ -0,0 +1,39 @@
+From CALLER@bloggs.com Tue Mar 02 09:44:33 1999
+Authentication-Results: test.ex;
+       arc=fail (i=2)(AMS sig nonverify) header.s=sel arc.oldest-pass=0 smtp.remote-ip=127.0.0.1
+Received: from [127.0.0.1] (helo=xxx)
+       by test.ex with smtp (Exim x.yz)
+       (envelope-from <CALLER@bloggs.com>)
+       id 10HmaX-0005vi-00
+       for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+ARC-Seal: i=2; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b=
+        xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q
+        YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS
+        CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw=
+ARC-Seal: i=1; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b=
+        xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q
+        YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS
+        CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw=
+ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=test.ex;
+         h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1
+        Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx
+        0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB
+        oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr
+        fu2jTuUfw=
+ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=test.ex;
+         h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1
+        Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx
+        0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB
+        oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr
+        fu2jTuUfw=
+ARC-Authentication-Results: i=2; test.ex; arc=none
+ARC-Authentication-Results: i=1; test.ex; arc=none
+Authentication-Results: test.ex; arc=none
+From: mrgus@text.ex
+To: bakawolf@yahoo.com
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+Message-ID: <qwerty1234@disco-zombie.net>
+Subject: simple test
+
+This is a simple test.
+
diff --git a/test/mail/4565.a b/test/mail/4565.a
new file mode 100644 (file)
index 0000000..7346a7c
--- /dev/null
@@ -0,0 +1,60 @@
+From CALLER@bloggs.com Tue Mar 02 09:44:33 1999
+Authentication-Results: test.ex;
+       iprev=pass (localhost) smtp.remote-ip=127.0.0.1;
+       dkim=pass header.d=test.ex header.s=sel header.a=rsa-sha256;
+       dkim=fail (body hash mismatch; body probably modified in transit)
+                header.d=example.com header.s=sel header.a=rsa-sha256;
+       arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.remote-ip=127.0.0.1
+Received: from localhost ([127.0.0.1] helo=test.ex)
+       by test.ex with esmtp (Exim x.yz)
+       (envelope-from <CALLER@bloggs.com>)
+       id 10HmaY-0005vi-00
+       for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+ARC-Seal: i=1; cv=none; a=rsa-sha256; d=test.ex; s=sel;
+        b=1J94ImExSjtnwHY/c/aN3BX/xlnQfi6CPdGQvbeSdsbCCEtOqK9547tA54tYFh8beeVECAR0xu
+         9fCSAjZ/0WM7mrxKNMbWkoHNoejUhNkcxJOtFmiS/0JKPQGk8HTE7FHLbogUQvEJoVBBnqo6xW
+         nFtzlI3JfLnWvB3FQ316xLs=;
+ARC-Authentication-Results: i=1; test.ex;
+       dkim=fail (body hash mismatch; body probably modified in transit)
+                header.d=example.com header.s=sel header.a=rsa-sha256;
+       arc=none
+ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=test.ex; s=sel;
+       bh=3UbbJTudPxmejzh7U1Zg33U3QT+16kfV2eOTvMeiEis=;
+       h=Subject:Message-ID:Date:To:From:DKIM-Signature:DKIM-Signature;
+       b=cOGacpDRcKUs8d6NK5vfwKQ9OJ3QbHRjxkBgZr2goYGe4M+9/tWjxgbwrpFGkgqqqVE1iHxp73
+         XiycAmipwr0J+Hu1PjkqIXLIY+LsCY+Oq/g1roC2VnphFpfQjaelQQxAIk8RSvmhvIN0WWZG5V
+         UYCQCkQeY+URg26dYoPZRoY=;
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=test.ex;
+       s=sel; h=Subject:Message-ID:Date:To:From:Sender:Reply-To:Cc:MIME-Version:
+       Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:
+       Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
+       In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
+       List-Post:List-Owner:List-Archive;
+       bh=3UbbJTudPxmejzh7U1Zg33U3QT+16kfV2eOTvMeiEis=; b=kN1wFOnQGZMmJkwnBgDwrqe3xg
+       +YlqMcd3tS2KBPcnA71tzAKBiX+QMrcIkp9PgEiJkHOCbM44SEoW/GT/aN0FqeGUuIoZ22nNc9wJq
+       9u4dqiZV6L0EFx0+BmAcKN/Ban7hsQASjP8USIMomgaG9ymJhrkOoDcQhkQTBriYt91c=;
+Authentication-Results: test.ex;
+       dkim=fail (body hash mismatch; body probably modified in transit)
+                header.d=example.com header.s=sel header.a=rsa-sha256;
+       arc=none
+Received: from [127.0.0.1] (helo=xxx)
+       by test.ex with smtp (Exim x.yz)
+       (envelope-from <CALLER@bloggs.com>)
+       id 10HmaX-0005vi-00
+       for za@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
+       d=example.com; s=sel; h=List-Archive;
+        bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=uslVEq1LzHDR2ACoSTiErsGhe
+       GcuqL5no/4XYjsEJOIXkKFp4FFTj7QTcblHqyqsjgd5Dgs7zuFV4U3lwU9jSZtqJNQI+BtYZ5dS48
+       sjr9PbLiguw8rAv5eDXBQKi5XcNCnZlUnWEjl10OXEgJZ9UXdKToWHpSfWEw1nFvOlKAfPBfkznnA
+       EOQXSTJOTanLpr7EZ4Yw5LWE+9BWJfnl6snn6W0mmJl4tbfEXEV1ZzOxdQF1rwjJqmojoCG36Z+v5
+       sWKswl7HgSlKo2GKgxh9zIIhoxg5+7zfmHdKUQ2/6zuR8nqjDAjl3bSdOMgZVM0L6G6EMxQP6Sj6f
+       oEr6ePt9A==;
+From: mrgus@text.ex
+To: bakawolf@yahoo.com
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+Message-ID: <qwerty1234@disco-zombie.net>
+Subject: simple test
+
+This is a simple test.
+
diff --git a/test/scripts/4560-ARC/4562 b/test/scripts/4560-ARC/4562
deleted file mode 100644 (file)
index 3f21e1e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# ARC sign, DKIM header interactions
-#
-exim -DSERVER=server -bd -oX PORT_D
-****
-#
-# Random-ish input message, having a DKIM header
-client 127.0.0.1 PORT_D
-??? 220
-HELO xxx
-??? 250
-MAIL FROM:<CALLER@bloggs.com>
-??? 250
-RCPT TO:<za@test.ex>
-??? 250
-DATA
-??? 354
-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
-       d=example.com; s=sel; h=List-Archive;
-        bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=uslVEq1LzHDR2ACoSTiErsGhe
-       GcuqL5no/4XYjsEJOIXkKFp4FFTj7QTcblHqyqsjgd5Dgs7zuFV4U3lwU9jSZtqJNQI+BtYZ5dS48
-       sjr9PbLiguw8rAv5eDXBQKi5XcNCnZlUnWEjl10OXEgJZ9UXdKToWHpSfWEw1nFvOlKAfPBfkznnA
-       EOQXSTJOTanLpr7EZ4Yw5LWE+9BWJfnl6snn6W0mmJl4tbfEXEV1ZzOxdQF1rwjJqmojoCG36Z+v5
-       sWKswl7HgSlKo2GKgxh9zIIhoxg5+7zfmHdKUQ2/6zuR8nqjDAjl3bSdOMgZVM0L6G6EMxQP6Sj6f
-       oEr6ePt9A==;
-From: mrgus@text.ex
-To: bakawolf@yahoo.com
-Date: Thu, 19 Nov 2015 17:00:07 -0700
-Message-ID: <qwerty1234@disco-zombie.net>
-Subject: simple test
-
-This is a simple test.
-.
-??? 250
-QUIT
-??? 221
-****
-exim -DSERVER=server -DNOTDAEMON -q
-****
-exim -DSERVER=server -DNOTDAEMON -q
-****
-#
-#
-#
-#
-#
-killdaemon
-no_stdout_check
-no_msglog_check
diff --git a/test/scripts/4560-ARC/4563 b/test/scripts/4560-ARC/4563
new file mode 100644 (file)
index 0000000..5aaf5fa
--- /dev/null
@@ -0,0 +1,69 @@
+# ARC verify, misordered headers
+#
+exim -DSERVER=server -bd -oX PORT_D
+****
+#
+# This should fail signatures (manually added i=2 layer), but not crash.
+# It seems that Outlook.com is _sorting_ headers before transmission;
+# so it goes AS2 AS1 AMS2 AMS1 AAR2 AAR1.  We had a bug in assuming that
+# the end of a list held the AMD we'd just parsed, so when the end
+# hadn't had an AMS yet, we fullowed a null pointer.
+#
+# Mail original in aux-fixed/4560.msg1.txt
+# Sig generated by: perl aux-fixed/dkim/sign_arc.pl < aux-fixed/4560.msg1.txt
+client 127.0.0.1 PORT_D
+??? 220
+HELO xxx
+??? 250
+MAIL FROM:<CALLER@bloggs.com>
+??? 250
+RCPT TO:<a@test.ex>
+??? 250
+DATA
+??? 354
+ARC-Seal: i=2; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b=
+        xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q
+        YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS
+        CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw=
+ARC-Seal: i=1; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b=
+        xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q
+        YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS
+        CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw=
+ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=test.ex;
+         h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1
+        Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx
+        0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB
+        oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr
+        fu2jTuUfw=
+ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=test.ex;
+         h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1
+        Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx
+        0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB
+        oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr
+        fu2jTuUfw=
+ARC-Authentication-Results: i=2; test.ex; arc=none
+ARC-Authentication-Results: i=1; test.ex; arc=none
+Authentication-Results: test.ex; arc=none
+From: mrgus@text.ex
+To: bakawolf@yahoo.com
+Date: Thu, 19 Nov 2015 17:00:07 -0700
+Message-ID: <qwerty1234@disco-zombie.net>
+Subject: simple test
+
+This is a simple test.
+.
+??? 250
+QUIT
+??? 221
+****
+exim -DSERVER=server -DNOTDAEMON -q
+****
+#
+#
+#
+#
+#
+#
+killdaemon
+no_stdout_check
+no_msglog_check
diff --git a/test/scripts/4560-ARC/4565 b/test/scripts/4560-ARC/4565
new file mode 100644 (file)
index 0000000..3f21e1e
--- /dev/null
@@ -0,0 +1,48 @@
+# ARC sign, DKIM header interactions
+#
+exim -DSERVER=server -bd -oX PORT_D
+****
+#
+# Random-ish input message, having a DKIM header
+client 127.0.0.1 PORT_D
+??? 220
+HELO xxx
+??? 250
+MAIL FROM:<CALLER@bloggs.com>
+??? 250
+RCPT TO:<za@test.ex>
+??? 250
+DATA
+??? 354
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
+       d=example.com; s=sel; h=List-Archive;
+        bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=uslVEq1LzHDR2ACoSTiErsGhe
+       GcuqL5no/4XYjsEJOIXkKFp4FFTj7QTcblHqyqsjgd5Dgs7zuFV4U3lwU9jSZtqJNQI+BtYZ5dS48
+       sjr9PbLiguw8rAv5eDXBQKi5XcNCnZlUnWEjl10OXEgJZ9UXdKToWHpSfWEw1nFvOlKAfPBfkznnA
+       EOQXSTJOTanLpr7EZ4Yw5LWE+9BWJfnl6snn6W0mmJl4tbfEXEV1ZzOxdQF1rwjJqmojoCG36Z+v5
+       sWKswl7HgSlKo2GKgxh9zIIhoxg5+7zfmHdKUQ2/6zuR8nqjDAjl3bSdOMgZVM0L6G6EMxQP6Sj6f
+       oEr6ePt9A==;
+From: mrgus@text.ex
+To: bakawolf@yahoo.com
+Date: Thu, 19 Nov 2015 17:00:07 -0700
+Message-ID: <qwerty1234@disco-zombie.net>
+Subject: simple test
+
+This is a simple test.
+.
+??? 250
+QUIT
+??? 221
+****
+exim -DSERVER=server -DNOTDAEMON -q
+****
+exim -DSERVER=server -DNOTDAEMON -q
+****
+#
+#
+#
+#
+#
+killdaemon
+no_stdout_check
+no_msglog_check