From c6baa06e48625032a21341bbce1c192cc0ccaa26 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@open-xchange.com>
Date: Fri, 1 Jul 2022 16:49:59 +0200
Subject: [PATCH] lib-sieve: tst-address -  Allow using X-Original-From header
 for the address test.

---
 src/lib-sieve/tst-address.c | 2 +-
 tests/test-address.svtest   | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib-sieve/tst-address.c b/src/lib-sieve/tst-address.c
index bb33094ee..9201b0069 100644
--- a/src/lib-sieve/tst-address.c
+++ b/src/lib-sieve/tst-address.c
@@ -121,7 +121,7 @@ static const char * const _allowed_headers[] = {
 	"x-report-abuse-to",
 
 	/* Undocumented */
-	"x-beenthere", "x-original-to",
+	"x-beenthere", "x-original-from", "x-original-to",
 
 	NULL
 };
diff --git a/tests/test-address.svtest b/tests/test-address.svtest
index 25f5d499f..3f7012fe4 100644
--- a/tests/test-address.svtest
+++ b/tests/test-address.svtest
@@ -278,6 +278,7 @@ Abuse-Reports-To: tttt@friep.frop
 X-Complaints-To: uuuu@friep.frop
 X-Report-Abuse-To: vvvv@friep.frop
 X-BeenThere: wwww@friep.frop
+X-Original-From: xxxx@friep.frop
 X-Original-To: yyyy@friep.frop
 Subject: Berichtje:
 
@@ -413,7 +414,11 @@ test "Address headers" {
 	if not address "x-beenthere" "wwww@friep.frop" {
 		test_fail "x-beenthere header not recognized";
 	}
-	
+
+	if not address "x-original-from" "xxxx@friep.frop" {
+		test_fail "x-original-from header not recognized";
+	}
+
 	if not address "x-original-to" "yyyy@friep.frop" {
 		test_fail "x-original-to header not recognized";
 	}
-- 
GitLab