From 263cb96786c01ceb0c17ab303559bb7297f8eca3 Mon Sep 17 00:00:00 2001 From: l-with <53109379+l-with@users.noreply.github.com> Date: Tue, 19 Jul 2022 20:22:45 +0200 Subject: [PATCH 1/6] Improve domain api schema (#4689) * change response of add domain to array * add tags to request body of add domain * add gal to request body of add domain * add relay_unknown_only to request body of add domain * add relay_unknown_only to request body of edit domain * add rl_frame, rl_value to request body of edit domain * fix indentation * add tags to request body of edit domain * change response of edit domain to array * Revert "change response of edit domain to array" This reverts commit 692384e21b6dad5fcfeab8b5be572404981dce5b. * change response type of edit domain to application/json * change response type of edit domain * change items in body of edit domain to array of strings * change response of edit domain to array * fix indentation * revert changing response type of edit domain-admin * change response type of edit domain to array * fix response type of edit domains * change msg in response of edit domains to array * change items in body of delete domain to array of strings * change request body of delete domain to array of strings * fix * remove properties * change request body of delete domain to array of strings (fix) * change reponse type of delete domain to array --- data/web/api/openapi.yaml | 142 ++++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 51 deletions(-) diff --git a/data/web/api/openapi.yaml b/data/web/api/openapi.yaml index 3803e5bdf..8fb6245c8 100644 --- a/data/web/api/openapi.yaml +++ b/data/web/api/openapi.yaml @@ -518,21 +518,23 @@ paths: - domain.tld type: success schema: - properties: - log: - description: contains request object - items: {} - type: array - msg: - items: {} - type: array - type: - enum: - - success - - danger - - error - type: string - type: object + type: array + items: + type: object + properties: + log: + description: contains request object + items: {} + type: array + msg: + items: {} + type: array + type: + enum: + - success + - danger + - error + type: string description: OK headers: {} tags: @@ -579,6 +581,11 @@ paths: domain: description: Fully qualified domain name type: string + gal: + description: >- + is domain global address list active or not, it enables + shared contacts accross domain in SOGo webmail + type: boolean mailboxes: description: limit count of mailboxes associated with this domain type: number @@ -596,6 +603,9 @@ paths: if not, them you have to create "dummy" mailbox for each address to relay type: boolean + relay_unknown_only: + description: Relay non-existing mailboxes only. Existing mailboxes will be delivered locally. + type: boolean rl_frame: enum: - s @@ -606,6 +616,11 @@ paths: rl_value: description: rate limit value type: number + tags: + description: tags for this Domain + type: array + items: + type: string type: object summary: Create domain /api/v1/add/domain-admin: @@ -1952,21 +1967,23 @@ paths: - domain2.tld type: success schema: - properties: - log: - description: contains request object - items: {} - type: array - msg: - items: {} - type: array - type: - enum: - - success - - danger - - error - type: string - type: object + type: array + items: + type: object + properties: + log: + description: contains request object + items: {} + type: array + msg: + items: {} + type: array + type: + enum: + - success + - danger + - error + type: string description: OK headers: {} tags: @@ -1977,14 +1994,15 @@ paths: content: application/json: schema: + type: object example: - domain.tld - domain2.tld properties: - items: - description: contains list of domains you want to delete - type: object - type: object + items: + type: array + items: + type: string summary: Delete domain /api/v1/delete/domain-admin: post: @@ -2972,23 +2990,25 @@ paths: $ref: "#/components/responses/Unauthorized" "200": content: - "*/*": + application/json: schema: - properties: - log: - description: contains request object - items: {} - type: array - msg: - items: {} - type: array - type: - enum: - - success - - danger - - error - type: string - type: object + type: array + items: + type: object + properties: + log: + type: array + description: contains request object + items: {} + msg: + type: array + items: {} + type: + enum: + - success + - danger + - error + type: string description: OK headers: {} tags: @@ -3056,13 +3076,33 @@ paths: if not, them you have to create "dummy" mailbox for each address to relay type: boolean + relay_unknown_only: + description: Relay non-existing mailboxes only. Existing mailboxes will be delivered locally. + type: boolean relayhost: description: id of relayhost type: number + rl_frame: + enum: + - s + - m + - h + - d + type: string + rl_value: + description: rate limit value + type: number + tags: + description: tags for this Domain + type: array + items: + type: string type: object items: description: contains list of domain names you want update - type: object + type: array + items: + type: string type: object summary: Update domain /api/v1/edit/fail2ban: From 7c7c67948efc79b169ed013a7b42da50f0b5ae44 Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 19 Jul 2022 20:24:24 +0200 Subject: [PATCH 2/6] Use yaml list style in docker build workflow (#4688) * Use yaml list style * Mailcow -> mailcow --- .github/workflows/image_builds.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/image_builds.yml b/.github/workflows/image_builds.yml index 34d05717a..007b10147 100644 --- a/.github/workflows/image_builds.yml +++ b/.github/workflows/image_builds.yml @@ -1,4 +1,4 @@ -name: Build Mailcow Docker Images +name: Build mailcow Docker Images on: push: @@ -9,19 +9,20 @@ jobs: docker_image_builds: strategy: matrix: - images: ["acme-mailcow", - "clamd-mailcow", - "dockerapi-mailcow", - "dovecot-mailcow", - "netfilter-mailcow", - "olefy-mailcow", - "php-fpm-mailcow", - "postfix-mailcow", - "rspamd-mailcow", - "sogo-mailcow", - "solr-mailcow", - "unbound-mailcow", - "watchdog-mailcow"] + images: + - "acme-mailcow" + - "clamd-mailcow" + - "dockerapi-mailcow" + - "dovecot-mailcow" + - "netfilter-mailcow" + - "olefy-mailcow" + - "php-fpm-mailcow" + - "postfix-mailcow" + - "rspamd-mailcow" + - "sogo-mailcow" + - "solr-mailcow" + - "unbound-mailcow" + - "watchdog-mailcow" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 4bf38bf00fe960261dc5097fffb01a0b579d7735 Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 19 Jul 2022 20:31:25 +0200 Subject: [PATCH 3/6] Mailcow -> mailcow (#4687) --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index c31a1a624..7d6c4ac26 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -1,4 +1,4 @@ -name: Mailcow Integration Tests +name: mailcow Integration Tests on: push: From c9ab8b2eff5f326c496179056768b738c681e2eb Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 19 Jul 2022 21:43:24 +0200 Subject: [PATCH 4/6] [GH-Actions][stale] Upgrade to v5.1.0 and add close-issue-reason --- .github/workflows/close_old_issues_and_prs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/close_old_issues_and_prs.yml b/.github/workflows/close_old_issues_and_prs.yml index e746bc6fb..934720493 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@v5.0.0 + uses: actions/stale@v5.1.0 with: repo-token: ${{ secrets.STALE_ACTION_PAT }} days-before-stale: 60 @@ -30,6 +30,7 @@ jobs: stale-issue-label: "stale" stale-pr-label: "stale" exempt-draft-pr: "true" + close-issue-reason: "not_planned" operations-per-run: "250" ascending: "true" #DRY-RUN From 4c10525078724dbc65422704617b52582928198f Mon Sep 17 00:00:00 2001 From: Erisa A Date: Tue, 26 Jul 2022 08:16:23 +0100 Subject: [PATCH 5/6] [Web] Update keyHandle max length to 1023 (#4696) https://w3c.github.io/webauthn/#credential-id Co-authored-by: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> --- data/web/inc/init_db.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/web/inc/init_db.inc.php b/data/web/inc/init_db.inc.php index c80c398b3..b47bd5c23 100644 --- a/data/web/inc/init_db.inc.php +++ b/data/web/inc/init_db.inc.php @@ -3,7 +3,7 @@ function init_db_schema() { try { global $pdo; - $db_version = "13072022_1700"; + $db_version = "25072022_2300"; $stmt = $pdo->query("SHOW TABLES LIKE 'versions'"); $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC)); @@ -738,7 +738,7 @@ function init_db_schema() { "username" => "VARCHAR(255) NOT NULL", "authmech" => "ENUM('yubi_otp', 'u2f', 'hotp', 'totp', 'webauthn')", "secret" => "VARCHAR(255) DEFAULT NULL", - "keyHandle" => "VARCHAR(255) DEFAULT NULL", + "keyHandle" => "VARCHAR(1023) DEFAULT NULL", "publicKey" => "VARCHAR(4096) DEFAULT NULL", "counter" => "INT NOT NULL DEFAULT '0'", "certificate" => "TEXT", From 44a6f09a095b946487c5fa569edd6803d4754fea Mon Sep 17 00:00:00 2001 From: Niklas Meyer Date: Fri, 29 Jul 2022 14:08:26 +0200 Subject: [PATCH 6/6] [CLAMAV] Update to 0.105.1 --- data/Dockerfiles/clamd/Dockerfile | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/Dockerfiles/clamd/Dockerfile b/data/Dockerfiles/clamd/Dockerfile index cba56e035..efbc6a4dc 100644 --- a/data/Dockerfiles/clamd/Dockerfile +++ b/data/Dockerfiles/clamd/Dockerfile @@ -1,4 +1,4 @@ -FROM clamav/clamav:0.105.0_base +FROM clamav/clamav:0.105.1_base LABEL maintainer "André Peters " diff --git a/docker-compose.yml b/docker-compose.yml index 65a9d3e4c..91266e001 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,7 +58,7 @@ services: - redis clamd-mailcow: - image: mailcow/clamd:1.53 + image: mailcow/clamd:1.54 restart: always depends_on: - unbound-mailcow