diff --git a/.github/workflows/update_postscreen_access_list.yml b/.github/workflows/update_postscreen_access_list.yml new file mode 100644 index 00000000..5d31eb9a --- /dev/null +++ b/.github/workflows/update_postscreen_access_list.yml @@ -0,0 +1,39 @@ +name: Update postscreen_access.cidr + +on: + schedule: + # Monthly + - cron: "0 0 1 * *" + workflow_dispatch: # Allow to run workflow manually + +permissions: + contents: read # to fetch code (actions/checkout) + + +jobs: + Update-postscreen_access_cidr: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Generate postscreen_access.cidr + run: | + bash helper-scripts/update_postscreen_whitelist.sh + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.mailcow_action_Update_postscreen_access_cidr_pat }} + commit-message: update postscreen_access.cidr + committer: milkmaker + author: milkmaker + signoff: false + branch: update/postscreen_access.cidr + base: staging + delete-branch: true + add-paths: | + data/conf/postfix/postscreen_access.cidr + title: '[Postfix] update postscreen_access.cidr' + body: | + This PR updates the postscreen_access.cidr using GitHub Actions and [helper-scripts/update_postscreen_whitelist.sh](https://github.com/mailcow/mailcow-dockerized/blob/master/helper-scripts/update_postscreen_whitelist.sh) \ No newline at end of file diff --git a/data/Dockerfiles/dockerapi/dockerapi.py b/data/Dockerfiles/dockerapi/dockerapi.py index 1ab651b5..7edb2e08 100644 --- a/data/Dockerfiles/dockerapi/dockerapi.py +++ b/data/Dockerfiles/dockerapi/dockerapi.py @@ -9,6 +9,7 @@ import os import json import asyncio import redis +import platform from datetime import datetime import logging from logging.config import dictConfig @@ -370,7 +371,7 @@ class DockerUtils: return exec_run_handler('utf8_text_only', sieve_return) # api call: container_post - post_action: exec - cmd: sieve - task: print def container_post__exec__sieve__print(self, container_id, request_json): - if 'username' in request.json and 'script_name' in request_json: + if 'username' in request_json and 'script_name' in request_json: for container in self.docker_client.containers.list(filters={"id": container_id}): cmd = ["/bin/bash", "-c", "/usr/bin/doveadm sieve get -u '" + request_json['username'].replace("'", "'\\''") + "' '" + request_json['script_name'].replace("'", "'\\''") + "'"] sieve_return = container.exec_run(cmd) @@ -485,7 +486,8 @@ async def get_host_stats(wait=5): "swap": psutil.swap_memory() }, "uptime": time.time() - psutil.boot_time(), - "system_time": system_time.strftime("%d.%m.%Y %H:%M:%S") + "system_time": system_time.strftime("%d.%m.%Y %H:%M:%S"), + "architecture": platform.machine() } redis_client.set('host_stats', json.dumps(host_stats), ex=10) diff --git a/data/Dockerfiles/phpfpm/docker-entrypoint.sh b/data/Dockerfiles/phpfpm/docker-entrypoint.sh index cefebcdf..37370113 100755 --- a/data/Dockerfiles/phpfpm/docker-entrypoint.sh +++ b/data/Dockerfiles/phpfpm/docker-entrypoint.sh @@ -172,6 +172,24 @@ BEGIN END; // DELIMITER ; +DROP EVENT IF EXISTS clean_sasl_log; +DELIMITER // +CREATE EVENT clean_sasl_log +ON SCHEDULE EVERY 1 DAY DO +BEGIN + DELETE sasl_log.* FROM sasl_log + LEFT JOIN ( + SELECT username, service, MAX(datetime) AS lastdate + FROM sasl_log + GROUP BY username, service + ) AS last ON sasl_log.username = last.username AND sasl_log.service = last.service + WHERE datetime < DATE_SUB(NOW(), INTERVAL 31 DAY) AND datetime < lastdate; + DELETE FROM sasl_log + WHERE username NOT IN (SELECT username FROM mailbox) AND + datetime < DATE_SUB(NOW(), INTERVAL 31 DAY); +END; +// +DELIMITER ; EOF fi diff --git a/data/conf/dovecot/dovecot.conf b/data/conf/dovecot/dovecot.conf index b7aca757..159e39f4 100644 --- a/data/conf/dovecot/dovecot.conf +++ b/data/conf/dovecot/dovecot.conf @@ -24,6 +24,11 @@ mail_plugins = 'danger', 'log' => array(__FUNCTION__, $_action, $_data, $_attr), diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index 4e036b99..4a2aa6a3 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -3965,6 +3965,39 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { } return $aliasdomaindata; break; + case 'shared_aliases': + $shared_aliases = array(); + $stmt = $pdo->query("SELECT `address` FROM `alias` + WHERE `goto` REGEXP ',' + AND `address` NOT LIKE '@%' + AND `goto` != `address`"); + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + while($row = array_shift($rows)) { + $domain = explode("@", $row['address'])[1]; + if (hasDomainAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $domain)) { + $shared_aliases[] = $row['address']; + } + } + + return $shared_aliases; + break; + case 'direct_aliases': + $direct_aliases = array(); + $stmt = $pdo->query("SELECT `address` FROM `alias` + WHERE `goto` NOT LIKE '%,%' + AND `address` NOT LIKE '@%' + AND `goto` != `address`"); + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + while($row = array_shift($rows)) { + $domain = explode("@", $row['address'])[1]; + if (hasDomainAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $domain)) { + $direct_aliases[] = $row['address']; + } + } + + return $direct_aliases; + break; case 'domains': $domains = array(); if ($_SESSION['mailcow_cc_role'] != "admin" && $_SESSION['mailcow_cc_role'] != "domainadmin") { @@ -4956,9 +4989,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { $stmt->execute(array( ':username' => $username )); - $stmt = $pdo->prepare("DELETE FROM `sender_acl` WHERE `logged_in_as` = :username"); + $stmt = $pdo->prepare("DELETE FROM `sender_acl` WHERE `logged_in_as` = :logged_in_as OR `send_as` = :send_as"); $stmt->execute(array( - ':username' => $username + ':logged_in_as' => $username, + ':send_as' => $username )); // fk, better safe than sorry $stmt = $pdo->prepare("DELETE FROM `user_acl` WHERE `username` = :username"); diff --git a/data/web/inc/triggers.inc.php b/data/web/inc/triggers.inc.php index fde1507f..c40453a2 100644 --- a/data/web/inc/triggers.inc.php +++ b/data/web/inc/triggers.inc.php @@ -63,7 +63,7 @@ if (isset($_POST["login_user"]) && isset($_POST["pass_user"])) { unset($_SESSION['index_query_string']); if (in_array('mobileconfig', $http_parameters)) { if (in_array('only_email', $http_parameters)) { - header("Location: /mobileconfig.php?email_only"); + header("Location: /mobileconfig.php?only_email"); die(); } header("Location: /mobileconfig.php"); diff --git a/data/web/js/build/013-mailcow.js b/data/web/js/build/013-mailcow.js index e060a2d0..e659915b 100644 --- a/data/web/js/build/013-mailcow.js +++ b/data/web/js/build/013-mailcow.js @@ -1,3 +1,13 @@ +const LOCALE = undefined; +const DATETIME_FORMAT = { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit" +}; + $(document).ready(function() { // mailcow alert box generator window.mailcow_alert_box = function(message, type) { diff --git a/data/web/js/site/debug.js b/data/web/js/site/debug.js index 55b6660b..20def23f 100644 --- a/data/web/js/site/debug.js +++ b/data/web/js/site/debug.js @@ -1,13 +1,3 @@ -const LOCALE = undefined; -const DATETIME_FORMAT = { - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - second: "2-digit" -}; - $(document).ready(function() { // Parse seconds ago to date // Get "now" timestamp @@ -43,7 +33,7 @@ $(document).ready(function() { if (mailcow_info.branch === "master"){ check_update(mailcow_info.version_tag, mailcow_info.project_url); } - $("#maiclow_version").click(function(){ + $("#mailcow_version").click(function(){ if (mailcow_cc_role !== "admin" && mailcow_cc_role !== "domainadmin" || mailcow_info.branch !== "master") return; @@ -829,13 +819,10 @@ jQuery(function($){ url: '/api/v1/get/rspamd/actions', async: true, success: function(data){ - console.log(data); - var total = 0; $(data).map(function(){total += this[1];}); var labels = $.makeArray($(data).map(function(){return this[0] + ' ' + Math.round(this[1]/total * 100) + '%';})); var values = $.makeArray($(data).map(function(){return this[1];})); - console.log(values); var graphdata = { labels: labels, @@ -951,12 +938,15 @@ jQuery(function($){ title: 'Score', data: 'score', defaultContent: '', + class: 'text-nowrap', createdCell: function(td, cellData) { $(td).attr({ "data-order": cellData.sortBy, "data-sort": cellData.sortBy }); - $(td).html(cellData.value); + }, + render: function (data) { + return data.value; } }, { @@ -979,7 +969,9 @@ jQuery(function($){ "data-order": cellData.sortBy, "data-sort": cellData.sortBy }); - $(td).html(cellData.value); + }, + render: function (data) { + return data.value; } }, { @@ -1302,6 +1294,12 @@ function update_stats(timeout=5){ $("#host_cpu_usage").text(parseInt(data.cpu.usage).toString() + "%"); $("#host_memory_total").text((data.memory.total / (1024 ** 3)).toFixed(2).toString() + "GB"); $("#host_memory_usage").text(parseInt(data.memory.usage).toString() + "%"); + if (data.architecture == "aarch64"){ + $("#host_architecture").html('' + data.architecture + ' ⚠️'); + } + else { + $("#host_architecture").html(data.architecture); + } // update cpu and mem chart var cpu_chart = Chart.getChart("host_cpu_chart"); diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index d7fca848..3ddeea94 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -1458,30 +1458,37 @@ jQuery(function($){ } function draw_bcc_table() { $.get("/api/v1/get/bcc-destination-options", function(data){ + var optgroup = ""; // Domains - var optgroup = ""; - $.each(data.domains, function(index, domain){ - optgroup += ""; - }); - optgroup += ""; - $('#bcc-local-dest').append(optgroup); - // Alias domains - var optgroup = ""; - $.each(data.alias_domains, function(index, alias_domain){ - optgroup += ""; - }); - optgroup += "" - $('#bcc-local-dest').append(optgroup); - // Mailboxes and aliases - $.each(data.mailboxes, function(mailbox, aliases){ - var optgroup = ""; - $.each(aliases, function(index, alias){ - optgroup += ""; + if (data.domains && data.domains.length > 0) { + optgroup = ""; + $.each(data.domains, function(index, domain){ + optgroup += ""; }); optgroup += ""; $('#bcc-local-dest').append(optgroup); - }); - // Finish + } + // Alias domains + if (data.alias_domains && data.alias_domains.length > 0) { + optgroup = ""; + $.each(data.alias_domains, function(index, alias_domain){ + optgroup += ""; + }); + optgroup += "" + $('#bcc-local-dest').append(optgroup); + } + // Mailboxes and aliases + if (data.mailboxes && Object.keys(data.mailboxes).length > 0) { + $.each(data.mailboxes, function(mailbox, aliases){ + optgroup = ""; + $.each(aliases, function(index, alias){ + optgroup += ""; + }); + optgroup += ""; + $('#bcc-local-dest').append(optgroup); + }); + } + // Recreate picker $('#bcc-local-dest').selectpicker('refresh'); }); @@ -2326,16 +2333,19 @@ jQuery(function($){ // detect element visibility changes function onVisible(element, callback) { $(document).ready(function() { - element_object = document.querySelector(element); + let element_object = document.querySelector(element); if (element_object === null) return; - new IntersectionObserver((entries, observer) => { + let observer = new IntersectionObserver((entries, observer) => { entries.forEach(entry => { if(entry.intersectionRatio > 0) { callback(element_object); + observer.unobserve(element_object); } }); - }).observe(element_object); + }) + + observer.observe(element_object); }); } diff --git a/data/web/js/site/user.js b/data/web/js/site/user.js index b2139829..2227e0b0 100644 --- a/data/web/js/site/user.js +++ b/data/web/js/site/user.js @@ -127,6 +127,20 @@ jQuery(function($){ } } + + function createSortableDate(td, cellData, date_string = false) { + if (date_string) + var date = new Date(cellData); + else + var date = new Date(cellData ? cellData * 1000 : 0); + + var timestamp = date.getTime(); + $(td).attr({ + "data-order": timestamp, + "data-sort": timestamp + }); + $(td).html(date.toLocaleDateString(LOCALE, DATETIME_FORMAT)); + } function draw_tla_table() { // just recalc width if instance already exists if ($.fn.DataTable.isDataTable('#tla_table') ) { @@ -144,6 +158,7 @@ jQuery(function($){ "tr" + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", language: lang_datatables, + order: [[4, 'desc']], ajax: { type: "GET", url: "/api/v1/get/time_limited_aliases", @@ -191,18 +206,16 @@ jQuery(function($){ title: lang.alias_valid_until, data: 'validity', defaultContent: '', - render: function (data, type) { - var date = new Date(data ? data * 1000 : 0); - return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"}); + createdCell: function(td, cellData) { + createSortableDate(td, cellData) } }, { title: lang.created_on, data: 'created', defaultContent: '', - render: function (data, type) { - var date = new Date(data.replace(/-/g, "/")); - return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"}); + createdCell: function(td, cellData) { + createSortableDate(td, cellData, true) } }, { diff --git a/data/web/lang/lang.cs-cz.json b/data/web/lang/lang.cs-cz.json index 712b8c77..d4f62495 100644 --- a/data/web/lang/lang.cs-cz.json +++ b/data/web/lang/lang.cs-cz.json @@ -541,7 +541,7 @@ "inactive": "Neaktivní", "kind": "Druh", "last_modified": "Naposledy změněn", - "lookup_mx": "Cíl je regulární výraz který se shoduje s MX záznamem (.*google\\.com směřuje veškerou poštu na MX které jsou cílem pro google.com přes tento skok)", + "lookup_mx": "Cíl je regulární výraz který se shoduje s MX záznamem (.*\\.google\\.com směřuje veškerou poštu na MX které jsou cílem pro google.com přes tento skok)", "mailbox": "Úprava mailové schránky", "mailbox_quota_def": "Výchozí kvóta schránky", "mailbox_relayhost_info": "Aplikované jen na uživatelskou schránku a přímé aliasy, přepisuje předávající server domény.", diff --git a/data/web/lang/lang.de-de.json b/data/web/lang/lang.de-de.json index 4bd4b3fa..6b280bbb 100644 --- a/data/web/lang/lang.de-de.json +++ b/data/web/lang/lang.de-de.json @@ -216,7 +216,7 @@ "loading": "Bitte warten...", "login_time": "Zeit", "logo_info": "Die hochgeladene Grafik wird für die Navigationsleiste auf eine Höhe von 40px skaliert. Für die Darstellung auf der Login-Maske beträgt die skalierte Breite maximal 250px. Eine frei skalierbare Grafik (etwa SVG) wird empfohlen.", - "lookup_mx": "Ziel mit MX vergleichen (Regex, etwa .*google\\.com, um alle Ziele mit MX *google.com zu routen)", + "lookup_mx": "Ziel mit MX vergleichen (Regex, etwa .*\\.google\\.com, um alle Ziele mit MX *google.com zu routen)", "main_name": "\"mailcow UI\" Name", "merged_vars_hint": "Ausgegraute Reihen wurden aus der Datei vars.(local.)inc.php gelesen und können hier nicht verändert werden.", "message": "Nachricht", @@ -498,6 +498,7 @@ } }, "debug": { + "architecture": "Architektur", "chart_this_server": "Chart (dieser Server)", "containers_info": "Container-Information", "container_running": "Läuft", @@ -534,7 +535,8 @@ "update_available": "Es ist ein Update verfügbar", "no_update_available": "Das System ist auf aktuellem Stand", "update_failed": "Es konnte nicht nach einem Update gesucht werden", - "username": "Benutzername" + "username": "Benutzername", + "wip": "Aktuell noch in Arbeit" }, "diagnostics": { "cname_from_a": "Wert abgeleitet von A/AAAA-Eintrag. Wird unterstützt, sofern der Eintrag auf die korrekte Ressource zeigt.", @@ -593,7 +595,7 @@ "inactive": "Inaktiv", "kind": "Art", "last_modified": "Zuletzt geändert", - "lookup_mx": "Ziel mit MX vergleichen (Regex, etwa .*google\\.com, um alle Ziele mit MX *google.com zu routen)", + "lookup_mx": "Ziel mit MX vergleichen (Regex, etwa .*\\.google\\.com, um alle Ziele mit MX *google.com zu routen)", "mailbox": "Mailbox bearbeiten", "mailbox_quota_def": "Standard-Quota einer Mailbox", "mailbox_relayhost_info": "Wird auf eine Mailbox und direkte Alias-Adressen angewendet. Überschreibt die Einstellung einer Domain.", diff --git a/data/web/lang/lang.en-gb.json b/data/web/lang/lang.en-gb.json index df83987c..e53fe896 100644 --- a/data/web/lang/lang.en-gb.json +++ b/data/web/lang/lang.en-gb.json @@ -218,7 +218,7 @@ "loading": "Please wait...", "login_time": "Login time", "logo_info": "Your image will be scaled to a height of 40px for the top navigation bar and a max. width of 250px for the start page. A scalable graphic is highly recommended.", - "lookup_mx": "Destination is a regular expression to match against MX name (.*google\\.com to route all mail targeted to a MX ending in google.com over this hop)", + "lookup_mx": "Destination is a regular expression to match against MX name (.*\\.google\\.com to route all mail targeted to a MX ending in google.com over this hop)", "main_name": "\"mailcow UI\" name", "merged_vars_hint": "Greyed out rows were merged from vars.(local.)inc.php and cannot be modified.", "message": "Message", @@ -498,6 +498,7 @@ } }, "debug": { + "architecture": "Architecture", "chart_this_server": "Chart (this server)", "containers_info": "Container information", "container_running": "Running", @@ -534,7 +535,8 @@ "update_available": "There is an update available", "no_update_available": "The System is on the latest version", "update_failed": "Could not check for an Update", - "username": "Username" + "username": "Username", + "wip": "Currently Work in Progress" }, "diagnostics": { "cname_from_a": "Value derived from A/AAAA record. This is supported as long as the record points to the correct resource.", @@ -593,7 +595,7 @@ "inactive": "Inactive", "kind": "Kind", "last_modified": "Last modified", - "lookup_mx": "Destination is a regular expression to match against MX name (.*google\\.com to route all mail targeted to a MX ending in google.com over this hop)", + "lookup_mx": "Destination is a regular expression to match against MX name (.*\\.google\\.com to route all mail targeted to a MX ending in google.com over this hop)", "mailbox": "Edit mailbox", "mailbox_quota_def": "Default mailbox quota", "mailbox_relayhost_info": "Applied to the mailbox and direct aliases only, does override a domain relayhost.", diff --git a/data/web/lang/lang.fr-fr.json b/data/web/lang/lang.fr-fr.json index d64f62f7..0bc0ba02 100644 --- a/data/web/lang/lang.fr-fr.json +++ b/data/web/lang/lang.fr-fr.json @@ -588,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": { diff --git a/data/web/lang/lang.it-it.json b/data/web/lang/lang.it-it.json index 4d21547c..0d5b3f25 100644 --- a/data/web/lang/lang.it-it.json +++ b/data/web/lang/lang.it-it.json @@ -213,7 +213,7 @@ "loading": "Caricamento in corso...", "login_time": "Ora di accesso", "logo_info": "La tua immagine verrà ridimensionata a 40px di altezza, quando verrà usata nella barra di navigazione in alto, ed ad una larghezza massima di 250px nella schermata iniziale. È altamente consigliato l'utilizzo di un'immagine modulabile.", - "lookup_mx": "Destination is a regular expression to match against MX name (.*google\\.com to route all mail targeted to a MX ending in google.com over this hop)", + "lookup_mx": "Destination is a regular expression to match against MX name (.*\\.google\\.com to route all mail targeted to a MX ending in google.com over this hop)", "main_name": "Nome \"mailcow UI\"", "merged_vars_hint": "Greyed out rows were merged from vars.(local.)inc.php and cannot be modified.", "message": "Messaggio", @@ -554,7 +554,7 @@ "hostname": "Hostname", "inactive": "Inattivo", "kind": "Genere", - "lookup_mx": "Destination is a regular expression to match against MX name (.*google\\.com to route all mail targeted to a MX ending in google.com over this hop)", + "lookup_mx": "Destination is a regular expression to match against MX name (.*\\.google\\.com to route all mail targeted to a MX ending in google.com over this hop)", "mailbox": "Modifica casella di posta", "mailbox_quota_def": "Default mailbox quota", "mailbox_relayhost_info": "Applied to the mailbox and direct aliases only, does override a domain relayhost.", diff --git a/data/web/lang/lang.ro-ro.json b/data/web/lang/lang.ro-ro.json index 8e6e1d45..e6315db0 100644 --- a/data/web/lang/lang.ro-ro.json +++ b/data/web/lang/lang.ro-ro.json @@ -539,7 +539,7 @@ "inactive": "Inactiv", "kind": "Fel", "last_modified": "Ultima modificare", - "lookup_mx": "Destinația este o expresie regulată care potrivită cu numele MX (.*google\\.com pentru a direcționa toate e-mailurile vizate către un MX care se termină în google.com peste acest hop)", + "lookup_mx": "Destinația este o expresie regulată care potrivită cu numele MX (.*\\.google\\.com pentru a direcționa toate e-mailurile vizate către un MX care se termină în google.com peste acest hop)", "mailbox": "Editează căsuța poștală", "mailbox_quota_def": "Cota implicită a căsuței poștale", "mailbox_relayhost_info": "Aplicat numai căsuței poștale și aliasurilor directe, suprascrie un transport dependent de domeniu.", diff --git a/data/web/lang/lang.ru-ru.json b/data/web/lang/lang.ru-ru.json index 65dd4bae..bad64184 100644 --- a/data/web/lang/lang.ru-ru.json +++ b/data/web/lang/lang.ru-ru.json @@ -336,7 +336,9 @@ "validate_license_now": "Получить лицензию на основе GUID с сервера лицензий", "verify": "Проверить", "yes": "✓", - "queue_unban": "разблокировать" + "queue_unban": "разблокировать", + "f2b_ban_time_increment": "Время бана увеличивается с каждым баном", + "f2b_max_ban_time": "Максимальное время блокировки" }, "danger": { "access_denied": "Доступ запрещён, или указаны неверные данные", diff --git a/data/web/lang/lang.sk-sk.json b/data/web/lang/lang.sk-sk.json index 2b93650f..29b36c44 100644 --- a/data/web/lang/lang.sk-sk.json +++ b/data/web/lang/lang.sk-sk.json @@ -213,7 +213,7 @@ "loading": "Čakajte prosím ...", "login_time": "Čas prihlásenia", "logo_info": "Váš obrázok bude upravený na výšku 40px pre vrchný navigačný riadok a na maximálnu šírku 250px pre úvodnú stránku. Odporúča sa škálovateľná grafika.", - "lookup_mx": "Cieľ je regulárny výraz ktorý sa porovnáva s MX záznamom (.*google\\.com smeruje všetku poštu určenú pre MX ktoré sú cieľom pre google.com cez tento skok)", + "lookup_mx": "Cieľ je regulárny výraz ktorý sa porovnáva s MX záznamom (.*\\.google\\.com smeruje všetku poštu určenú pre MX ktoré sú cieľom pre google.com cez tento skok)", "main_name": "\"mailcow UI\" názov", "merged_vars_hint": "Sivé riadky boli načítané z vars.(local.)inc.php a nemôžu byť modifikované cez UI.", "message": "Správa", @@ -539,7 +539,7 @@ "inactive": "Neaktívny", "kind": "Druh", "last_modified": "Naposledy upravené", - "lookup_mx": "Cieľ je regulárny výraz ktorý sa zhoduje s MX záznamom (.*google\\.com smeruje všetku poštu na MX ktoré sú cieľom pre google.com cez tento skok)", + "lookup_mx": "Cieľ je regulárny výraz ktorý sa zhoduje s MX záznamom (.*\\.google\\.com smeruje všetku poštu na MX ktoré sú cieľom pre google.com cez tento skok)", "mailbox": "Upraviť mailovú schránku", "mailbox_quota_def": "Predvolená veľkosť mailovej schránky", "mailbox_relayhost_info": "Aplikované len na používateľské schránky a priame aliasy, prepisuje doménového preposielateľa.", diff --git a/data/web/lang/lang.zh-cn.json b/data/web/lang/lang.zh-cn.json index e57ea2a7..90888efd 100644 --- a/data/web/lang/lang.zh-cn.json +++ b/data/web/lang/lang.zh-cn.json @@ -213,7 +213,7 @@ "loading": "请等待...", "login_time": "登录时间", "logo_info": "你的图片将会在顶部导航栏被缩放为 40px 高,在起始页被缩放为最大 250px 高。强烈推荐使用能较好适应缩放的图片。", - "lookup_mx": "应当为一个正则表达式,用于匹配 MX 记录 (例如 .*google\\.com 将转发所有拥有以 google.com 结尾的 MX 记录的邮件)", + "lookup_mx": "应当为一个正则表达式,用于匹配 MX 记录 (例如 .*\\.google\\.com 将转发所有拥有以 google.com 结尾的 MX 记录的邮件)", "main_name": "Mailcow UI 的名称", "merged_vars_hint": "灰色行来自 vars.(local.)inc.php 文件并且无法修改。", "message": "消息", @@ -544,7 +544,7 @@ "hostname": "主机名", "inactive": "禁用", "kind": "类型", - "lookup_mx": "应当为一个正则表达式,用于匹配 MX 记录 (例如 .*google\\.com 将转发所有拥有以 google.com 结尾的 MX 记录的邮件)", + "lookup_mx": "应当为一个正则表达式,用于匹配 MX 记录 (例如 .*\\.google\\.com 将转发所有拥有以 google.com 结尾的 MX 记录的邮件)", "mailbox": "编辑邮箱", "mailbox_quota_def": "邮箱默认配额", "mailbox_relayhost_info": "只适用于邮箱和邮箱别名,不会覆盖域名的中继主机。", diff --git a/data/web/lang/lang.zh-tw.json b/data/web/lang/lang.zh-tw.json index 916188db..ff9ed334 100644 --- a/data/web/lang/lang.zh-tw.json +++ b/data/web/lang/lang.zh-tw.json @@ -213,7 +213,7 @@ "loading": "請稍等...", "login_time": "登入時間", "logo_info": "你的起始頁面圖片會在頂部導覽列的限制下被縮放為 40px 高,以及最大 250px 高度。強烈推薦使用能較好縮放的圖片。", - "lookup_mx": "目的地是可以用來匹配 MX 紀錄的正規表達式 (.*google\\.com 會將所有 MX 結尾於 google.com 的郵件轉發到此主機。)", + "lookup_mx": "目的地是可以用來匹配 MX 紀錄的正規表達式 (.*\\.google\\.com 會將所有 MX 結尾於 google.com 的郵件轉發到此主機。)", "main_name": "\"mailcow UI\" 名稱", "merged_vars_hint": "灰色列來自 vars.(local.)inc.php 並且不能修改。", "message": "訊息", @@ -540,7 +540,7 @@ "inactive": "停用", "kind": "種類", "last_modified": "上次修改時間", - "lookup_mx": "目的地是可以用來匹配 MX 紀錄的正規表達式 (.*google\\.com 會將所有 MX 結尾於 google.com 的郵件轉發到此主機。)", + "lookup_mx": "目的地是可以用來匹配 MX 紀錄的正規表達式 (.*\\.google\\.com 會將所有 MX 結尾於 google.com 的郵件轉發到此主機。)", "mailbox": "編輯信箱", "mailbox_quota_def": "預設信箱容量配額", "mailbox_relayhost_info": "只會套用於信箱和直接別名,不會覆寫域名中繼主機。", diff --git a/data/web/templates/debug.twig b/data/web/templates/debug.twig index d24d7ed6..adc19b26 100644 --- a/data/web/templates/debug.twig +++ b/data/web/templates/debug.twig @@ -49,6 +49,12 @@

