From fb20fd48fb7a5cf49cab4a7e8934c3d1ae3b2bcb Mon Sep 17 00:00:00 2001 From: Vicente <45470655+amorfo77@users.noreply.github.com> Date: Fri, 21 Apr 2023 14:51:04 +0200 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 8f286669162805f74e128ae20fabb15bb49c538d Merge: 428b9175 3eaa5a62 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Apr 20 16:49:17 2023 +0200 Merge pull request #5195 from mailcow/staging 2023-04b commit 3eaa5a626c04aefbbad65afa0ffa360d64498d59 Merge: 8c79056a 22a0479f Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Apr 20 14:20:03 2023 +0200 Merge pull request #5187 from mailcow/fix-5185 Nextcloud helperscript - redo PHP check commit 8c79056a9454a8cb829e548a510dcce48b4d4c6c Merge: ed076dc2 0e24c3d3 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Apr 20 14:19:19 2023 +0200 Merge pull request #5194 from mailcow/renovate/nextcloud-server-26.x Update dependency nextcloud/server to v26.0.1 commit ed076dc23e8c767320af4a52dd0f8d5126928235 Merge: be2286c1 3510d561 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Apr 20 13:50:57 2023 +0200 Merge pull request #5186 from goodygh/datatables_sorting [Web] Datatables sorting commit be2286c11c743cf07098c30ac06d411de48f7200 Author: FreddleSpl0it Date: Thu Apr 20 13:41:11 2023 +0200 [Dockerapi] fix maildir cleanup for domains commit 0e24c3d3009c74e89eb7b8dd6a7bf6ba81a2926b Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Apr 20 11:36:01 2023 +0000 Update dependency nextcloud/server to v26.0.1 Signed-off-by: milkmaker commit e1d8df658031033232f939a9af43dd8e0f448d02 Author: FreddleSpl0it Date: Thu Apr 20 13:20:51 2023 +0200 [Web] check mailbox before replacing sogo_static_view commit 04a08a7d690db292915afc069a33e0b945403dff Merge: 026b2783 3c0c8aa0 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Apr 20 12:32:42 2023 +0200 Merge pull request #5193 from mailcow/feat/update-sogo [SOGo] update sogo 5.8.2.20230419 commit 3c0c8aa01fe2c8f9088019288ef43fe15f0e4f45 Author: FreddleSpl0it Date: Thu Apr 20 12:07:21 2023 +0200 [SOGo] update sogo 5.8.2.20230419 commit 026b27835768bc6e0dcdd79838e70d3d77d2f6ba Merge: 00ac61f0 4121509c Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Apr 20 11:34:41 2023 +0200 Merge pull request #5183 from mailcow/fix/add-mbox-performance [Web] optimizing mailbox add/edit/delete performance commit 4121509ceb34161ba0c38db899d6c9a287eede94 Author: FreddleSpl0it Date: Thu Apr 20 11:28:59 2023 +0200 [Web] optimizing update_sogo_static_view function commit 00ac61f0a4d811c9fadfa496c3be8bfcb125becb Merge: 4bb0dbb2 6986e775 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Wed Apr 19 17:31:05 2023 +0200 Merge pull request #5184 from bdwebnet/fix/ui-allowed-protocols Added dropdown divider to "allowed protocols" selection on mailbox page commit 4bb0dbb2f7a1bf200062f38a7c8347a066041486 Merge: 13b6df74 20fc9eaf Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Wed Apr 19 17:26:54 2023 +0200 Merge pull request #5191 from shiz0/patch-1 Fix Typo commit 13b6df74afdf32535565e5c9663e277d1f3a73c8 Merge: 5c025bf8 b4a9df76 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Wed Apr 19 17:23:26 2023 +0200 Merge pull request #5174 from bdwebnet/staging Fix error "Deprecated: Using ${var} in strings is deprecated, use {$… commit 5c025bf865e215511adb77364420642fdc1e67cb Author: FreddleSpl0it Date: Wed Apr 19 17:03:04 2023 +0200 [Rspamd] rollback to 3.4 commit 20fc9eaf8491482162483981758bc89177cc7f5a Author: Hannes Happle Date: Sun Apr 16 14:32:44 2023 +0200 Fix Typo commit 22a0479fab14c457b92e9dacaa4c4c1a99fd7623 Author: Peter Date: Thu Apr 13 21:11:40 2023 +0200 Redo the PHP check grep commit 3510d5617d8f82d4dcf785aa71e78d7a8e949d2a Author: goodygh Date: Thu Apr 13 19:18:04 2023 +0200 Fix sorting for active relayhost commit 236d627fbd6eef3e7559d77b4329ee6db6a02bde Author: goodygh Date: Thu Apr 13 19:14:20 2023 +0200 Fix sorting for active transport map commit 99739eada05b3304f727c6ee7148187a3161c301 Author: goodygh Date: Thu Apr 13 19:01:03 2023 +0200 Fix sorting for active fowrardinghoststable commit 7bfef57894df79731f3c3c530a924ebfc3d64516 Author: goodygh Date: Thu Apr 13 18:54:59 2023 +0200 Fix sorting for active and tla on admins commit d9dfe15253ccadfd2df4ba388507ee090d56c035 Author: goodygh Date: Thu Apr 13 18:54:08 2023 +0200 Fix sorting for active and tla on domain-admins commit 3fe8aaa719081abe058e87ac92cfe7ace812b1b9 Author: goodygh Date: Thu Apr 13 18:14:18 2023 +0200 Fix sorting for active tls-policy-map commit 78a8fac6afadbbcaa0672ccb34092b45221ca45f Author: goodygh Date: Thu Apr 13 18:10:21 2023 +0200 Fix sorting for active bcc-map and recipient-map commit 6986e7758ff91a5da1fd83042ddb81d9e0483de2 Author: bd <51322242+bdwebnet@users.noreply.github.com> Date: Thu Apr 13 17:33:28 2023 +0200 Added dropdown divider to "allowed protocols" selection on mailbox page commit b4a9df76b8424c8084104281af91f82637b45e0e Merge: bdb07061 f681fcf1 Author: BD <51322242+bdwebnet@users.noreply.github.com> Date: Thu Apr 13 17:22:13 2023 +0200 Merge branch 'mailcow:staging' into staging commit d9d958356a456018d028c94efdbb0871078ed131 Author: FreddleSpl0it Date: Thu Apr 13 14:35:55 2023 +0200 [Web] optimizing update_sogo_static_view function commit 96f954a4e2b591cb8b9e1a2ad61f055fe50a1989 Author: goodygh Date: Wed Apr 12 00:36:46 2023 +0200 Fix sorting for active syncjobs commit 44585e1c15fe014870b015735cf4cdd707327af0 Author: goodygh Date: Wed Apr 12 00:23:53 2023 +0200 Fix sorting datatable in domain aliases commit c737ff418030431d8562cd87c62034d63fa31ecc Author: goodygh Date: Wed Apr 12 00:21:27 2023 +0200 Fix sorting datatable in aliases commit 025279009dc7db57f938631c72ec3e2287c04964 Author: goodygh Date: Wed Apr 12 00:17:41 2023 +0200 Fix sorting for active resources commit a9dc13d567022361a3a4eb88d6d36273134a8516 Author: goodygh Date: Wed Apr 12 00:15:16 2023 +0200 Fix sorting datatable in mailbox templates commit c3ed01c9b59069eb62b87362f8bcf15d30c83216 Author: goodygh Date: Tue Apr 11 23:49:50 2023 +0200 Fix sorting for active mailboxes commit bd0b4a521ec5be122dc7402975fc304a520d852f Author: goodygh Date: Tue Apr 11 23:42:43 2023 +0200 Fix sorting datatable in domain templates commit 800a0ace71c7b7ad5c0964df538faec7b4df8654 Author: goodygh Date: Tue Apr 11 23:19:56 2023 +0200 Fix sorting for active domain in domains table commit db97869472822237cb1f7d8453a836fbf1719359 Author: goodygh Date: Tue Apr 11 23:18:13 2023 +0200 Datatable hide sorting value commit f681fcf1546b3ecc4e45262659d8f4256dc4d380 Author: milkmaker Date: Tue Apr 11 17:38:39 2023 +0200 [Web] Updated lang.cs-cz.json (#5177) Co-authored-by: utaxiu commit db1b5956fc5e53fa2a9d3441b875277211b215a9 Merge: 469f959e 80dacc01 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Tue Apr 11 06:35:41 2023 +0200 Merge pull request #5133 from FELDSAM-INC/feldsam/bs5-related-fixes BS5 related fixes commit bdb07061ed08aababf0fcb8722bab24dcc640e25 Author: BD <51322242+bdwebnet@users.noreply.github.com> Date: Sat Apr 8 17:29:34 2023 +0200 Fix error "Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /web/sogo-auth.php on line 63" commit 428b917579f9f12236fbf1655edbbf5da300969f Merge: 028ef228 469f959e Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Mon Apr 3 20:15:46 2023 +0200 Merge pull request #5166 from mailcow/staging Hotfix php8.2 nextcloud < 26 commit 469f959e968599dfd5fe8ef9b6f63906b1a49fa1 Merge: 0194c39b b68e189d Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Mon Apr 3 20:10:05 2023 +0200 Merge pull request #5164 from mailcow/fix-5163 Add a check for PHP>=8.2 errormsg commit b68e189d9791de27ed81deaae6abd8462c5d57b4 Author: Peter Date: Mon Apr 3 19:03:13 2023 +0200 Add a check for PHP>=8.2 errormsg commit 028ef22878d1f947bb09f80fe9124fae77dae8f6 Merge: 229303c1 0194c39b Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Mon Apr 3 14:55:55 2023 +0200 Merge pull request #5162 from mailcow/staging Update 2023-04 commit 80dacc015a0e9a4b7d9e5a079ce0796d6de7c059 Author: Kristian Feldsam Date: Mon Mar 20 01:37:49 2023 +0100 [web] fixed mailbox/user settings buttons styling Signed-off-by: Kristian Feldsam [web] fixed mailbox/user settings buttons styling Signed-off-by: Kristian Feldsam commit 0194c39bd5a6c01d6ab11fb371b8a735feb6d908 Merge: ae46a877 f53ca24b Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Fri Mar 31 08:16:57 2023 +0200 Merge pull request #5158 from mailcow/feat/sogo-5.8.2 [SOGo] Update to 5.8.2 commit f53ca24bb08ecd11188b4943d774816859aab0cc Author: FreddleSpl0it Date: Thu Mar 30 16:00:21 2023 +0200 [SOGo] Update to 5.8.2 commit ae46a877d3405db32822d196ef8d075c6f77f199 Merge: fd0205aa 400939fa Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Mar 30 09:05:52 2023 +0200 Merge pull request #5157 from mailcow/feat/netfilter-1.52 [Netfilter] Update to 1.52 commit 400939faf676af0c08940402d62339f173d1f17c Author: FreddleSpl0it Date: Thu Mar 30 08:44:38 2023 +0200 [Netfilter] Update to 1.52 commit fd0205aafd1e154f4b50f0edfae28ae3630a17d7 Merge: e367a8ce 096e2a41 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Mar 30 07:53:33 2023 +0200 Merge pull request #5127 from th-joerger/feature/bantime-increment [Netfilter] Implemented exponentially incrementing bantime commit e367a8ce2419ccb15e021c677b6fe46bb7e79b30 Merge: 3d2483ca 26c34b48 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Thu Mar 30 07:52:00 2023 +0200 Merge pull request #5153 from mailcow/fix/del-vmail-index [Dockerapi] delete vmail_index on maildir cleanup commit 096e2a41e96c981bccf4629d0df4803d5f756481 Author: Thorbjörn Jörger Date: Wed Mar 29 17:09:25 2023 +0200 Push verified options to redis after each check commit e010f0814321cafe65be6c0e932df2fb99a2dd68 Author: Thorbjörn Jörger Date: Wed Mar 29 15:18:11 2023 +0200 verify options after loading them, set defaults if options are missing or invalid commit 3d2483ca379ec053bb83483533e853125fd1fd94 Merge: 535dd235 f77c6541 Author: Patrick Schult <75116288+FreddleSpl0it@users.noreply.github.com> Date: Wed Mar 29 08:13:11 2023 +0200 Merge pull request #5093 from brunoleon/fix_snat Fix SNAT never being added because of exception commit 535dd23509f37b6d3bc82fbc86ecc01847643e11 Merge: 4336a99c 9fd4aa93 Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Tue Mar 28 11:44:59 2023 +0200 Merge pull request #5139 from mailcow/renovate/mailcow-rspamd-1.x Update mailcow/rspamd Docker tag to v1.93 commit 4336a99c6a3dbdb94195915f5949949dd8450f86 Author: DerLinkman Date: Tue Mar 28 11:40:00 2023 +0200 [Nextcloud] Changed default X-Robots Tag behavior commit 4cd5f93cdfbced2627d3445775965a322599fb9b Author: DerLinkman Date: Tue Mar 28 11:22:49 2023 +0200 Fixed broken pipe errors in nextcloud.sh commit 67955779b03ee807a9cd3463159c774e7c89c4db Author: DerLinkman Date: Tue Mar 28 11:17:59 2023 +0200 Fix broken pipe error in reset-admin.sh commit 26c34b484a87e3690451567ab97cf096f4c8f4fd Author: FreddleSpl0it Date: Tue Mar 28 11:01:14 2023 +0200 increase dockerapi image commit 4021613059694356d1a5659c3ba0dc6759b35881 Author: FreddleSpl0it Date: Tue Mar 28 10:59:08 2023 +0200 delete vmail_index when mbox is deleted commit e891bf8411ef1a39c5546a214dd967fa93628719 Merge: f7798d1a 5bc3d935 Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Mon Mar 27 10:40:40 2023 +0200 Merge pull request #5138 from th-joerger/feature/pubsub-exception [netfilter] add pubsub exception commit f7798d1aaccbeef26e59ac5e720358b2e1005f7b Merge: d11f0026 db2fb128 Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Mon Mar 27 10:13:42 2023 +0200 Merge pull request #5099 from mailcow/feat/phpfpm-8.2 Update to PHP 8.2 commit d11f00261b17d14aa0ae8236d9f7a72f233da580 Merge: ce6742c6 22cd12f3 Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Mon Mar 27 10:12:55 2023 +0200 Merge pull request #5142 from mailcow/renovate/nextcloud-server-26.x Update dependency nextcloud/server to v26 commit 22cd12f37b28e2906839b9b6a596c28944e6d902 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Sat Mar 25 18:48:22 2023 +0000 Update dependency nextcloud/server to v26 Signed-off-by: milkmaker commit db2fb12837d95660680fc9eb5e84b22991abd161 Author: Peter Date: Fri Mar 24 16:08:19 2023 +0100 Install sysvsem for Nextcloud 26 commit e808e595eb4864c5beed87b3519195f1be1ad7e4 Author: Peter Date: Fri Mar 24 16:05:35 2023 +0100 Update dependency composer/composer to v2.5.5 commit ce6742c676f885c000519cc6b637d84de8095415 Merge: 62f36035 cf3dc584 Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Thu Mar 23 19:38:23 2023 +0100 Merge pull request #5147 from mailcow/renovate/nextcloud-server-25.x Update dependency nextcloud/server to v25.0.5 commit cf3dc584d0390e05fe449306e516f941e8d8cbcc Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Mar 23 14:18:29 2023 +0000 Update dependency nextcloud/server to v25.0.5 Signed-off-by: milkmaker commit 62f3603588ce9484d8e9faf30884c3e083b49829 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed Mar 22 15:00:55 2023 +0100 Update actions/stale action to v8 (#5143) Signed-off-by: milkmaker Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 9fd4aa93e9136f88a68f97f7ed6d55265f4c9450 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue Mar 21 10:32:21 2023 +0000 Update mailcow/rspamd Docker tag to v1.93 Signed-off-by: milkmaker commit 5bc3d93545f9f0d24773477022cf8fa0315983d5 Author: Thorbjörn Jörger Date: Tue Mar 21 11:12:07 2023 +0100 log exception of redis pubsub subscription commit c28a6b89f030caca6e208790f80751588d1868ce Author: Thorbjörn Jörger Date: Fri Mar 17 18:22:16 2023 +0100 Added ban_time_increment and max_ban_time to UI commit 1233613bea73a22442eb000dd36376f59d7b1ebb Author: Thorbjörn Jörger Date: Fri Mar 17 14:41:37 2023 +0100 implemented handling of max_bantime and ban_time_increment flag commit 0206e0886c70f242c8f8c92fe1b0f30006639f5e Author: Thorbjörn Jörger Date: Fri Mar 17 01:33:40 2023 +0100 implemented exponentially incrementing bantime, removed active_window code that did nothing, cleanly initialized dictionary commit f6d135fbad5407b9dd8b7111fbc0ce20a964ae51 Author: DerLinkman Date: Mon Mar 20 12:05:11 2023 +0100 [Update.sh] Fix docker compose detection + added failover commit f7da314dcf55e5809644da389ac0db156941a3e5 Merge: 0f59d495 e6ce5e88 Author: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Mon Mar 20 11:08:11 2023 +0100 Merge pull request #5134 from mailcow/fix/generate-config-dev [Generate.sh] Fixed broken pipe error message commit e6ce5e88f748f61e2952176391da820db5d4d699 Author: DerLinkman Date: Mon Mar 20 10:57:40 2023 +0100 [Generate.sh] Fixed broken pipe error message commit e5e6418be869a373b4af152e3f5a051a0d616146 Author: Kristian Feldsam Date: Mon Mar 20 01:30:06 2023 +0100 [web] fixed tooltips in ajax loaded alias table Signed-off-by: Kristian Feldsam commit 6507b53bbb44c92b275fdb5649b95fc18ffaab91 Author: Kristian Feldsam Date: Mon Mar 20 01:29:01 2023 +0100 [web] fix mailbox badge height Signed-off-by: Kristian Feldsam commit 0f59d4952be2c001100021080c9253dc9008b427 Author: milkmaker Date: Fri Mar 17 19:13:49 2023 +0100 Translations update from Weblate (#5131) * [Web] Updated lang.da-dk.json Co-authored-by: Victor Pahuus Petersen Co-authored-by: milkmaker * [Web] Updated lang.fr-fr.json Co-authored-by: UpSilot Co-authored-by: milkmaker --------- Co-authored-by: Victor Pahuus Petersen Co-authored-by: UpSilot commit a5b8f1b7f75e135adc7739fc46d67d8298b72413 Author: Peter Date: Tue Feb 28 20:08:33 2023 +0100 Update to PHP 8.2 commit f77c65411ded33a6815e63bb958e6e9b77b0c288 Author: Bruno Léon Date: Mon Feb 27 12:04:32 2023 +0100 Fix SNAT never being added because of exception Some firewall rule object (iptc) do not have a parameter attribute, which results in an exception being triggered, and the mailcow SNAT rule to never be created. Firewall rules that trigger such exception are: - -A POSTROUTING -s 192.168.122.0/24 -d 224.0.0.0/24 -j RETURN This commit just verify attribute presence, and skip the rule properly instead of triggering an exception. --- .../workflows/close_old_issues_and_prs.yml | 2 +- data/Dockerfiles/dockerapi/dockerapi.py | 10 ++- data/Dockerfiles/netfilter/server.py | 57 +++++++++----- data/Dockerfiles/phpfpm/Dockerfile | 8 +- data/assets/nextcloud/nextcloud.conf | 2 +- data/web/api/openapi.yaml | 12 ++- data/web/css/build/011-datatables.css | 4 + data/web/css/site/mailbox.css | 4 +- data/web/css/themes/mailcow-darkmode.css | 17 ++-- data/web/inc/functions.fail2ban.inc.php | 4 + data/web/inc/functions.inc.php | 54 +++++++++++-- data/web/inc/functions.mailbox.inc.php | 10 ++- data/web/js/site/admin.js | 26 +++---- data/web/js/site/mailbox.js | 51 ++++++------ data/web/lang/lang.cs-cz.json | 9 ++- data/web/lang/lang.da-dk.json | 2 +- data/web/lang/lang.de-de.json | 2 + data/web/lang/lang.en-gb.json | 2 + data/web/lang/lang.es-es.json | 2 + data/web/lang/lang.fr-fr.json | 18 +++-- data/web/lang/lang.it-it.json | 2 + data/web/lang/lang.nl-nl.json | 2 + data/web/sogo-auth.php | 2 +- data/web/templates/admin/tab-config-f2b.twig | 8 ++ data/web/templates/edit/mailbox.twig | 18 ++--- data/web/templates/mailbox/tab-mailboxes.twig | 3 +- .../web/templates/user/tab-user-settings.twig | 24 +++--- docker-compose.yml | 8 +- generate_config.sh | 6 +- helper-scripts/mailcow-reset-admin.sh | 2 +- helper-scripts/nextcloud.sh | 14 ++-- update.sh | 77 ++++++++++++++----- 32 files changed, 318 insertions(+), 144 deletions(-) diff --git a/.github/workflows/close_old_issues_and_prs.yml b/.github/workflows/close_old_issues_and_prs.yml index 64002617..21ab3a8e 100644 --- a/.github/workflows/close_old_issues_and_prs.yml +++ b/.github/workflows/close_old_issues_and_prs.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - name: Mark/Close Stale Issues and Pull Requests 🗑️ - uses: actions/stale@v7.0.0 + uses: actions/stale@v8.0.0 with: repo-token: ${{ secrets.STALE_ACTION_PAT }} days-before-stale: 60 diff --git a/data/Dockerfiles/dockerapi/dockerapi.py b/data/Dockerfiles/dockerapi/dockerapi.py index 9e699c22..1ab651b5 100644 --- a/data/Dockerfiles/dockerapi/dockerapi.py +++ b/data/Dockerfiles/dockerapi/dockerapi.py @@ -380,7 +380,15 @@ class DockerUtils: if 'maildir' in request_json: for container in self.docker_client.containers.list(filters={"id": container_id}): sane_name = re.sub(r'\W+', '', request_json['maildir']) - cmd = ["/bin/bash", "-c", "if [[ -d '/var/vmail/" + request_json['maildir'].replace("'", "'\\''") + "' ]]; then /bin/mv '/var/vmail/" + request_json['maildir'].replace("'", "'\\''") + "' '/var/vmail/_garbage/" + str(int(time.time())) + "_" + sane_name + "'; fi"] + vmail_name = request_json['maildir'].replace("'", "'\\''") + cmd_vmail = "if [[ -d '/var/vmail/" + vmail_name + "' ]]; then /bin/mv '/var/vmail/" + vmail_name + "' '/var/vmail/_garbage/" + str(int(time.time())) + "_" + sane_name + "'; fi" + index_name = request_json['maildir'].split("/") + if len(index_name) > 1: + index_name = index_name[1].replace("'", "'\\''") + "@" + index_name[0].replace("'", "'\\''") + cmd_vmail_index = "if [[ -d '/var/vmail_index/" + index_name + "' ]]; then /bin/mv '/var/vmail_index/" + index_name + "' '/var/vmail/_garbage/" + str(int(time.time())) + "_" + sane_name + "_index'; fi" + cmd = ["/bin/bash", "-c", cmd_vmail + " && " + cmd_vmail_index] + else: + cmd = ["/bin/bash", "-c", cmd_vmail] maildir_cleanup = container.exec_run(cmd, user='vmail') return exec_run_handler('generic', maildir_cleanup) # api call: container_post - post_action: exec - cmd: rspamd - task: worker_password diff --git a/data/Dockerfiles/netfilter/server.py b/data/Dockerfiles/netfilter/server.py index 13b5d317..5c5cf99c 100644 --- a/data/Dockerfiles/netfilter/server.py +++ b/data/Dockerfiles/netfilter/server.py @@ -80,28 +80,40 @@ def refreshF2boptions(): global f2boptions global quit_now global exit_code + + f2boptions = {} + if not r.get('F2B_OPTIONS'): - f2boptions = {} - f2boptions['ban_time'] = int - f2boptions['max_attempts'] = int - f2boptions['retry_window'] = int - f2boptions['netban_ipv4'] = int - f2boptions['netban_ipv6'] = int - f2boptions['ban_time'] = r.get('F2B_BAN_TIME') or 1800 - f2boptions['max_attempts'] = r.get('F2B_MAX_ATTEMPTS') or 10 - f2boptions['retry_window'] = r.get('F2B_RETRY_WINDOW') or 600 - f2boptions['netban_ipv4'] = r.get('F2B_NETBAN_IPV4') or 32 - f2boptions['netban_ipv6'] = r.get('F2B_NETBAN_IPV6') or 128 - r.set('F2B_OPTIONS', json.dumps(f2boptions, ensure_ascii=False)) + f2boptions['ban_time'] = r.get('F2B_BAN_TIME') + f2boptions['max_ban_time'] = r.get('F2B_MAX_BAN_TIME') + f2boptions['ban_time_increment'] = r.get('F2B_BAN_TIME_INCREMENT') + f2boptions['max_attempts'] = r.get('F2B_MAX_ATTEMPTS') + f2boptions['retry_window'] = r.get('F2B_RETRY_WINDOW') + f2boptions['netban_ipv4'] = r.get('F2B_NETBAN_IPV4') + f2boptions['netban_ipv6'] = r.get('F2B_NETBAN_IPV6') else: try: - f2boptions = {} f2boptions = json.loads(r.get('F2B_OPTIONS')) except ValueError: print('Error loading F2B options: F2B_OPTIONS is not json') quit_now = True exit_code = 2 + verifyF2boptions(f2boptions) + r.set('F2B_OPTIONS', json.dumps(f2boptions, ensure_ascii=False)) + +def verifyF2boptions(f2boptions): + verifyF2boption(f2boptions,'ban_time', 1800) + verifyF2boption(f2boptions,'max_ban_time', 10000) + verifyF2boption(f2boptions,'ban_time_increment', True) + verifyF2boption(f2boptions,'max_attempts', 10) + verifyF2boption(f2boptions,'retry_window', 600) + verifyF2boption(f2boptions,'netban_ipv4', 32) + verifyF2boption(f2boptions,'netban_ipv6', 128) + +def verifyF2boption(f2boptions, f2boption, f2bdefault): + f2boptions[f2boption] = f2boptions[f2boption] if f2boption in f2boptions and f2boptions[f2boption] is not None else f2bdefault + def refreshF2bregex(): global f2bregex global quit_now @@ -560,6 +572,7 @@ def ban(address): global lock refreshF2boptions() BAN_TIME = int(f2boptions['ban_time']) + BAN_TIME_INCREMENT = bool(f2boptions['ban_time_increment']) MAX_ATTEMPTS = int(f2boptions['max_attempts']) RETRY_WINDOW = int(f2boptions['retry_window']) NETBAN_IPV4 = '/' + str(f2boptions['netban_ipv4']) @@ -596,11 +609,10 @@ def ban(address): bans[net]['attempts'] += 1 bans[net]['last_attempt'] = time.time() - active_window = time.time() - bans[net]['last_attempt'] - if bans[net]['attempts'] >= MAX_ATTEMPTS: cur_time = int(round(time.time())) - logCrit('Banning %s for %d minutes' % (net, BAN_TIME / 60)) + NET_BAN_TIME = BAN_TIME if not BAN_TIME_INCREMENT else BAN_TIME * 2 ** bans[net]['ban_counter'] + logCrit('Banning %s for %d minutes' % (net, NET_BAN_TIME / 60 )) if type(ip) is ipaddress.IPv4Address: with lock: if backend == 'iptables': @@ -628,7 +640,7 @@ def ban(address): ban_dict = get_ban_ip_dict(net, "ip6") nft_exec_dict(ban_dict) - r.hset('F2B_ACTIVE_BANS', '%s' % net, cur_time + BAN_TIME) + r.hset('F2B_ACTIVE_BANS', '%s' % net, cur_time + NET_BAN_TIME) else: logWarn('%d more attempts in the next %d seconds until %s is banned' % (MAX_ATTEMPTS - bans[net]['attempts'], RETRY_WINDOW, net)) @@ -673,7 +685,8 @@ def unban(net): r.hdel('F2B_ACTIVE_BANS', '%s' % net) r.hdel('F2B_QUEUE_UNBAN', '%s' % net) if net in bans: - del bans[net] + bans[net]['attempts'] = 0 + bans[net]['ban_counter'] += 1 def permBan(net, unban=False): global lock @@ -840,7 +853,7 @@ def watch(): logWarn('%s matched rule id %s (%s)' % (addr, rule_id, item['data'])) ban(addr) except Exception as ex: - logWarn('Error reading log line from pubsub') + logWarn('Error reading log line from pubsub: %s' % ex) quit_now = True exit_code = 2 @@ -946,6 +959,8 @@ def autopurge(): time.sleep(10) refreshF2boptions() BAN_TIME = int(f2boptions['ban_time']) + MAX_BAN_TIME = int(f2boptions['max_ban_time']) + BAN_TIME_INCREMENT = bool(f2boptions['ban_time_increment']) MAX_ATTEMPTS = int(f2boptions['max_attempts']) QUEUE_UNBAN = r.hgetall('F2B_QUEUE_UNBAN') if QUEUE_UNBAN: @@ -953,7 +968,9 @@ def autopurge(): unban(str(net)) for net in bans.copy(): if bans[net]['attempts'] >= MAX_ATTEMPTS: - if time.time() - bans[net]['last_attempt'] > BAN_TIME: + NET_BAN_TIME = BAN_TIME if not BAN_TIME_INCREMENT else BAN_TIME * 2 ** bans[net]['ban_counter'] + TIME_SINCE_LAST_ATTEMPT = time.time() - bans[net]['last_attempt'] + if TIME_SINCE_LAST_ATTEMPT > NET_BAN_TIME or TIME_SINCE_LAST_ATTEMPT > MAX_BAN_TIME: unban(net) def isIpNetwork(address): diff --git a/data/Dockerfiles/phpfpm/Dockerfile b/data/Dockerfiles/phpfpm/Dockerfile index c8713e04..0ff47206 100644 --- a/data/Dockerfiles/phpfpm/Dockerfile +++ b/data/Dockerfiles/phpfpm/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1-fpm-alpine3.17 +FROM php:8.2-fpm-alpine3.17 LABEL maintainer "Andre Peters " # renovate: datasource=github-tags depName=krakjoe/apcu versioning=semver-coerced @@ -12,7 +12,7 @@ ARG MEMCACHED_PECL_VERSION=3.2.0 # renovate: datasource=github-tags depName=phpredis/phpredis versioning=semver-coerced ARG REDIS_PECL_VERSION=5.3.7 # renovate: datasource=github-tags depName=composer/composer versioning=semver-coerced -ARG COMPOSER_VERSION=2.5.4 +ARG COMPOSER_VERSION=2.5.5 RUN apk add -U --no-cache autoconf \ aspell-dev \ @@ -52,6 +52,7 @@ RUN apk add -U --no-cache autoconf \ libxpm-dev \ libzip \ libzip-dev \ + linux-headers \ make \ mysql-client \ openldap-dev \ @@ -75,7 +76,7 @@ RUN apk add -U --no-cache autoconf \ --with-webp \ --with-xpm \ --with-avif \ - && docker-php-ext-install -j 4 exif gd gettext intl ldap opcache pcntl pdo pdo_mysql pspell soap sockets zip bcmath gmp \ + && docker-php-ext-install -j 4 exif gd gettext intl ldap opcache pcntl pdo pdo_mysql pspell soap sockets sysvsem zip bcmath gmp \ && docker-php-ext-configure imap --with-imap --with-imap-ssl \ && docker-php-ext-install -j 4 imap \ && curl --silent --show-error https://getcomposer.org/installer | php -- --version=${COMPOSER_VERSION} \ @@ -99,6 +100,7 @@ RUN apk add -U --no-cache autoconf \ libxml2-dev \ libxpm-dev \ libzip-dev \ + linux-headers \ make \ openldap-dev \ pcre-dev \ diff --git a/data/assets/nextcloud/nextcloud.conf b/data/assets/nextcloud/nextcloud.conf index 3755c4a7..eda2c779 100644 --- a/data/assets/nextcloud/nextcloud.conf +++ b/data/assets/nextcloud/nextcloud.conf @@ -24,7 +24,7 @@ server { add_header X-Download-Options "noopen" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Permitted-Cross-Domain-Policies "none" always; - add_header X-Robots-Tag "none" always; + add_header X-Robots-Tag "noindex, nofollow" always; add_header X-XSS-Protection "1; mode=block" always; fastcgi_hide_header X-Powered-By; diff --git a/data/web/api/openapi.yaml b/data/web/api/openapi.yaml index 5e07c4b3..65bd1211 100644 --- a/data/web/api/openapi.yaml +++ b/data/web/api/openapi.yaml @@ -3176,8 +3176,10 @@ paths: example: attr: ban_time: "86400" + ban_time_increment: "1" blacklist: "10.100.6.5/32,10.100.8.4/32" max_attempts: "5" + max_ban_time: "86400" netban_ipv4: "24" netban_ipv6: "64" retry_window: "600" @@ -3191,11 +3193,17 @@ paths: description: the backlisted ips or hostnames separated by comma type: string ban_time: - description: the time a ip should be banned + description: the time an ip should be banned type: number + ban_time_increment: + description: if the time of the ban should increase each time + type: boolean max_attempts: description: the maximum numbe of wrong logins before a ip is banned type: number + max_ban_time: + description: the maximum time an ip should be banned + type: number netban_ipv4: description: the networks mask to ban for ipv4 type: number @@ -4113,10 +4121,12 @@ paths: response: value: ban_time: 604800 + ban_time_increment: 1 blacklist: |- 45.82.153.37/32 92.118.38.52/32 max_attempts: 1 + max_ban_time: 604800 netban_ipv4: 32 netban_ipv6: 128 perm_bans: diff --git a/data/web/css/build/011-datatables.css b/data/web/css/build/011-datatables.css index d03514ff..d262f07c 100644 --- a/data/web/css/build/011-datatables.css +++ b/data/web/css/build/011-datatables.css @@ -342,6 +342,10 @@ div.dataTables_wrapper div.dt-row { position: relative; } +div.dataTables_wrapper span.sorting-value { + display: none; +} + div.dataTables_scrollHead table.dataTable { margin-bottom: 0 !important; } diff --git a/data/web/css/site/mailbox.css b/data/web/css/site/mailbox.css index f62ead31..e896abca 100644 --- a/data/web/css/site/mailbox.css +++ b/data/web/css/site/mailbox.css @@ -66,4 +66,6 @@ table tbody tr td input[type="checkbox"] { padding: .2em .4em .3em !important; background-color: #ececec!important; } - +.badge.bg-info .bi { + font-size: inherit; +} diff --git a/data/web/css/themes/mailcow-darkmode.css b/data/web/css/themes/mailcow-darkmode.css index 6e0db0e9..abaa7499 100644 --- a/data/web/css/themes/mailcow-darkmode.css +++ b/data/web/css/themes/mailcow-darkmode.css @@ -20,6 +20,11 @@ legend { background-color: #7a7a7a !important; border-color: #5c5c5c !important; } +.btn-dark { + color: #000 !important;; + background-color: #f6f6f6 !important;; + border-color: #ddd !important;; +} .btn-check:checked+.btn-secondary, .btn-check:active+.btn-secondary, .btn-secondary:active, .btn-secondary.active, .show>.btn-secondary.dropdown-toggle { border-color: #7a7a7a !important; } @@ -299,22 +304,22 @@ a:hover { } -table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before:hover, +table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before:hover, table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before:hover { background-color: #7a7a7a !important; } -table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before, +table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before, table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before { background-color: #7a7a7a !important; border: 1.5px solid #5c5c5c !important; color: #fff !important; } -table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before, +table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before, table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before { background-color: #949494; } -table.dataTable.dtr-inline.collapsed>tbody>tr>td.child, -table.dataTable.dtr-inline.collapsed>tbody>tr>th.child, +table.dataTable.dtr-inline.collapsed>tbody>tr>td.child, +table.dataTable.dtr-inline.collapsed>tbody>tr>th.child, table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty { background-color: #444444; } @@ -327,7 +332,7 @@ table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty { } .btn.btn-outline-secondary { color: #fff !important; - border-color: #7a7a7a !important; + border-color: #7a7a7a !important; } .btn-check:checked+.btn-outline-secondary, .btn-check:active+.btn-outline-secondary, .btn-outline-secondary:active, .btn-outline-secondary.active, .btn-outline-secondary.dropdown-toggle.show { background-color: #9b9b9b !important; diff --git a/data/web/inc/functions.fail2ban.inc.php b/data/web/inc/functions.fail2ban.inc.php index 2a7f11e8..2c4aa41d 100644 --- a/data/web/inc/functions.fail2ban.inc.php +++ b/data/web/inc/functions.fail2ban.inc.php @@ -239,7 +239,9 @@ function fail2ban($_action, $_data = null) { $is_now = fail2ban('get'); if (!empty($is_now)) { $ban_time = intval((isset($_data['ban_time'])) ? $_data['ban_time'] : $is_now['ban_time']); + $ban_time_increment = (isset($_data['ban_time_increment']) && $_data['ban_time_increment'] == "1") ? 1 : 0; $max_attempts = intval((isset($_data['max_attempts'])) ? $_data['max_attempts'] : $is_now['max_attempts']); + $max_ban_time = intval((isset($_data['max_ban_time'])) ? $_data['max_ban_time'] : $is_now['max_ban_time']); $retry_window = intval((isset($_data['retry_window'])) ? $_data['retry_window'] : $is_now['retry_window']); $netban_ipv4 = intval((isset($_data['netban_ipv4'])) ? $_data['netban_ipv4'] : $is_now['netban_ipv4']); $netban_ipv6 = intval((isset($_data['netban_ipv6'])) ? $_data['netban_ipv6'] : $is_now['netban_ipv6']); @@ -256,6 +258,8 @@ function fail2ban($_action, $_data = null) { } $f2b_options = array(); $f2b_options['ban_time'] = ($ban_time < 60) ? 60 : $ban_time; + $f2b_options['ban_time_increment'] = ($ban_time_increment == 1) ? true : false; + $f2b_options['max_ban_time'] = ($max_ban_time < 60) ? 60 : $max_ban_time; $f2b_options['netban_ipv4'] = ($netban_ipv4 < 8) ? 8 : $netban_ipv4; $f2b_options['netban_ipv6'] = ($netban_ipv6 < 8) ? 8 : $netban_ipv6; $f2b_options['netban_ipv4'] = ($netban_ipv4 > 32) ? 32 : $netban_ipv4; diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php index de1855fa..4dc2418c 100644 --- a/data/web/inc/functions.inc.php +++ b/data/web/inc/functions.inc.php @@ -1015,20 +1015,58 @@ function formatBytes($size, $precision = 2) { } return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; } -function update_sogo_static_view() { +function update_sogo_static_view($mailbox = null) { if (getenv('SKIP_SOGO') == "y") { return true; } global $pdo; global $lang; - $stmt = $pdo->query("SELECT 'OK' FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_NAME = 'sogo_view'"); - $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC)); - if ($num_results != 0) { - $stmt = $pdo->query("REPLACE INTO _sogo_static_view (`c_uid`, `domain`, `c_name`, `c_password`, `c_cn`, `mail`, `aliases`, `ad_aliases`, `ext_acl`, `kind`, `multiple_bookings`) - SELECT `c_uid`, `domain`, `c_name`, `c_password`, `c_cn`, `mail`, `aliases`, `ad_aliases`, `ext_acl`, `kind`, `multiple_bookings` from sogo_view"); - $stmt = $pdo->query("DELETE FROM _sogo_static_view WHERE `c_uid` NOT IN (SELECT `username` FROM `mailbox` WHERE `active` = '1');"); + + $mailbox_exists = false; + if ($mailbox !== null) { + // Check if the mailbox exists + $stmt = $pdo->prepare("SELECT username FROM mailbox WHERE username = :mailbox AND active = '1'"); + $stmt->execute(array(':mailbox' => $mailbox)); + $row = $stmt->fetch(PDO::FETCH_ASSOC); + if ($row){ + $mailbox_exists = true; + } } + + $query = "REPLACE INTO _sogo_static_view (`c_uid`, `domain`, `c_name`, `c_password`, `c_cn`, `mail`, `aliases`, `ad_aliases`, `ext_acl`, `kind`, `multiple_bookings`) + SELECT + mailbox.username, + mailbox.domain, + mailbox.username, + IF(JSON_UNQUOTE(JSON_VALUE(attributes, '$.force_pw_update')) = '0', + IF(JSON_UNQUOTE(JSON_VALUE(attributes, '$.sogo_access')) = 1, password, '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'), + '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'), + mailbox.name, + mailbox.username, + IFNULL(GROUP_CONCAT(ga.aliases ORDER BY ga.aliases SEPARATOR ' '), ''), + IFNULL(gda.ad_alias, ''), + IFNULL(external_acl.send_as_acl, ''), + mailbox.kind, + mailbox.multiple_bookings + FROM + mailbox + LEFT OUTER JOIN grouped_mail_aliases ga ON ga.username REGEXP CONCAT('(^|,)', mailbox.username, '($|,)') + LEFT OUTER JOIN grouped_domain_alias_address gda ON gda.username = mailbox.username + LEFT OUTER JOIN grouped_sender_acl_external external_acl ON external_acl.username = mailbox.username + WHERE + mailbox.active = '1'"; + + if ($mailbox_exists) { + $query .= " AND mailbox.username = :mailbox"; + $stmt = $pdo->prepare($query); + $stmt->execute(array(':mailbox' => $mailbox)); + } else { + $query .= " GROUP BY mailbox.username"; + $stmt = $pdo->query($query); + } + + $stmt = $pdo->query("DELETE FROM _sogo_static_view WHERE `c_uid` NOT IN (SELECT `username` FROM `mailbox` WHERE `active` = '1');"); + flush_memcached(); } function edit_user_account($_data) { diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index 4529ee7b..4e036b99 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -1264,11 +1264,13 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { )); } + update_sogo_static_view($username); $_SESSION['return'][] = array( 'type' => 'success', 'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr), 'msg' => array('mailbox_added', htmlspecialchars($username)) ); + return true; break; case 'resource': $domain = idn_to_ascii(strtolower(trim($_data['domain'])), 0, INTL_IDNA_VARIANT_UTS46); @@ -3130,7 +3132,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { 'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr), 'msg' => array('mailbox_modified', $username) ); + + update_sogo_static_view($username); } + return true; break; case 'mailbox_templates': if ($_SESSION['mailcow_cc_role'] != "admin") { @@ -5053,12 +5058,15 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { ); continue; } + + update_sogo_static_view($username); $_SESSION['return'][] = array( 'type' => 'success', 'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr), 'msg' => array('mailbox_removed', htmlspecialchars($username)) ); } + return true; break; case 'mailbox_templates': if ($_SESSION['mailcow_cc_role'] != "admin") { @@ -5264,7 +5272,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { } break; } - if ($_action != 'get' && in_array($_type, array('domain', 'alias', 'alias_domain', 'mailbox', 'resource')) && getenv('SKIP_SOGO') != "y") { + if ($_action != 'get' && in_array($_type, array('domain', 'alias', 'alias_domain', 'resource')) && getenv('SKIP_SOGO') != "y") { update_sogo_static_view(); } } diff --git a/data/web/js/site/admin.js b/data/web/js/site/admin.js index 23ef1d25..07dfed8c 100644 --- a/data/web/js/site/admin.js +++ b/data/web/js/site/admin.js @@ -117,8 +117,8 @@ jQuery(function($){ data: 'tfa_active', defaultContent: '', render: function (data, type) { - if(data == 1) return ''; - else return ''; + if(data == 1) return '1'; + else return '0'; } }, { @@ -126,8 +126,8 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - if(data == 1) return ''; - else return ''; + if(data == 1) return '1'; + else return '0'; } }, { @@ -260,8 +260,8 @@ jQuery(function($){ data: 'tfa_active', defaultContent: '', render: function (data, type) { - if(data == 1) return ''; - else return ''; + if(data == 1) return '1'; + else return '0'; } }, { @@ -269,8 +269,8 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - if(data == 1) return ''; - else return ''; + if(data == 1) return '1'; + else return '0'; } }, { @@ -337,7 +337,7 @@ jQuery(function($){ data: 'keep_spam', defaultContent: '', render: function(data, type){ - return 'yes'==data?'':'no'==data&&''; + return 'yes'==data?'yes':'no'==data&&'no'; } }, { @@ -414,8 +414,8 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - if(data == 1) return ''; - else return ''; + if(data == 1) return '1'; + else return '0'; } }, { @@ -492,8 +492,8 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - if(data == 1) return ''; - else return ''; + if(data == 1) return '1'; + else return '0'; } }, { diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index f4039268..d7fca848 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -607,7 +607,7 @@ jQuery(function($){ defaultContent: '', responsivePriority: 6, render: function (data, type) { - return 1==data?'':(0==data?'':2==data&&'—'); + return 1==data?'1':(0==data?'0':2==data&&'—'); } }, { @@ -754,7 +754,7 @@ jQuery(function($){ data: 'attributes.gal', defaultContent: '', render: function (data, type) { - return 1==data?'':''; + return 1==data?'1':'0'; } }, { @@ -762,7 +762,7 @@ jQuery(function($){ data: 'attributes.backupmx', defaultContent: '', render: function (data, type) { - return 1==data?'':''; + return 1==data?'1':'0'; } }, { @@ -770,7 +770,7 @@ jQuery(function($){ data: 'attributes.relay_all_recipients', defaultContent: '', render: function (data, type) { - return 1==data?'':''; + return 1==data?'1':'0'; } }, { @@ -778,7 +778,7 @@ jQuery(function($){ data: 'attributes.relay_unknown_only', defaultContent: '', render: function (data, type) { - return 1==data?'':''; + return 1==data?'1':'0'; } }, { @@ -787,7 +787,7 @@ jQuery(function($){ defaultContent: '', responsivePriority: 4, render: function (data, type) { - return 1==data?'':''; + return 1==data?'1':'0'; } }, { @@ -1093,7 +1093,7 @@ jQuery(function($){ defaultContent: '', responsivePriority: 4, render: function (data, type) { - return 1==data?'':(0==data?'':2==data&&'—'); + return 1==data?'1':(0==data?'0':2==data&&'—'); } }, { @@ -1164,13 +1164,13 @@ jQuery(function($){ item.attributes.quota = humanFileSize(item.attributes.quota); - item.attributes.tls_enforce_in = ''; - item.attributes.tls_enforce_out = ''; - item.attributes.pop3_access = ''; - item.attributes.imap_access = ''; - item.attributes.smtp_access = ''; - item.attributes.sieve_access = ''; - item.attributes.sogo_access = ''; + item.attributes.tls_enforce_in = '' + (item.attributes.tls_enforce_in == 1 ? '1' : '0') + ''; + item.attributes.tls_enforce_out = '' + (item.attributes.tls_enforce_out == 1 ? '1' : '0') + ''; + item.attributes.pop3_access = '' + (item.attributes.pop3_access == 1 ? '1' : '0') + ''; + item.attributes.imap_access = '' + (item.attributes.imap_access == 1 ? '1' : '0') + ''; + item.attributes.smtp_access = '' + (item.attributes.smtp_access == 1 ? '1' : '0') + ''; + item.attributes.sieve_access = '' + (item.attributes.sieve_access == 1 ? '1' : '0') + ''; + item.attributes.sogo_access = '' + (item.attributes.sogo_access == 1 ? '1' : '0') + ''; if (item.attributes.quarantine_notification === 'never') { item.attributes.quarantine_notification = lang.never; } else if (item.attributes.quarantine_notification === 'hourly') { @@ -1188,7 +1188,6 @@ jQuery(function($){ item.attributes.quarantine_category = lang.q_all; } - if (item.template.toLowerCase() == "default"){ item.action = '
' + ' ' + lang.edit + '' + @@ -1329,7 +1328,7 @@ jQuery(function($){ defaultContent: '', responsivePriority: 4, render: function (data, type) { - return 1==data?'':(0==data?'':2==data&&'—'); + return 1==data?'1':(0==data?'0':2==data&&'—'); } }, { @@ -1440,7 +1439,7 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - return 1==data?'':(0==data?'':2==data&&'—'); + return 1==data?'1':(0==data?'0':2==data&&'—'); } }, { @@ -1578,7 +1577,7 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - return 1==data?'':(0==data?'':2==data&&'—'); + return 1==data?'1':(0==data?'0':2==data&&'—'); } }, { @@ -1675,7 +1674,7 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - return 1==data?'':0==data&&''; + return 1==data?'1':0==data&&'0'; } }, { @@ -1782,7 +1781,7 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - return 1==data?'':0==data&&''; + return 1==data?'1':0==data&&'0'; } }, { @@ -1917,7 +1916,7 @@ jQuery(function($){ data: 'sogo_visible', defaultContent: '', render: function(data, type){ - return 1==data?'':0==data&&''; + return 1==data?'1':0==data&&'0'; } }, { @@ -1936,7 +1935,7 @@ jQuery(function($){ defaultContent: '', responsivePriority: 6, render: function (data, type) { - return 1==data?'':0==data&&''; + return 1==data?'1':0==data&&'0'; } }, { @@ -1952,6 +1951,10 @@ jQuery(function($){ table.on('responsive-resize', function (e, datatable, columns){ hideTableExpandCollapseBtn('#tab-mbox-aliases', '#alias_table'); }); + + table.on( 'draw', function (){ + $('#alias_table [data-bs-toggle="tooltip"]').tooltip(); + }); } function draw_aliasdomain_table() { // just recalc width if instance already exists @@ -2031,7 +2034,7 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - return 1==data?'':0==data&&''; + return 1==data?'1':0==data&&'0'; } }, { @@ -2167,7 +2170,7 @@ jQuery(function($){ data: 'active', defaultContent: '', render: function (data, type) { - return 1==data?'':0==data&&''; + return 1==data?'1':0==data&&'0'; } }, { diff --git a/data/web/lang/lang.cs-cz.json b/data/web/lang/lang.cs-cz.json index 5e119fbd..712b8c77 100644 --- a/data/web/lang/lang.cs-cz.json +++ b/data/web/lang/lang.cs-cz.json @@ -105,7 +105,8 @@ "timeout2": "Časový limit pro připojení k lokálnímu serveru", "username": "Uživatelské jméno", "validate": "Ověřit", - "validation_success": "Úspěšně ověřeno" + "validation_success": "Úspěšně ověřeno", + "tags": "Štítky" }, "admin": { "access": "Přístupy", @@ -333,7 +334,11 @@ "username": "Uživatelské jméno", "validate_license_now": "Ověřit GUID na licenčním serveru", "verify": "Ověřit", - "yes": "✓" + "yes": "✓", + "f2b_ban_time_increment": "Délka banu je prodlužována s každým dalším banem", + "f2b_max_ban_time": "Maximální délka banu (s)", + "ip_check": "Kontrola IP", + "ip_check_disabled": "Kontrola IP je vypnuta. Můžete ji zapnout v
System > Nastavení > Options > Přizpůsobení" }, "danger": { "access_denied": "Přístup odepřen nebo jsou neplatná data ve formuláři", diff --git a/data/web/lang/lang.da-dk.json b/data/web/lang/lang.da-dk.json index 61a553e6..5846181b 100644 --- a/data/web/lang/lang.da-dk.json +++ b/data/web/lang/lang.da-dk.json @@ -1048,7 +1048,7 @@ "spamfilter_table_empty": "Intet data at vise", "spamfilter_table_remove": "slet", "spamfilter_table_rule": "Regl", - "spamfilter_wl": "Hvisliste", + "spamfilter_wl": "Hvidliste", "spamfilter_wl_desc": "Hvidlistede e-mail-adresser til aldrig at klassificeres som spam. Wildcards kan bruges. Et filter anvendes kun på direkte aliaser (aliaser med en enkelt målpostkasse) eksklusive catch-aliaser og selve en postkasse.", "spamfilter_yellow": "Gul: denne besked kan være spam, vil blive tagget som spam og flyttes til din junk-mappe", "status": "Status", diff --git a/data/web/lang/lang.de-de.json b/data/web/lang/lang.de-de.json index 8ff1cf06..4bd4b3fa 100644 --- a/data/web/lang/lang.de-de.json +++ b/data/web/lang/lang.de-de.json @@ -175,10 +175,12 @@ "empty": "Keine Einträge vorhanden", "excludes": "Diese Empfänger ausschließen", "f2b_ban_time": "Bannzeit in Sekunden", + "f2b_ban_time_increment": "Bannzeit erhöht sich mit jedem Bann", "f2b_blacklist": "Blacklist für Netzwerke und Hosts", "f2b_filter": "Regex-Filter", "f2b_list_info": "Ein Host oder Netzwerk auf der Blacklist wird immer eine Whitelist-Einheit überwiegen. Die Aktualisierung der Liste dauert einige Sekunden.", "f2b_max_attempts": "Max. Versuche", + "f2b_max_ban_time": "Maximale Bannzeit in Sekunden", "f2b_netban_ipv4": "Netzbereich für IPv4-Banns (8-32)", "f2b_netban_ipv6": "Netzbereich für IPv6-Banns (8-128)", "f2b_parameters": "Fail2ban-Parameter", diff --git a/data/web/lang/lang.en-gb.json b/data/web/lang/lang.en-gb.json index bfac011e..df83987c 100644 --- a/data/web/lang/lang.en-gb.json +++ b/data/web/lang/lang.en-gb.json @@ -177,10 +177,12 @@ "empty": "No results", "excludes": "Excludes these recipients", "f2b_ban_time": "Ban time (s)", + "f2b_ban_time_increment": "Ban time is incremented with each ban", "f2b_blacklist": "Blacklisted networks/hosts", "f2b_filter": "Regex filters", "f2b_list_info": "A blacklisted host or network will always outweigh a whitelist entity. List updates will take a few seconds to be applied.", "f2b_max_attempts": "Max. attempts", + "f2b_max_ban_time": "Max. ban time (s)", "f2b_netban_ipv4": "IPv4 subnet size to apply ban on (8-32)", "f2b_netban_ipv6": "IPv6 subnet size to apply ban on (8-128)", "f2b_parameters": "Fail2ban parameters", diff --git a/data/web/lang/lang.es-es.json b/data/web/lang/lang.es-es.json index d9c3bfd3..e56e6bdd 100644 --- a/data/web/lang/lang.es-es.json +++ b/data/web/lang/lang.es-es.json @@ -141,9 +141,11 @@ "empty": "Sin resultados", "excludes": "Excluye a estos destinatarios", "f2b_ban_time": "Tiempo de restricción (s)", + "f2b_ban_time_increment": "Tiempo de restricción se incrementa con cada restricción", "f2b_blacklist": "Redes y hosts en lista negra", "f2b_list_info": "Un host o red en lista negra siempre superará a una entidad de la lista blanca. Las actualizaciones de la lista tardarán unos segundos en aplicarse.", "f2b_max_attempts": "Max num. de intentos", + "f2b_max_ban_time": "Max tiempo de restricción (s)", "f2b_netban_ipv4": "Tamaño de subred IPv4 para aplicar la restricción (8-32)", "f2b_netban_ipv6": "Tamaño de subred IPv6 para aplicar la restricción (8-128)", "f2b_parameters": "Parametros Fail2ban", diff --git a/data/web/lang/lang.fr-fr.json b/data/web/lang/lang.fr-fr.json index ef19d186..d64f62f7 100644 --- a/data/web/lang/lang.fr-fr.json +++ b/data/web/lang/lang.fr-fr.json @@ -24,7 +24,7 @@ "spam_policy": "Liste Noire/Liste Blanche", "spam_score": "Score SPAM", "syncjobs": "Tâches de synchronisation", - "tls_policy": "Police TLS", + "tls_policy": "Politique TLS", "unlimited_quota": "Quota illimité pour les boites de courriel", "domain_desc": "Modifier la description du domaine", "domain_relayhost": "Changer le relais pour un domaine", @@ -106,7 +106,8 @@ "validate": "Valider", "validation_success": "Validation réussie", "bcc_dest_format": "La destination Cci doit être une seule adresse e-mail valide.
Si vous avez besoin d'envoyer une copie à plusieurs adresses, créez un alias et utilisez-le ici.", - "tags": "Etiquettes" + "tags": "Etiquettes", + "app_passwd_protocols": "Protocoles autorisés pour le mot de passe de l'application" }, "admin": { "access": "Accès", @@ -171,11 +172,13 @@ "edit": "Editer", "empty": "Aucun résultat", "excludes": "Exclure ces destinataires", - "f2b_ban_time": "Durée du bannissement(s)", + "f2b_ban_time": "Durée du bannissement (s)", + "f2b_ban_time_increment": "Durée du bannissement est augmentée à chaque bannissement", "f2b_blacklist": "Réseaux/Domaines sur Liste Noire", "f2b_filter": "Filtre(s) Regex", "f2b_list_info": "Un hôte ou un réseau sur liste noire l'emportera toujours sur une entité de liste blanche. L'application des mises à jour de liste prendra quelques secondes.", "f2b_max_attempts": "Nb max. de tentatives", + "f2b_max_ban_time": "Max. durée du bannissement (s)", "f2b_netban_ipv4": "Taille du sous-réseau IPv4 pour l'application du bannissement (8-32)", "f2b_netban_ipv6": "Taille du sous-réseau IPv6 pour l'application du bannissement (8-128)", "f2b_parameters": "Paramètres Fail2ban", @@ -585,7 +588,7 @@ "unchanged_if_empty": "Si non modifié, laisser en blanc", "username": "Nom d'utilisateur", "validate_save": "Valider et sauver", - "lookup_mx": "La destination est une expression régulière qui doit correspondre avec le nom du MX (.*google\\.com pour acheminer tout le courrier destiné à un MX se terminant par google.com via ce saut).", + "lookup_mx": "La destination est une expression régulière qui doit correspondre avec le nom du MX (.*google\\.com pour acheminer tout le courrier destiné à un MX se terminant par google.com via ce saut)", "mailbox_relayhost_info": "S'applique uniquement à la boîte aux lettres et aux alias directs, remplace le relayhost du domaine." }, "footer": { @@ -1088,9 +1091,12 @@ "username": "Nom d'utilisateur", "verify": "Vérification", "waiting": "En attente", - "week": "Semaine", + "week": "semaine", "weekly": "Hebdomadaire", - "weeks": "semaines" + "weeks": "semaines", + "months": "mois", + "year": "année", + "years": "années" }, "warning": { "cannot_delete_self": "Impossible de supprimer l’utilisateur connecté", diff --git a/data/web/lang/lang.it-it.json b/data/web/lang/lang.it-it.json index d8d6978c..4d21547c 100644 --- a/data/web/lang/lang.it-it.json +++ b/data/web/lang/lang.it-it.json @@ -175,10 +175,12 @@ "empty": "Nessun risultato", "excludes": "Esclude questi destinatari", "f2b_ban_time": "Tempo di blocco (s)", + "f2b_ban_time_increment": "Tempo di blocco aumenta ad ogni blocco", "f2b_blacklist": "Host/reti in blacklist", "f2b_filter": "Filtri Regex", "f2b_list_info": "Un host oppure una rete in blacklist, avrà sempre un peso maggiore rispetto ad una in whitelist. L'aggiornamento della lista richiede alcuni secondi per la sua entrata in azione.", "f2b_max_attempts": "Tentativi massimi", + "f2b_max_ban_time": "Tempo massimo di blocco (s)", "f2b_netban_ipv4": "IPv4 subnet size to apply ban on (8-32)", "f2b_netban_ipv6": "IPv6 subnet size to apply ban on (8-128)", "f2b_parameters": "Parametri Fail2ban", diff --git a/data/web/lang/lang.nl-nl.json b/data/web/lang/lang.nl-nl.json index 774627ca..4c2ea0b1 100644 --- a/data/web/lang/lang.nl-nl.json +++ b/data/web/lang/lang.nl-nl.json @@ -168,10 +168,12 @@ "empty": "Geen resultaten", "excludes": "Exclusief", "f2b_ban_time": "Verbanningstijd (s)", + "f2b_ban_time_increment": "Verbanningstijd wordt verhoogd met elk verbanning", "f2b_blacklist": "Netwerken/hosts op de blacklist", "f2b_filter": "Regex-filters", "f2b_list_info": "Een host of netwerk op de blacklist staat altijd boven eenzelfde op de whitelist. Het doorvoeren van wijzigingen kan enkele seconden in beslag nemen.", "f2b_max_attempts": "Maximaal aantal pogingen", + "f2b_max_ban_time": "Maximaal verbanningstijd (s)", "f2b_netban_ipv4": "Voer de IPv4-subnetgrootte in waar de verbanning van kracht moet zijn (8-32)", "f2b_netban_ipv6": "Voer de IPv6-subnetgrootte in waar de verbanning van kracht moet zijn (8-128)", "f2b_parameters": "Fail2ban", diff --git a/data/web/sogo-auth.php b/data/web/sogo-auth.php index 7ca5e4d9..40fff585 100644 --- a/data/web/sogo-auth.php +++ b/data/web/sogo-auth.php @@ -60,7 +60,7 @@ elseif (isset($_GET['login'])) { ':remote_addr' => ($_SERVER['HTTP_X_REAL_IP'] ?? $_SERVER['REMOTE_ADDR']) )); // redirect to sogo (sogo will get the correct credentials via nginx auth_request - header("Location: /SOGo/so/${login}"); + header("Location: /SOGo/so/{$login}"); exit; } } diff --git a/data/web/templates/admin/tab-config-f2b.twig b/data/web/templates/admin/tab-config-f2b.twig index bbd3e367..c15fb72f 100644 --- a/data/web/templates/admin/tab-config-f2b.twig +++ b/data/web/templates/admin/tab-config-f2b.twig @@ -12,6 +12,14 @@
+
+ + +
+
+ + +
diff --git a/data/web/templates/edit/mailbox.twig b/data/web/templates/edit/mailbox.twig index 36fe053b..f8cde7da 100644 --- a/data/web/templates/edit/mailbox.twig +++ b/data/web/templates/edit/mailbox.twig @@ -109,25 +109,25 @@
- - - - - - -
- {{ lang.mailbox.toggle_all }} + {{ lang.mailbox.toggle_all }} {{ lang.mailbox.quick_actions }}