From 85d1ee2f49ed350529fb3fd829268c4cdf8dfbd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Fri, 3 Nov 2017 20:37:24 +0100 Subject: [PATCH] [Web] Autodiscover returns given password decoded and trimed; Add sieve pre and post filters to UI; Move ajax called files; Rework log system: 100 entries per default, add more per click; Syncjobs: Do not read log to data attribute --- data/web/admin.php | 56 +- data/web/api.php | 32 - data/web/autodiscover.php | 3 +- data/web/css/footable.bootstrap.min.css | 5 +- data/web/css/mailbox.css | 2 +- data/web/css/numberedtextarea.min.css | 1 + data/web/css/user.css | 7 + data/web/edit.php | 85 +- data/web/inc/ajax/sieve_validation.php | 23 + data/web/inc/ajax/sogo_ctrl.php | 39 + data/web/inc/ajax/syncjob_logs.php | 15 + data/web/inc/footer.inc.php | 16 +- ...sogo_ctrl.php => functions.docker.inc.php} | 39 +- data/web/inc/functions.inc.php | 63 +- data/web/inc/functions.mailbox.inc.php | 376 ++++++++- data/web/inc/header.inc.php | 1 + data/web/inc/init_db.inc.php | 46 +- data/web/inc/lib/sieve/SieveDumpable.php | 7 + data/web/inc/lib/sieve/SieveException.php | 47 ++ .../inc/lib/sieve/SieveKeywordRegistry.php | 233 +++++ data/web/inc/lib/sieve/SieveParser.php | 255 ++++++ data/web/inc/lib/sieve/SieveScanner.php | 145 ++++ data/web/inc/lib/sieve/SieveScript.php | 6 + data/web/inc/lib/sieve/SieveSemantics.php | 611 ++++++++++++++ data/web/inc/lib/sieve/SieveToken.php | 88 ++ data/web/inc/lib/sieve/SieveTree.php | 117 +++ data/web/inc/lib/sieve/extensions/body.xml | 14 + .../extensions/comparator-ascii-numeric.xml | 7 + data/web/inc/lib/sieve/extensions/copy.xml | 9 + data/web/inc/lib/sieve/extensions/date.xml | 28 + .../inc/lib/sieve/extensions/editheader.xml | 22 + .../web/inc/lib/sieve/extensions/envelope.xml | 13 + .../inc/lib/sieve/extensions/environment.xml | 13 + data/web/inc/lib/sieve/extensions/ereject.xml | 11 + .../web/inc/lib/sieve/extensions/fileinto.xml | 9 + .../inc/lib/sieve/extensions/imap4flags.xml | 29 + .../inc/lib/sieve/extensions/imapflags.xml | 21 + data/web/inc/lib/sieve/extensions/index.xml | 17 + data/web/inc/lib/sieve/extensions/notify.xml | 29 + data/web/inc/lib/sieve/extensions/regex.xml | 11 + data/web/inc/lib/sieve/extensions/reject.xml | 11 + .../inc/lib/sieve/extensions/relational.xml | 14 + .../web/inc/lib/sieve/extensions/spamtest.xml | 11 + .../inc/lib/sieve/extensions/spamtestplus.xml | 12 + .../inc/lib/sieve/extensions/subaddress.xml | 8 + .../web/inc/lib/sieve/extensions/vacation.xml | 31 + .../inc/lib/sieve/extensions/variables.xml | 21 + .../inc/lib/sieve/extensions/virustest.xml | 11 + data/web/inc/lib/sieve/keywords.xml | 91 ++ data/web/inc/prerequisites.inc.php | 4 + data/web/inc/sessions.inc.php | 2 + data/web/inc/vars.inc.php | 3 + data/web/js/admin.js | 794 +++++++----------- data/web/js/api.js | 13 +- data/web/js/edit.js | 1 + data/web/js/mailbox.js | 135 ++- data/web/js/numberedtextarea.min.js | 1 + data/web/js/user.js | 47 +- data/web/json_api.php | 219 ++++- data/web/lang/lang.de.php | 24 +- data/web/lang/lang.en.php | 20 + data/web/mailbox.php | 36 +- data/web/modals/mailbox.php | 79 +- data/web/modals/user.php | 23 +- data/web/user.php | 7 + 65 files changed, 3460 insertions(+), 709 deletions(-) delete mode 100644 data/web/api.php create mode 100644 data/web/css/numberedtextarea.min.css create mode 100644 data/web/inc/ajax/sieve_validation.php create mode 100644 data/web/inc/ajax/sogo_ctrl.php create mode 100644 data/web/inc/ajax/syncjob_logs.php rename data/web/inc/{call_sogo_ctrl.php => functions.docker.inc.php} (63%) create mode 100644 data/web/inc/lib/sieve/SieveDumpable.php create mode 100644 data/web/inc/lib/sieve/SieveException.php create mode 100644 data/web/inc/lib/sieve/SieveKeywordRegistry.php create mode 100644 data/web/inc/lib/sieve/SieveParser.php create mode 100644 data/web/inc/lib/sieve/SieveScanner.php create mode 100644 data/web/inc/lib/sieve/SieveScript.php create mode 100644 data/web/inc/lib/sieve/SieveSemantics.php create mode 100644 data/web/inc/lib/sieve/SieveToken.php create mode 100644 data/web/inc/lib/sieve/SieveTree.php create mode 100644 data/web/inc/lib/sieve/extensions/body.xml create mode 100644 data/web/inc/lib/sieve/extensions/comparator-ascii-numeric.xml create mode 100644 data/web/inc/lib/sieve/extensions/copy.xml create mode 100644 data/web/inc/lib/sieve/extensions/date.xml create mode 100644 data/web/inc/lib/sieve/extensions/editheader.xml create mode 100644 data/web/inc/lib/sieve/extensions/envelope.xml create mode 100644 data/web/inc/lib/sieve/extensions/environment.xml create mode 100644 data/web/inc/lib/sieve/extensions/ereject.xml create mode 100644 data/web/inc/lib/sieve/extensions/fileinto.xml create mode 100644 data/web/inc/lib/sieve/extensions/imap4flags.xml create mode 100644 data/web/inc/lib/sieve/extensions/imapflags.xml create mode 100644 data/web/inc/lib/sieve/extensions/index.xml create mode 100644 data/web/inc/lib/sieve/extensions/notify.xml create mode 100644 data/web/inc/lib/sieve/extensions/regex.xml create mode 100644 data/web/inc/lib/sieve/extensions/reject.xml create mode 100644 data/web/inc/lib/sieve/extensions/relational.xml create mode 100644 data/web/inc/lib/sieve/extensions/spamtest.xml create mode 100644 data/web/inc/lib/sieve/extensions/spamtestplus.xml create mode 100644 data/web/inc/lib/sieve/extensions/subaddress.xml create mode 100644 data/web/inc/lib/sieve/extensions/vacation.xml create mode 100644 data/web/inc/lib/sieve/extensions/variables.xml create mode 100644 data/web/inc/lib/sieve/extensions/virustest.xml create mode 100644 data/web/inc/lib/sieve/keywords.xml create mode 100644 data/web/js/numberedtextarea.min.js diff --git a/data/web/admin.php b/data/web/admin.php index a2ec3d94..06af3db9 100644 --- a/data/web/admin.php +++ b/data/web/admin.php @@ -457,12 +457,11 @@ $tfa_data = get_tfa();
-
Postfix +
Postfix
- - + + +
@@ -475,12 +474,11 @@ $tfa_data = get_tfa();
-
Dovecot +
Dovecot
- - + + +
@@ -493,12 +491,11 @@ $tfa_data = get_tfa();
-
SOGo +
SOGo
- - + + +
@@ -511,12 +508,11 @@ $tfa_data = get_tfa();
-
Fail2ban +
Fail2ban
- - + + +
@@ -529,17 +525,16 @@ $tfa_data = get_tfa();
-
Rspamd history +
Rspamd history
- - + + +
-
+
@@ -547,12 +542,11 @@ $tfa_data = get_tfa();
-
Autodiscover +
Autodiscover
- - + + +
diff --git a/data/web/api.php b/data/web/api.php deleted file mode 100644 index d250929d..00000000 --- a/data/web/api.php +++ /dev/null @@ -1,32 +0,0 @@ -thead>tr.footable-filtering>th div.form-group{margin-bottom:0}table.footable,table.footable-details{position:relative;width:100%;border-spacing:0;border-collapse:collapse}table.footable-hide-fouc{display:none}table>tbody>tr>td>span.footable-toggle{margin-right:8px;opacity:.3}table>tbody>tr>td>span.footable-toggle.last-column{margin-left:8px;float:right}table.table-condensed>tbody>tr>td>span.footable-toggle{margin-right:5px}table.footable-details>tbody>tr>th:nth-child(1){min-width:40px;width:120px}table.footable-details>tbody>tr>td:nth-child(2){word-break:break-all}table.footable-details>tbody>tr:first-child>td,table.footable-details>tbody>tr:first-child>th,table.footable-details>tfoot>tr:first-child>td,table.footable-details>tfoot>tr:first-child>th,table.footable-details>thead>tr:first-child>td,table.footable-details>thead>tr:first-child>th{border-top-width:0}table.footable-details.table-bordered>tbody>tr:first-child>td,table.footable-details.table-bordered>tbody>tr:first-child>th,table.footable-details.table-bordered>tfoot>tr:first-child>td,table.footable-details.table-bordered>tfoot>tr:first-child>th,table.footable-details.table-bordered>thead>tr:first-child>td,table.footable-details.table-bordered>thead>tr:first-child>th{border-top-width:1px}div.footable-loader{vertical-align:middle;text-align:center;height:300px;position:relative}div.footable-loader>span.fooicon{display:inline-block;opacity:.3;font-size:30px;line-height:32px;width:32px;height:32px;margin-top:-16px;margin-left:-16px;position:absolute;top:50%;left:50%;-webkit-animation:fooicon-spin-r 2s infinite linear;animation:fooicon-spin-r 2s infinite linear}table.footable>tbody>tr.footable-empty>td{vertical-align:middle;text-align:center;font-size:30px}table.footable>tbody>tr>td,table.footable>tbody>tr>th{display:none}table.footable>tbody>tr.footable-detail-row>td,table.footable>tbody>tr.footable-detail-row>th,table.footable>tbody>tr.footable-empty>td,table.footable>tbody>tr.footable-empty>th{display:table-cell}@-webkit-keyframes fooicon-spin-r{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fooicon-spin-r{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fooicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings'!important;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fooicon:after,.fooicon:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fooicon-loader:before{content:"\e030"}.fooicon-plus:before{content:"\2b"}.fooicon-minus:before{content:"\2212"}.fooicon-search:before{content:"\e003"}.fooicon-remove:before{content:"\e014"}.fooicon-sort:before{content:"\e150"}.fooicon-sort-asc:before{content:"\e155"}.fooicon-sort-desc:before{content:"\e156"}.fooicon-pencil:before{content:"\270f"}.fooicon-trash:before{content:"\e020"}.fooicon-eye-close:before{content:"\e106"}.fooicon-flash:before{content:"\e162"}.fooicon-cog:before{content:"\e019"}.fooicon-stats:before{content:"\e185"}table.footable>thead>tr.footable-filtering>th{border-bottom-width:1px;font-weight:400}table.footable.footable-filtering-right>thead>tr.footable-filtering>th,table.footable>thead>tr.footable-filtering>th{text-align:right}table.footable.footable-filtering-left>thead>tr.footable-filtering>th{text-align:left}table.footable-paging-center>tfoot>tr.footable-paging>td,table.footable.footable-filtering-center>thead>tr.footable-filtering>th,table.footable>tfoot>tr.footable-paging>td{text-align:center}table.footable>thead>tr.footable-filtering>th div.form-group+div.form-group{margin-top:5px}table.footable>thead>tr.footable-filtering>th div.input-group{width:100%}table.footable>thead>tr.footable-filtering>th ul.dropdown-menu>li>a.checkbox{margin:0;display:block;position:relative}table.footable>thead>tr.footable-filtering>th ul.dropdown-menu>li>a.checkbox>label{display:block;padding-left:20px}table.footable>thead>tr.footable-filtering>th ul.dropdown-menu>li>a.checkbox input[type=checkbox]{position:absolute;margin-left:-20px}@media (min-width:768px){table.footable>thead>tr.footable-filtering>th div.input-group{width:auto}table.footable>thead>tr.footable-filtering>th div.form-group{margin-left:2px;margin-right:2px}table.footable>thead>tr.footable-filtering>th div.form-group+div.form-group{margin-top:0}}table.footable>tbody>tr>td.footable-sortable,table.footable>tbody>tr>th.footable-sortable,table.footable>tfoot>tr>td.footable-sortable,table.footable>tfoot>tr>th.footable-sortable,table.footable>thead>tr>td.footable-sortable,table.footable>thead>tr>th.footable-sortable{position:relative;padding-right:30px;cursor:pointer}td.footable-sortable>span.fooicon,th.footable-sortable>span.fooicon{position:absolute;right:6px;top:50%;margin-top:-7px;opacity:0;transition:opacity .3s ease-in}td.footable-sortable.footable-asc>span.fooicon,td.footable-sortable.footable-desc>span.fooicon,td.footable-sortable:hover>span.fooicon,th.footable-sortable.footable-asc>span.fooicon,th.footable-sortable.footable-desc>span.fooicon,th.footable-sortable:hover>span.fooicon{opacity:1}table.footable-sorting-disabled td.footable-sortable.footable-asc>span.fooicon,table.footable-sorting-disabled td.footable-sortable.footable-desc>span.fooicon,table.footable-sorting-disabled td.footable-sortable:hover>span.fooicon,table.footable-sorting-disabled th.footable-sortable.footable-asc>span.fooicon,table.footable-sorting-disabled th.footable-sortable.footable-desc>span.fooicon,table.footable-sorting-disabled th.footable-sortable:hover>span.fooicon{opacity:0;visibility:hidden}table.footable>tfoot>tr.footable-paging>td>ul.pagination{margin:10px 0 0}table.footable>tfoot>tr.footable-paging>td>span.label{display:inline-block;margin:0 0 10px;padding:4px 10px}table.footable-paging-left>tfoot>tr.footable-paging>td{text-align:left}table.footable-editing-right td.footable-editing,table.footable-editing-right tr.footable-editing,table.footable-paging-right>tfoot>tr.footable-paging>td{text-align:right}ul.pagination>li.footable-page{display:none}ul.pagination>li.footable-page.visible{display:inline}td.footable-editing{width:90px;max-width:90px}table.footable-editing-no-delete td.footable-editing,table.footable-editing-no-edit td.footable-editing,table.footable-editing-no-view td.footable-editing{width:70px;max-width:70px}table.footable-editing-no-delete.footable-editing-no-view td.footable-editing,table.footable-editing-no-edit.footable-editing-no-delete td.footable-editing,table.footable-editing-no-edit.footable-editing-no-view td.footable-editing{width:50px;max-width:50px}table.footable-editing-no-edit.footable-editing-no-delete.footable-editing-no-view td.footable-editing,table.footable-editing-no-edit.footable-editing-no-delete.footable-editing-no-view th.footable-editing{width:0;max-width:0;display:none!important}table.footable-editing-left td.footable-editing,table.footable-editing-left tr.footable-editing{text-align:left}table.footable-editing button.footable-add,table.footable-editing button.footable-hide,table.footable-editing-show button.footable-show,table.footable-editing.footable-editing-always-show button.footable-hide,table.footable-editing.footable-editing-always-show button.footable-show,table.footable-editing.footable-editing-always-show.footable-editing-no-add tr.footable-editing{display:none}table.footable-editing.footable-editing-always-show button.footable-add,table.footable-editing.footable-editing-show button.footable-add,table.footable-editing.footable-editing-show button.footable-hide{display:inline-block} \ No newline at end of file +table.footable-details,table.footable>thead>tr.footable-filtering>th div.form-group{margin-bottom:0}table.footable,table.footable-details{position:relative;width:100%;border-spacing:0;border-collapse:collapse}table.footable-hide-fouc{display:none}table>tbody>tr>td>span.footable-toggle{margin-right:8px;opacity:.3}table>tbody>tr>td>span.footable-toggle.last-column{margin-left:8px;float:right}table.table-condensed>tbody>tr>td>span.footable-toggle{margin-right:5px}table.footable-details>tbody>tr>th:nth-child(1){min-width:40px;width:120px}table.footable-details>tbody>tr>td:nth-child(2){word-break:break-all}table.footable-details>tbody>tr:first-child>td,table.footable-details>tbody>tr:first-child>th,table.footable-details>tfoot>tr:first-child>td,table.footable-details>tfoot>tr:first-child>th,table.footable-details>thead>tr:first-child>td,table.footable-details>thead>tr:first-child>th{border-top-width:0}table.footable-details.table-bordered>tbody>tr:first-child>td,table.footable-details.table-bordered>tbody>tr:first-child>th,table.footable-details.table-bordered>tfoot>tr:first-child>td,table.footable-details.table-bordered>tfoot>tr:first-child>th,table.footable-details.table-bordered>thead>tr:first-child>td,table.footable-details.table-bordered>thead>tr:first-child>th{border-top-width:1px}div.footable-loader{vertical-align:middle;text-align:center;height:300px;position:relative}div.footable-loader>span.fooicon{display:inline-block;opacity:.3;font-size:30px;line-height:32px;width:32px;height:32px;margin-top:-16px;margin-left:-16px;position:absolute;top:50%;left:50%;-webkit-animation:fooicon-spin-r 2s infinite linear;animation:fooicon-spin-r 2s infinite linear}table.footable>tbody>tr.footable-empty>td{vertical-align:middle;text-align:center;font-size:30px}table.footable>tbody>tr>td,table.footable>tbody>tr>th{display:none}table.footable>tbody>tr.footable-detail-row>td,table.footable>tbody>tr.footable-detail-row>th,table.footable>tbody>tr.footable-empty>td,table.footable>tbody>tr.footable-empty>th{display:table-cell}@-webkit-keyframes fooicon-spin-r{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fooicon-spin-r{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fooicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings'!important;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fooicon:after,.fooicon:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fooicon-loader:before{content:"\e030"}.fooicon-plus:before{content:"\2b"}.fooicon-minus:before{content:"\2212"}.fooicon-search:before{content:"\e003"}.fooicon-remove:before{content:"\e014"}.fooicon-sort:before{content:"\e150"}.fooicon-sort-asc:before{content:"\e155"}.fooicon-sort-desc:before{content:"\e156"}.fooicon-pencil:before{content:"\270f"}.fooicon-trash:before{content:"\e020"}.fooicon-eye-close:before{content:"\e106"}.fooicon-flash:before{content:"\e162"}.fooicon-cog:before{content:"\e019"}.fooicon-stats:before{content:"\e185"}table.footable>thead>tr.footable-filtering>th{border-bottom-width:1px;font-weight:400}table.footable.footable-filtering-right>thead>tr.footable-filtering>th,table.footable>thead>tr.footable-filtering>th{text-align:right}table.footable.footable-filtering-left>thead>tr.footable-filtering>th{text-align:left}table.footable-paging-center>tfoot>tr.footable-paging>td,table.footable.footable-filtering-center>thead>tr.footable-filtering>th,table.footable>tfoot>tr.footable-paging>td{text-align:center}table.footable>thead>tr.footable-filtering>th div.form-group+div.form-group{margin-top:5px}table.footable>thead>tr.footable-filtering>th div.input-group{width:100%}table.footable>thead>tr.footable-filtering>th ul.dropdown-menu>li>a.checkbox{margin:0;display:block;position:relative}table.footable>thead>tr.footable-filtering>th ul.dropdown-menu>li>a.checkbox>label{display:block;padding-left:20px}table.footable>thead>tr.footable-filtering>th ul.dropdown-menu>li>a.checkbox input[type=checkbox]{position:absolute;margin-left:-20px}@media (min-width:768px){table.footable>thead>tr.footable-filtering>th div.input-group{width:auto}table.footable>thead>tr.footable-filtering>th div.form-group{margin-left:2px;margin-right:2px}table.footable>thead>tr.footable-filtering>th div.form-group+div.form-group{margin-top:0}}table.footable>tbody>tr>td.footable-sortable,table.footable>tbody>tr>th.footable-sortable,table.footable>tfoot>tr>td.footable-sortable,table.footable>tfoot>tr>th.footable-sortable,table.footable>thead>tr>td.footable-sortable,table.footable>thead>tr>th.footable-sortable{position:relative;padding-right:30px;cursor:pointer}td.footable-sortable>span.fooicon,th.footable-sortable>span.fooicon{position:absolute;right:6px;top:50%;margin-top:-7px;opacity:0;transition:opacity .3s ease-in}td.footable-sortable.footable-asc>span.fooicon,td.footable-sortable.footable-desc>span.fooicon,td.footable-sortable:hover>span.fooicon,th.footable-sortable.footable-asc>span.fooicon,th.footable-sortable.footable-desc>span.fooicon,th.footable-sortable:hover>span.fooicon{opacity:1}table.footable-sorting-disabled td.footable-sortable.footable-asc>span.fooicon,table.footable-sorting-disabled td.footable-sortable.footable-desc>span.fooicon,table.footable-sorting-disabled td.footable-sortable:hover>span.fooicon,table.footable-sorting-disabled th.footable-sortable.footable-asc>span.fooicon,table.footable-sorting-disabled th.footable-sortable.footable-desc>span.fooicon,table.footable-sorting-disabled th.footable-sortable:hover>span.fooicon{opacity:0;visibility:hidden}table.footable>tfoot>tr.footable-paging>td>ul.pagination{margin:10px 0 0}table.footable>tfoot>tr.footable-paging>td>span.label{display:inline-block;margin:0 0 10px;padding:4px 10px}table.footable-paging-left>tfoot>tr.footable-paging>td{text-align:left}table.footable-editing-right td.footable-editing,table.footable-editing-right tr.footable-editing,table.footable-paging-right>tfoot>tr.footable-paging>td{text-align:right}ul.pagination>li.footable-page{display:none}ul.pagination>li.footable-page.visible{display:inline}td.footable-editing{width:90px;max-width:90px}table.footable-editing-no-delete td.footable-editing,table.footable-editing-no-edit td.footable-editing,table.footable-editing-no-view td.footable-editing{width:70px;max-width:70px}table.footable-editing-no-delete.footable-editing-no-view td.footable-editing,table.footable-editing-no-edit.footable-editing-no-delete td.footable-editing,table.footable-editing-no-edit.footable-editing-no-view td.footable-editing{width:50px;max-width:50px}table.footable-editing-no-edit.footable-editing-no-delete.footable-editing-no-view td.footable-editing,table.footable-editing-no-edit.footable-editing-no-delete.footable-editing-no-view th.footable-editing{width:0;max-width:0;display:none!important}table.footable-editing-left td.footable-editing,table.footable-editing-left tr.footable-editing{text-align:left}table.footable-editing button.footable-add,table.footable-editing button.footable-hide,table.footable-editing-show button.footable-show,table.footable-editing.footable-editing-always-show button.footable-hide,table.footable-editing.footable-editing-always-show button.footable-show,table.footable-editing.footable-editing-always-show.footable-editing-no-add tr.footable-editing{display:none}table.footable-editing.footable-editing-always-show button.footable-add,table.footable-editing.footable-editing-show button.footable-add,table.footable-editing.footable-editing-show button.footable-hide{display:inline-block} +table > tbody > tr > td > span.footable-toggle { + opacity: 0.7; +} \ No newline at end of file diff --git a/data/web/css/mailbox.css b/data/web/css/mailbox.css index 9f07debe..5004cda1 100644 --- a/data/web/css/mailbox.css +++ b/data/web/css/mailbox.css @@ -34,4 +34,4 @@ table.footable>tbody>tr.footable-empty>td { } .inputMissingAttr { border-color: #FF4136; -} +} \ No newline at end of file diff --git a/data/web/css/numberedtextarea.min.css b/data/web/css/numberedtextarea.min.css new file mode 100644 index 00000000..c147b16b --- /dev/null +++ b/data/web/css/numberedtextarea.min.css @@ -0,0 +1 @@ +div.numberedtextarea-wrapper{position:relative}div.numberedtextarea-wrapper textarea{display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}div.numberedtextarea-line-numbers{position:absolute;top:0;left:0;right:0;bottom:0;width:50px;border-right:none;color:rgba(0,0,0,.4);overflow:hidden}div.numberedtextarea-number{padding-right:6px;text-align:right}textarea#script_data{font-family:Monospace} \ No newline at end of file diff --git a/data/web/css/user.css b/data/web/css/user.css index 07d4e745..e24bebe4 100644 --- a/data/web/css/user.css +++ b/data/web/css/user.css @@ -30,3 +30,10 @@ table.footable>tbody>tr.footable-empty>td { .inputMissingAttr { border-color: #FF4136; } +#logText { + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word; +} \ No newline at end of file diff --git a/data/web/edit.php b/data/web/edit.php index fd6682ff..e06a0229 100644 --- a/data/web/edit.php +++ b/data/web/edit.php @@ -484,19 +484,25 @@ if (isset($_SESSION['mailcow_cc_role'])) {
-
- - -
-
- -
-
- +
+
+

Ratelimit

+
+
+
+ +
+
+ +
+
+ +
+
+

Filter

+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ + + diff --git a/data/web/inc/ajax/sieve_validation.php b/data/web/inc/ajax/sieve_validation.php new file mode 100644 index 00000000..d24a95dc --- /dev/null +++ b/data/web/inc/ajax/sieve_validation.php @@ -0,0 +1,23 @@ + 'danger', 'msg' => 'Script cannot be empty')); + exit(); + } + $sieve->parse($_GET['script']); + } + catch (Exception $e) { + echo json_encode(array('type' => 'danger', 'msg' => $e->getMessage())); + exit(); + } + echo json_encode(array('type' => 'success', 'msg' => $lang['add']['validation_success'])); +} +?> diff --git a/data/web/inc/ajax/sogo_ctrl.php b/data/web/inc/ajax/sogo_ctrl.php new file mode 100644 index 00000000..e238d9c0 --- /dev/null +++ b/data/web/inc/ajax/sogo_ctrl.php @@ -0,0 +1,39 @@ +OK' : 'Error: ' . $response['msg'] . ''; + if ($response['type'] == "success") { + break; + } + usleep(1500000); + $retry++; + } + echo (!isset($last_response)) ? 'Already running' : $last_response; +} + +if ($_GET['ACTION'] == "stop") { + $retry = 0; + while (docker('sogo-mailcow', 'info')['State']['Running'] == 1 && $retry <= 3) { + $response = docker('sogo-mailcow', 'post', 'stop'); + $response = json_decode($response, true); + $last_response = ($response['type'] == "success") ? 'OK' : 'Error: ' . $response['msg'] . ''; + if ($response['type'] == "success") { + break; + } + usleep(1500000); + $retry++; + } + echo (!isset($last_response)) ? 'Not running' : $last_response; +} + +?> diff --git a/data/web/inc/ajax/syncjob_logs.php b/data/web/inc/ajax/syncjob_logs.php new file mode 100644 index 00000000..a0568167 --- /dev/null +++ b/data/web/inc/ajax/syncjob_logs.php @@ -0,0 +1,15 @@ + diff --git a/data/web/inc/footer.inc.php b/data/web/inc/footer.inc.php index 8740612c..9246d230 100644 --- a/data/web/inc/footer.inc.php +++ b/data/web/inc/footer.inc.php @@ -8,6 +8,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/footer.php'; +