From 3948b119989568bfe1c9ae219914e1321879844a Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Thu, 24 Nov 2022 13:09:47 +0100 Subject: [PATCH] Support cPanel #697 --- _include.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_include.php b/_include.php index 9f16ed888..be4231442 100644 --- a/_include.php +++ b/_include.php @@ -29,6 +29,15 @@ */ //define('APP_DATA_FOLDER_PATH', dirname(__DIR__) . '/snappymail-data/'); //define('APP_DATA_FOLDER_PATH', '/var/external-snappymail-data-folder/'); +if (isset($_ENV['CPANEL']) && isset($_ENV['TMPDIR'])) { + define('APP_DATA_FOLDER_PATH', $_ENV['TMPDIR'] . '/snappymail/'); +/* + $_ENV['USER'] => + $_ENV['HOME'] => /home/ + $_ENV['TMPDIR'] => /home//tmp + $_ENV['REAL_DBOWNER'] => +*/ +} /** * Additional configuration file name