generated from NethServer/ns8-kickstart
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor configure-module action to use 'always-bcc' rule type for re…
…lay and set BCC address using os.environ['MODULE_ID']
- Loading branch information
Showing
3 changed files
with
10 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,6 @@ def get_always_bcc(email): | |
# check if the always_bcc is set to the email | ||
elif response['output']['bcc'] == email: | ||
sys.exit(0) | ||
# check if the always_bcc is previouslys set to piler ([email protected]) | ||
elif response['output']['bcc'] == 'archive@'+os.environ.get('TRAEFIK_HOST'): | ||
sys.exit(0) | ||
else: | ||
agent.set_status('validation-failed') | ||
json.dump([{'field':'mail_server','parameter':'mail_server','value': response['output']['bcc'],'error':'always_bcc_is_already_set'}], fp=sys.stdout) | ||
|
@@ -44,5 +41,4 @@ def get_always_bcc(email): | |
|
||
if providers: | ||
# we need to set bcc address for the mail server | ||
get_always_bcc('archive@'+data['host']) | ||
|
||
get_always_bcc('archive@'+os.environ['MODULE_ID']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters