bug fix: dovecot

This commit is contained in:
Usman Nasir
2020-01-27 12:19:27 +05:00
parent f36c848a4b
commit 157ae0dab3
4 changed files with 53 additions and 1 deletions

View File

@@ -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
}
}

View File

@@ -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
}
}

View File

@@ -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 = ""

View File

@@ -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: