Skip to content

Commit

Permalink
Add configure-module script to bind user domain in imageroot/actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Apr 29, 2024
1 parent aeab63e commit ac2b49f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions imageroot/actions/configure-module/30Bind_user_domain
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3

#
# Copyright (C) 2024 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

import agent
import os

rdb = agent.redis_connect()

providers = agent.list_service_providers(rdb, 'imap', 'tcp', {
'module_uuid': os.environ['MAIL_SERVER']
})

if providers:
user_domain = providers[0]['user_domain']
agent.bind_user_domains([user_domain])

0 comments on commit ac2b49f

Please sign in to comment.