From 05f6b77520788d68f04258bac4f33fee3767671a Mon Sep 17 00:00:00 2001
From: the-djmaze <>
Date: Tue, 19 Jul 2022 12:35:06 +0200
Subject: [PATCH] v2.17.0
---
.../files/usr/local/include/application.ini | 3 +--
README.md | 14 +++++------
integrations/cloudron/DESCRIPTION.md | 2 +-
integrations/cloudron/Dockerfile | 2 +-
integrations/nextcloud/snappymail/VERSION | 2 +-
.../nextcloud/snappymail/appinfo/info.xml | 2 +-
integrations/virtualmin/snappymail.pl | 2 +-
package.json | 2 +-
.../MailSo/Imap/Commands/Folders.php | 1 +
.../app/libraries/MailSo/Mail/MailClient.php | 25 +++++++++++--------
10 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/.docker/release/files/usr/local/include/application.ini b/.docker/release/files/usr/local/include/application.ini
index 9f0a6b09e..a235178f5 100644
--- a/.docker/release/files/usr/local/include/application.ini
+++ b/.docker/release/files/usr/local/include/application.ini
@@ -241,7 +241,6 @@ http_expires = 3600
server_uids = On
[labs]
-allow_prefetch = Off
cache_system_data = On
date_from_headers = On
autocreate_system_folders = Off
@@ -305,5 +304,5 @@ dev_email = ""
dev_password = ""
[version]
-current = "2.16.3"
+current = "2.17.0"
saved = "Fri, 04 Mar 2022 08:55:26 +0000"
diff --git a/README.md b/README.md
index 75341a93d..fc47ef358 100644
--- a/README.md
+++ b/README.md
@@ -141,24 +141,24 @@ RainLoop 1.15 vs SnappyMail
|js/* |RainLoop |Snappy |
|--------------- |--------: |--------: |
|admin.js |2.158.025 | 80.521 |
-|app.js |4.215.733 | 405.835 |
+|app.js |4.215.733 | 404.700 |
|boot.js | 672.433 | 2.050 |
|libs.js | 647.679 | 197.160 |
|sieve.js | 0 | 86.362 |
|polyfills.js | 325.908 | 0 |
|serviceworker.js | 0 | 285 |
-|TOTAL |8.019.778 | 772.213 |
+|TOTAL |8.019.778 | 771.078 |
|js/min/* |RainLoop |Snappy |RL gzip |SM gzip |RL brotli |SM brotli |
|--------------- |--------: |--------: |------: |------: |--------: |--------: |
|admin.min.js | 255.514 | 40.289 | 73.899 | 13.383 | 60.674 | 11.971 |
-|app.min.js | 516.000 | 192.189 |140.430 | 62.006 |110.657 | 53.281 |
+|app.min.js | 516.000 | 191.607 |140.430 | 62.036 |110.657 | 53.258 |
|boot.min.js | 66.456 | 1.252 | 22.553 | 778 | 20.043 | 628 |
|libs.min.js | 574.626 | 95.110 |177.280 | 35.149 |151.855 | 31.461 |
|sieve.min.js | 0 | 42.091 | 0 | 10.543 | 0 | 9.511 |
|polyfills.min.js | 32.608 | 0 | 11.315 | 0 | 10.072 | 0 |
-|TOTAL user |1.189.690 | 288.551 |351.061 | 97.933 |292.627 | 85.370 |
-|TOTAL user+sieve |1.189.690 | 330.642 |351.061 |108.476 |292.627 | 94.881 |
+|TOTAL user |1.189.690 | 287.969 |351.061 | 97.963 |292.627 | 85.347 |
+|TOTAL user+sieve |1.189.690 | 330.060 |351.061 |108.506 |292.627 | 94.858 |
|TOTAL admin | 929.204 | 136.651 |285.047 | 49.310 |242.644 | 44.060 |
For a user its around 70% smaller and faster than traditional RainLoop.
@@ -187,8 +187,8 @@ For a user its around 70% smaller and faster than traditional RainLoop.
|css/* |RainLoop |Snappy |RL gzip |SM gzip |SM brotli |
|------------ |-------: |------: |------: |------: |--------: |
-|app.css | 340.334 | 80.979 | 46.959 | 16.774 | 14.439 |
-|app.min.css | 274.791 | 65.092 | 39.618 | 14.841 | 13.085 |
+|app.css | 340.334 | 82.180 | 46.959 | 16.944 | 14.591 |
+|app.min.css | 274.791 | 66.070 | 39.618 | 15.014 | 13.212 |
|boot.css | | 1.326 | | 664 | 545 |
|boot.min.css | | 1.071 | | 590 | 474 |
|admin.css | | 29.828 | | 6.777 | 5.875 |
diff --git a/integrations/cloudron/DESCRIPTION.md b/integrations/cloudron/DESCRIPTION.md
index f59fbbfb9..d34828c42 100644
--- a/integrations/cloudron/DESCRIPTION.md
+++ b/integrations/cloudron/DESCRIPTION.md
@@ -1,4 +1,4 @@
-This app packages SnappyMail 2.16.3.
+This app packages SnappyMail 2.17.0.
SnappyMail is a simple, modern, lightweight & fast web-based email client.
diff --git a/integrations/cloudron/Dockerfile b/integrations/cloudron/Dockerfile
index 0e65debbf..e9aa443ef 100644
--- a/integrations/cloudron/Dockerfile
+++ b/integrations/cloudron/Dockerfile
@@ -4,7 +4,7 @@ RUN mkdir -p /app/code
WORKDIR /app/code
# If you change the extraction below, be sure to test on scaleway
-VERSION=2.16.3
+VERSION=2.17.0
RUN wget https://github.com/the-djmaze/snappymail/releases/download/v${VERSION}/snappymail-${VERSION}.zip -O /tmp/snappymail.zip && \
unzip /tmp/snappymail.zip -d /app/code && \
rm /tmp/snappymail.zip && \
diff --git a/integrations/nextcloud/snappymail/VERSION b/integrations/nextcloud/snappymail/VERSION
index 38275d2df..6618ab545 100755
--- a/integrations/nextcloud/snappymail/VERSION
+++ b/integrations/nextcloud/snappymail/VERSION
@@ -1 +1 @@
-2.16.3
\ No newline at end of file
+2.17.0
\ No newline at end of file
diff --git a/integrations/nextcloud/snappymail/appinfo/info.xml b/integrations/nextcloud/snappymail/appinfo/info.xml
index b6369e00a..bc056e059 100644
--- a/integrations/nextcloud/snappymail/appinfo/info.xml
+++ b/integrations/nextcloud/snappymail/appinfo/info.xml
@@ -4,7 +4,7 @@
SnappyMail
SnappyMail Webmail
Simple, modern and fast web-based email client. After enabling in Nextcloud, go to Nextcloud admin panel, "Additionnal settings" and you will see a "SnappyMail webmail" section. There, click on the link to go to the SnappyMail admin panel. The default user/password is admin/12345. This version is based on SnappyMail 2.6.0 (2021-07).
- 2.16.3
+ 2.17.0
agpl
SnappyMail Team, Nextgen-Networks, Tab Fitts, Nathan Kinkade, Pierre-Alain Bandinelli
SnappyMail
diff --git a/integrations/virtualmin/snappymail.pl b/integrations/virtualmin/snappymail.pl
index be2cf24bd..0c12e6c99 100644
--- a/integrations/virtualmin/snappymail.pl
+++ b/integrations/virtualmin/snappymail.pl
@@ -20,7 +20,7 @@ return "SnappyMail Webmail is a browser-based multilingual IMAP client with an a
# script_snappymail_versions()
sub script_snappymail_versions
{
-return ( "2.16.3" );
+return ( "2.17.0" );
}
sub script_snappymail_version_desc
diff --git a/package.json b/package.json
index 2ea4e0581..14c4fe864 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"title": "SnappyMail",
"description": "Simple, modern & fast web-based email client",
"private": true,
- "version": "2.16.3",
+ "version": "2.17.0",
"homepage": "https://snappymail.eu",
"author": {
"name": "DJ Maze",
diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Folders.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Folders.php
index 7b988da92..642e5f52a 100644
--- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Folders.php
+++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Folders.php
@@ -162,6 +162,7 @@ trait Folders
if ($bReselect) {
$this->selectOrExamineFolder($sFolderName, $bWritable, false);
+// $this->oCurrentFolderInfo->UNSEEN = $oInfo->UNSEEN;
}
return $oInfo;
diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php
index 4916729f3..b7a3491ac 100644
--- a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php
+++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php
@@ -428,20 +428,19 @@ class MailClient
protected function initFolderValues(string $sFolderName) : array
{
- $aFolderStatus = $this->oImapClient->FolderStatus($sFolderName)->getStatusItems();
-
+ $oFolderStatus = $this->oImapClient->FolderStatus($sFolderName);
return [
- \max(0, $aFolderStatus[FolderResponseStatus::MESSAGES] ?: 0),
+ \max(0, $oFolderStatus->MESSAGES ?: 0),
- \max(0, $aFolderStatus[FolderResponseStatus::UNSEEN] ?: 0),
+ \max(0, $oFolderStatus->UNSEEN ?: 0),
- \max(0, $aFolderStatus[FolderResponseStatus::UIDNEXT] ?: 0),
+ \max(0, $oFolderStatus->UIDNEXT ?: 0),
- \max(0, $aFolderStatus[FolderResponseStatus::HIGHESTMODSEQ] ?: 0),
+ \max(0, $oFolderStatus->HIGHESTMODSEQ ?: 0),
- $aFolderStatus[FolderResponseStatus::APPENDLIMIT] ?: $this->oImapClient->AppendLimit(),
+ $oFolderStatus->APPENDLIMIT ?: $this->oImapClient->AppendLimit(),
- $aFolderStatus[FolderResponseStatus::MAILBOXID] ?: ''
+ $oFolderStatus->MAILBOXID ?: ''
];
}
@@ -521,8 +520,13 @@ class MailClient
public function FolderInformation(string $sFolderName, int $iPrevUidNext = 0, SequenceSet $oRange = null) : array
{
list($iCount, $iUnseenCount, $iUidNext, $iHighestModSeq, $iAppendLimit, $sMailboxId) = $this->initFolderValues($sFolderName);
-// $oInfo = $this->oImapClient->FolderSelect($sFolderName);
-
+/*
+ // Don't use FolderExamine, else PERMANENTFLAGS is empty in Dovecot
+ $oInfo = $this->oImapClient->FolderSelect($sFolderName);
+ $oInfo->UNSEEN = $iUnseenCount;
+ $oInfo->HIGHESTMODSEQ = $iHighestModSeq;
+ $oInfo->Hash = $this->GenerateFolderHash($oInfo->FolderName, $oInfo->MESSAGES, $oInfo->UIDNEXT, $oInfo->HIGHESTMODSEQ);
+*/
$aFlags = array();
if ($oRange && \count($oRange)) {
$oInfo = $this->oImapClient->FolderExamine($sFolderName);
@@ -837,6 +841,7 @@ class MailClient
$oInfo = $this->oImapClient->FolderSelect($oParams->sFolderName);
$oInfo->UNSEEN = $iMessageUnseenCount;
$oInfo->HIGHESTMODSEQ = $iHighestModSeq;
+// $oInfo->Hash = $this->GenerateFolderHash($oInfo->FolderName, $oInfo->MESSAGES, $oInfo->UIDNEXT, $oInfo->HIGHESTMODSEQ);
$oMessageCollection->FolderInfo = $oInfo;
$aUids = array();