diff --git a/mailServer/mailserverManager.py b/mailServer/mailserverManager.py index 8c7c18a25..61c8e1d5c 100755 --- a/mailServer/mailserverManager.py +++ b/mailServer/mailserverManager.py @@ -586,7 +586,7 @@ class MailServerManager(multi.Thread): json_data = json_data + ',' + json.dumps(dic) json_data = json_data + ']' - final_json = json.dumps({'status': 1, 'fetchStatus': 1,'serverHostname': 'mail.%s' % (selectedDomain), 'mailConfigured': mailConfigured, 'error_message': "None", "data": json_data}) + final_json = json.dumps({'status': 1, 'fetchStatus': 1,'serverHostname': selectedDomain, 'mailConfigured': mailConfigured, 'error_message': "None", "data": json_data}) return HttpResponse(final_json) except BaseException as msg: diff --git a/plogical/virtualHostUtilities.py b/plogical/virtualHostUtilities.py index 7a4f0e997..dfdba7052 100644 --- a/plogical/virtualHostUtilities.py +++ b/plogical/virtualHostUtilities.py @@ -371,6 +371,58 @@ local_name %s { command = 'systemctl restart postfix' ProcessUtilities.executioner(command) + ### even if mail domain creation is not set, we will have to set up auto discover for main domain + + dovecotPath = '/etc/dovecot/dovecot.conf' + + if os.path.exists(dovecotPath): + dovecotContent = open(dovecotPath, 'r').read() + + if dovecotContent.find('/live/%s/' % (virtualHostName)) == -1: + content = """ +local_name %s { + ssl_cert =