diff --git a/install/email-configs-one/dovecot.conf b/install/email-configs-one/dovecot.conf index 8341883a6..9ec4b1a1c 100755 --- a/install/email-configs-one/dovecot.conf +++ b/install/email-configs-one/dovecot.conf @@ -68,4 +68,17 @@ plugin { zlib_save = gz zlib_save_level = 6 +} + +service stats { + unix_listener stats-reader { + user = vmail + group = vmail + mode = 0660 + } + unix_listener stats-writer { + user = vmail + group = vmail + mode = 0660 + } } \ No newline at end of file diff --git a/install/email-configs/dovecot.conf b/install/email-configs/dovecot.conf index b71bc85eb..a7694b6ed 100755 --- a/install/email-configs/dovecot.conf +++ b/install/email-configs/dovecot.conf @@ -69,4 +69,17 @@ plugin { zlib_save = gz zlib_save_level = 6 +} + +service stats { + unix_listener stats-reader { + user = vmail + group = vmail + mode = 0660 + } + unix_listener stats-writer { + user = vmail + group = vmail + mode = 0660 + } } \ No newline at end of file diff --git a/plogical/processUtilities.py b/plogical/processUtilities.py index 8ae5691ed..7bf29cb21 100755 --- a/plogical/processUtilities.py +++ b/plogical/processUtilities.py @@ -192,7 +192,7 @@ class ProcessUtilities(multi.Thread): else: command = '%s-u %s %s' % (ProcessUtilities.token, user, command) command = command.replace('sudo', '') - #logging.writeToFile(ProcessUtilities.token + command) + #logging.writeToFile(command) sock.sendall(command.encode('utf-8')) data = "" diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 5a29bcd7c..f0208464b 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -1923,6 +1923,32 @@ failovermethod=priority command = "systemctl restart dovecot" Upgrade.executioner(command, 0) + dovecotConf = '/etc/dovecot/dovecot.conf' + + dovecotContent = open(dovecotConf, 'r').read() + + if dovecotContent.find('service stats') == -1: + writeToFile = open(dovecotConf, 'a') + + content = """\nservice stats { + unix_listener stats-reader { + user = vmail + group = vmail + mode = 0660 + } + unix_listener stats-writer { + user = vmail + group = vmail + mode = 0660 + } +}\n""" + + writeToFile.write(content) + writeToFile.close() + + command = 'systemctl restart dovecot' + Upgrade.executioner(command, command, 0) + Upgrade.stdOut("Dovecot upgraded.") except BaseException as msg: