From 6f5ea6f85dfc43c9e17756c78e33f0caa0ab7307 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Thu, 30 May 2024 19:01:23 +0200 Subject: [PATCH] Use add-relay-rule on restoration and clone action --- imageroot/actions/configure-module/90add-relay-rule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imageroot/actions/configure-module/90add-relay-rule b/imageroot/actions/configure-module/90add-relay-rule index bc36c9e..3396e84 100755 --- a/imageroot/actions/configure-module/90add-relay-rule +++ b/imageroot/actions/configure-module/90add-relay-rule @@ -27,7 +27,7 @@ ip_address = rdb.hget(f'node/{node_id}/vpn', 'ip_address') if providers: mail_id = providers[0]["module_id"] - if not os.environ.get("MAIL_SERVER"): + if not os.environ.get("MAIL_SERVER") or data.get("restore", False): # first configuration, we add the relay rule response = agent.tasks.run(f"module/{mail_id}", action='add-relay-rule', data={ "rule_type": "always-bcc",