Skip to content

Commit

Permalink
api. get the mail_domain of the mail server
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Aug 7, 2023
1 parent e06d27a commit cd19ede
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions imageroot/actions/get-defaults/20readconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ list_of_timezone_widget = []

# we query about all mail server to use it inside the user interface
for key in agent.list_service_providers(rdb,'imap','tcp'):
modules.append({
"name": key['module_id'],
"label": key['mail_hostname'],
"value": key['module_id'],
})
mail = key['module_id']
get_retval = agent.tasks.run(f"module/{mail}",'list-domains')
for kd in get_retval['output']:
if kd['addusers']:
obj = {
"name": key['module_id'],
"label": f"{kd['domain']} ({key['mail_hostname']})",
"value": key['module_id']+','+kd['domain'],
}
modules.append(obj)
# we query about all known timezone and we build a widget
accepted_timezone_list = subprocess.check_output(['podman', 'run', '--rm', os.environ["WEBTOP_WEBAPP_IMAGE"], 'java', '-classpath', '/usr/share/webtop/', 'ListTimeZones'], text=True).splitlines()

Expand Down

0 comments on commit cd19ede

Please sign in to comment.