Skip to content

Commit

Permalink
Refactor configure-module action to use 'bcc' field instead of 'bcc_a…
Browse files Browse the repository at this point in the history
…rchive' for setting the BCC address
  • Loading branch information
stephdl committed Apr 25, 2024
1 parent d3a56ed commit 4469f88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions imageroot/actions/configure-module/90add-relay-rule
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion imageroot/actions/destroy-module/20destroy
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
})

0 comments on commit 4469f88

Please sign in to comment.