{{ hostname }}

+ + {{ lang.debug.architecture }} +
+

-

+
+ IPs @@ -70,7 +76,7 @@ Version diff --git a/data/web/templates/user.twig b/data/web/templates/user.twig index 22cc00d0..5536abe4 100644 --- a/data/web/templates/user.twig +++ b/data/web/templates/user.twig @@ -12,11 +12,21 @@
  • + {% if acl.spam_alias == 1 %} + {% endif %} + {% if acl.spam_score == 1 %} + {% endif %} + {% if acl.syncjobs == 1 %} + {% endif %} + {% if acl.app_passwds == 1 %} + {% endif %} + {% if acl.pushover == 1 %} + {% endif %}
    @@ -25,11 +35,11 @@ {% include 'user/tab-user-auth.twig' %} {% include 'user/tab-user-details.twig' %} {% include 'user/tab-user-settings.twig' %} - {% include 'user/SpamAliases.twig' %} - {% include 'user/Spamfilter.twig' %} - {% include 'user/Syncjobs.twig' %} - {% include 'user/AppPasswds.twig' %} - {% include 'user/Pushover.twig' %} + {% if acl.spam_alias == 1 %}{% include 'user/SpamAliases.twig' %}{% endif %} + {% if acl.spam_score == 1 %}{% include 'user/Spamfilter.twig' %}{% endif %} + {% if acl.syncjobs == 1 %}{% include 'user/Syncjobs.twig' %}{% endif %} + {% if acl.app_passwds == 1 %}{% include 'user/AppPasswds.twig' %}{% endif %} + {% if acl.pushover == 1 %}{% include 'user/Pushover.twig' %}{% endif %}
    diff --git a/docker-compose.yml b/docker-compose.yml index 23bd308f..f53b54c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -106,7 +106,7 @@ services: - rspamd php-fpm-mailcow: - image: mailcow/phpfpm:1.83 + image: mailcow/phpfpm:1.84 command: "php-fpm -d date.timezone=${TZ} -d expose_php=0" depends_on: - redis-mailcow @@ -510,7 +510,7 @@ services: - watchdog dockerapi-mailcow: - image: mailcow/dockerapi:2.03 + image: mailcow/dockerapi:2.04 security_opt: - label=disable restart: always diff --git a/helper-scripts/docker-compose.override.yml.d/EXTERNAL_MYSQL_SOCKET/docker-compose.override.yml b/helper-scripts/docker-compose.override.yml.d/EXTERNAL_MYSQL_SOCKET/docker-compose.override.yml index 8fcc6fff..f014ea67 100644 --- a/helper-scripts/docker-compose.override.yml.d/EXTERNAL_MYSQL_SOCKET/docker-compose.override.yml +++ b/helper-scripts/docker-compose.override.yml.d/EXTERNAL_MYSQL_SOCKET/docker-compose.override.yml @@ -26,6 +26,6 @@ services: - /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock mysql-mailcow: - image: alpine:3.17 + image: alpine:3.18 command: /bin/true restart: "no" diff --git a/helper-scripts/update_postscreen_whitelist.sh b/helper-scripts/update_postscreen_whitelist.sh index 8dd1b834..04335bda 100644 --- a/helper-scripts/update_postscreen_whitelist.sh +++ b/helper-scripts/update_postscreen_whitelist.sh @@ -6,7 +6,7 @@ SPFTOOLS_DIR=${WORKING_DIR}/spf-tools POSTWHITE_DIR=${WORKING_DIR}/postwhite POSTWHITE_CONF=${POSTWHITE_DIR}/postwhite.conf -COSTOM_HOSTS="web.de gmx.net mail.de freenet.de arcor.de unity-mail.de" +CUSTOM_HOSTS='"web.de gmx.net mail.de freenet.de arcor.de unity-mail.de"' STATIC_HOSTS=( "194.25.134.0/24 permit # t-online.de" ) @@ -19,16 +19,23 @@ function set_config() { sudo sed -i "s@^\($1\s*=\s*\).*\$@\1$2@" ${POSTWHITE_CONF} } -set_config custom_hosts ${COSTOM_HOSTS} +set_config custom_hosts "${CUSTOM_HOSTS}" set_config reload_postfix no set_config postfixpath /. set_config spftoolspath ${WORKING_DIR}/spf-tools set_config whitelist .${SCRIPT_DIR}/../data/conf/postfix/postscreen_access.cidr set_config yahoo_static_hosts ${POSTWHITE_DIR}/yahoo_static_hosts.txt +#Fix URL for Yahoo!: https://github.com/stevejenkins/postwhite/issues/59 +sudo sed -i \ + -e 's#yahoo_url="https://help.yahoo.com/kb/SLN23997.html"#yahoo_url="https://senders.yahooinc.com/outbound-mail-servers/"#' \ + -e 's#echo "ipv6:$line";#echo "ipv6:$line" | grep -v "ipv6:::";#' \ + -e 's#`command -v wget`#`command -v skip-wget`#' \ + ${POSTWHITE_DIR}/scrape_yahoo + cd ${POSTWHITE_DIR} ./postwhite ${POSTWHITE_CONF} ( IFS=$'\n'; echo "${STATIC_HOSTS[*]}" >> "${SCRIPT_DIR}/../data/conf/postfix/postscreen_access.cidr") -rm -r ${WORKING_DIR} +rm -r ${WORKING_DIR} \ No newline at end of file diff --git a/update.sh b/update.sh index 73ee975c..5d5b4f10 100755 --- a/update.sh +++ b/update.sh @@ -188,7 +188,7 @@ if ! [[ "${DOCKER_COMPOSE_VERSION}" =~ ^(native|standalone)$ ]]; then echo -e "\e[33mNotice: You'll have to update this Compose Version via your Package Manager manually!\e[0m" else echo -e "\e[31mCannot find Docker Compose with a Version Higher than 2.X.X.\e[0m" - echo -e "\e[31mPlease update/install it manually regarding to this doc site: https://docs.mailcow.email/mailcow-dockerized-docs/i_u_m/i_u_m_install/\e[0m" + echo -e "\e[31mPlease update/install it manually regarding to this doc site: https://docs.mailcow.email/i_u_m/i_u_m_install/\e[0m" exit 1 fi elif docker-compose > /dev/null 2>&1; then @@ -203,14 +203,14 @@ if ! [[ "${DOCKER_COMPOSE_VERSION}" =~ ^(native|standalone)$ ]]; then echo -e "\e[33mNotice: For an automatic update of docker-compose please use the update_compose.sh scripts located at the helper-scripts folder.\e[0m" else echo -e "\e[31mCannot find Docker Compose with a Version Higher than 2.X.X.\e[0m" - echo -e "\e[31mPlease update/install regarding to this doc site: https://docs.mailcow.email/mailcow-dockerized-docs/i_u_m/i_u_m_install/\e[0m" + echo -e "\e[31mPlease update/install regarding to this doc site: https://docs.mailcow.email/i_u_m/i_u_m_install/\e[0m" exit 1 fi fi else echo -e "\e[31mCannot find Docker Compose.\e[0m" - echo -e "\e[31mPlease install it regarding to this doc site: https://docs.mailcow.email/mailcow-dockerized-docs/i_u_m/i_u_m_install/\e[0m" + echo -e "\e[31mPlease install it regarding to this doc site: https://docs.mailcow.email/i_u_m/i_u_m_install/\e[0m" exit 1 fi @@ -223,7 +223,7 @@ elif [ "${DOCKER_COMPOSE_VERSION}" == "native" ]; then if ! $COMPOSE_COMMAND > /dev/null 2>&1 || ! $COMPOSE_COMMAND --version | grep "^2." > /dev/null 2>&1; then # IF it cannot find Standalone in > 2.X, then script stops echo -e "\e[31mCannot find Docker Compose or the Version is lower then 2.X.X.\e[0m" - echo -e "\e[31mPlease install it regarding to this doc site: https://docs.mailcow.email/mailcow-dockerized-docs/i_u_m/i_u_m_install/\e[0m" + echo -e "\e[31mPlease install it regarding to this doc site: https://docs.mailcow.email/i_u_m/i_u_m_install/\e[0m" exit 1 fi # If it finds the standalone Plugin it will use this instead and change the mailcow.conf Variable accordingly @@ -243,7 +243,7 @@ elif [ "${DOCKER_COMPOSE_VERSION}" == "standalone" ]; then if ! $COMPOSE_COMMAND > /dev/null 2>&1; then # IF it cannot find Native in > 2.X, then script stops echo -e "\e[31mCannot find Docker Compose.\e[0m" - echo -e "\e[31mPlease install it regarding to this doc site: https://docs.mailcow.email/mailcow-dockerized-docs/i_u_m/i_u_m_install/\e[0m" + echo -e "\e[31mPlease install it regarding to this doc site: https://docs.mailcow.email/i_u_m/i_u_m_install/\e[0m" exit 1 fi # If it finds the native Plugin it will use this instead and change the mailcow.conf Variable accordingly