From a213f96e512133d2801ce5298d18e2a9bfa15892 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Sat, 4 Feb 2023 14:09:53 +0500 Subject: [PATCH] possible fix of https://community.cyberpanel.net/t/snappymail-does-not-show-email-folders-for-subdomain-domain-com-websites/40026 --- plogical/upgrade.py | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index af0fd6861..a090836da 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -569,6 +569,26 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout'; # WriteToFile.write(lines) # WriteToFile.close() + ### now download and install actual plugin + + command = f'mkdir /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' + Upgrade.executioner(command, 'verify certificate', 0) + + command = f'chmod 700 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' + Upgrade.executioner(command, 'verify certificate', 0) + + command = f'chown lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' + Upgrade.executioner(command, 'verify certificate', 0) + + 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' + Upgrade.executioner(command, 'verify certificate', 0) + + command = f'chmod 644 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php' + Upgrade.executioner(command, 'verify certificate', 0) + + command = f'chown lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php' + Upgrade.executioner(command, 'verify certificate', 0) + ### Enable plugins and enable mailbox creation plugin labsDataLines = open(labsPath, 'r').readlines() @@ -609,23 +629,6 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout'; command = f'chmod 600 {PluginsFilePath}' Upgrade.executioner(command, 'verify certificate', 0) - ### now download and install actual plugin - - command = f'mkdir /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' - Upgrade.executioner(command, 'verify certificate', 0) - - command = f'chmod 700 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect' - Upgrade.executioner(command, 'verify certificate', 0) - - 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' - Upgrade.executioner(command, 'verify certificate', 0) - - command = f'chmod 644 /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php' - Upgrade.executioner(command, 'verify certificate', 0) - - command = f'chown lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/plugins/mailbox-detect/index.php' - Upgrade.executioner(command, 'verify certificate', 0) - os.chdir(cwd)