-
String cases: local.d/milter_headers.conf:
skip_local = false; use = ['add-headers']; routines { add-headers { headers = { array = ['string1', 'string2'], string = 'string', } } }Result:
Return-Path: <[email protected]> X-Original-To: ikeda Delivered-To: [email protected] Received: by slate.localdomain (Postfix, from userid 1000) id 1B99243216; Fri, 26 Aug 2022 06:57:43 +0000 (UTC) Message-Id: <[email protected]> Date: Fri, 26 Aug 2022 04:01:11 +0000 (UTC) From: ikeda <[email protected]> array: string1 array: string2 string: string -
Hash cases: local.d/milter_headers.conf:
skip_local = false; use = ['add-headers']; routines { add-headers { headers = { string = 'string', hash-0 = {value = 'string', order = 0}, hash-1 = {value = 'string', order = 1}, hash-2 = {value = 'string', order = -1}, hash-3 = {value = 'string', order = nil}, hash-4 = {value = 'string'}, } } }Result:
Return-Path: <[email protected]> X-Original-To: ikeda Delivered-To: [email protected] Received: by slate.localdomain (Postfix, from userid 1000) id 2624743216; Fri, 26 Aug 2022 06:54:59 +0000 (UTC) Message-Id: <[email protected]> Date: Fri, 26 Aug 2022 04:01:11 +0000 (UTC) From: ikeda <[email protected]> hash-2: string string: string hash-0: string hash-4: string hash-1: string hash-3: nil hash-3: string- Broken.
-
Array+hash cases: local.d/milter_headers.conf:
skip_local = false; use = ['add-headers']; routines { add-headers { headers = { array = [ 'string', {value = 'hash-0', order = 0}, {value = 'hash-1', order = 1}, {value = 'hash-2', order = -1}, {value = 'hash-3', order = nil}, {value = 'hash-4'}, ] } } }Result:
Return-Path: <[email protected]> X-Original-To: ikeda Delivered-To: [email protected] array: hash-3 array: hash-0 array: hash-1 Received: by slate.localdomain (Postfix, from userid 1000) id 8560143216; Fri, 26 Aug 2022 06:47:25 +0000 (UTC) array: hash-2 Message-Id: <[email protected]> Date: Fri, 26 Aug 2022 04:01:11 +0000 (UTC) From: ikeda <[email protected]> array: string array: hash-4hash-2withorder = -1looks inserted in wrong position.
Created
August 26, 2022 07:04
-
-
Save ikedas/45400238b193f85a7c324c6cb5300a57 to your computer and use it in GitHub Desktop.
Test on the fix by rspamd/rspamd@4dd9c48
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment