From b718de7a376f71e17d9ec0e84cdb493dba1c2cc4 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Sat, 4 Feb 2023 14:23:29 +0500 Subject: [PATCH] possible fix of https://community.cyberpanel.net/t/snappymail-does-not-show-email-folders-for-subdomain-domain-com-websites/40026 --- install/install.py | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/install/install.py b/install/install.py index 2841d23d9..43fa70686 100755 --- a/install/install.py +++ b/install/install.py @@ -1342,6 +1342,26 @@ autocreate_system_folders = On command = "sed -i 's|verify_certificate = On|verify_certificate = Off|g' %s" % (labsPath) preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + ### now download and install actual plugin + + command = f'mkdir /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = f'chmod 700 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = f'chmod 700 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = f'wget -O /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php https://raw.githubusercontent.com/the-djmaze/snappymail/master/plugins/mailbox-detect/index.php' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = f'chmod 644 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = f'chown lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + ### Enable plugins and enable mailbox creation plugin labsDataLines = open(labsPath, 'r').readlines() @@ -1381,24 +1401,6 @@ autocreate_system_folders = On preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) - ### now download and install actual plugin - - command = f'mkdir /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' - preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) - - command = f'chmod 700 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' - preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) - - command = f'wget -O /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php https://raw.githubusercontent.com/the-djmaze/snappymail/master/plugins/mailbox-detect/index.php' - preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) - - command = f'chmod 644 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php' - preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) - - command = f'chown lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php' - preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) - - except BaseException as msg: logging.InstallLog.writeToFile('[ERROR] ' + str(msg) + " [downoad_and_install_snappymail]") return 0