From 4469f883739cbcf4f761bfca52e6071dfef43dd6 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 24 Apr 2024 17:01:00 +0200 Subject: [PATCH] Refactor configure-module action to use 'bcc' field instead of 'bcc_archive' for setting the BCC address --- imageroot/actions/configure-module/90add-relay-rule | 8 ++++---- imageroot/actions/destroy-module/20destroy | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/imageroot/actions/configure-module/90add-relay-rule b/imageroot/actions/configure-module/90add-relay-rule index a0f47be..7af4c91 100755 --- a/imageroot/actions/configure-module/90add-relay-rule +++ b/imageroot/actions/configure-module/90add-relay-rule @@ -41,7 +41,7 @@ if providers: agent.assert_exp(response['exit_code'] == 0) # we need to set bcc address for the mail server response = agent.tasks.run(f"module/{mail_id}", action='set-always-bcc', data={ - "bcc_archive": "archive@"+data["host"] + "bcc": "archive@"+data["host"] }) agent.assert_exp(response['exit_code'] == 0) elif os.environ.get("MAIL_SERVER") and data["mail_server"] != os.environ.get("MAIL_SERVER"): @@ -56,7 +56,7 @@ if providers: agent.assert_exp(response['exit_code'] == 0) # we need to remove bcc address for the mail server response = agent.tasks.run(f"module/{mail_id_old}", action='set-always-bcc', data={ - "bcc_archive": "" + "bcc": "" }) agent.assert_exp(response['exit_code'] == 0) # add the new relay rule @@ -72,7 +72,7 @@ if providers: agent.assert_exp(response['exit_code'] == 0) # we need to set bcc address for the mail server response = agent.tasks.run(f"module/{mail_id}", action='set-always-bcc', data={ - "bcc_archive": "archive@"+data["host"] + "bcc": "archive@"+data["host"] }) agent.assert_exp(response['exit_code'] == 0) else: @@ -89,7 +89,7 @@ if providers: agent.assert_exp(response['exit_code'] == 0) # we need to set bcc address for the mail server response = agent.tasks.run(f"module/{mail_id}", action='set-always-bcc', data={ - "bcc_archive": "archive@"+data["host"] + "bcc": "archive@"+data["host"] }) agent.assert_exp(response['exit_code'] == 0) diff --git a/imageroot/actions/destroy-module/20destroy b/imageroot/actions/destroy-module/20destroy index a946c07..358ed4b 100755 --- a/imageroot/actions/destroy-module/20destroy +++ b/imageroot/actions/destroy-module/20destroy @@ -42,5 +42,5 @@ if providers_old: "rule_subject": "archive@"+os.environ.get("TRAEFIK_HOST")}) # we need to set bcc address for the mail server response = agent.tasks.run(f"module/{mail_id_old}", action='set-always-bcc', data={ - "bcc_archive": "" + "bcc": "" })