diff --git a/.github/workflows/close_old_issues_and_prs.yml b/.github/workflows/close_old_issues_and_prs.yml index 58cfdccd..0966bd16 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.1.1 + uses: actions/stale@v6.0.0 with: repo-token: ${{ secrets.STALE_ACTION_PAT }} days-before-stale: 60 diff --git a/.github/workflows/image_builds.yml b/.github/workflows/image_builds.yml index 007b1014..fe660754 100644 --- a/.github/workflows/image_builds.yml +++ b/.github/workflows/image_builds.yml @@ -5,6 +5,9 @@ on: branches: [ "master", "staging" ] workflow_dispatch: +permissions: + contents: read # to fetch code (actions/checkout) + jobs: docker_image_builds: strategy: diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 7d6c4ac2..ee083bf4 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -5,6 +5,9 @@ on: branches: [ "master", "staging" ] workflow_dispatch: +permissions: + contents: read + jobs: integration_tests: runs-on: ubuntu-latest diff --git a/data/Dockerfiles/dovecot/quarantine_notify.py b/data/Dockerfiles/dovecot/quarantine_notify.py index f60a3226..65f2a0e6 100755 --- a/data/Dockerfiles/dovecot/quarantine_notify.py +++ b/data/Dockerfiles/dovecot/quarantine_notify.py @@ -50,7 +50,7 @@ try: def query_mysql(query, headers = True, update = False): while True: try: - cnx = mysql.connector.connect(unix_socket = '/var/run/mysqld/mysqld.sock', user=os.environ.get('DBUSER'), passwd=os.environ.get('DBPASS'), database=os.environ.get('DBNAME'), charset="utf8") + cnx = mysql.connector.connect(unix_socket = '/var/run/mysqld/mysqld.sock', user=os.environ.get('DBUSER'), passwd=os.environ.get('DBPASS'), database=os.environ.get('DBNAME'), charset="utf8mb4", collation="utf8mb4_general_ci") except Exception as ex: print('%s - trying again...' % (ex)) time.sleep(3) @@ -166,4 +166,4 @@ try: notify_rcpt(record['rcpt'], record['counter'], record['quarantine_acl'], attrs['quarantine_category']) finally: - os.unlink(pidfile) \ No newline at end of file + os.unlink(pidfile) diff --git a/data/Dockerfiles/postfix/postfix.sh b/data/Dockerfiles/postfix/postfix.sh index e734a9ab..78b070e0 100755 --- a/data/Dockerfiles/postfix/postfix.sh +++ b/data/Dockerfiles/postfix/postfix.sh @@ -323,7 +323,19 @@ hosts = unix:/var/run/mysqld/mysqld.sock dbname = ${DBNAME} # First select queries domain and alias_domain to determine if domains are active. query = SELECT goto FROM alias - WHERE address='%s' + WHERE id IN ( + SELECT COALESCE ( + ( + SELECT id FROM alias + WHERE address='%s' + AND (active='1' OR active='2') + ), ( + SELECT id FROM alias + WHERE address='@%d' + AND (active='1' OR active='2') + ) + ) + ) AND active='1' AND (domain IN (SELECT domain FROM domain @@ -354,7 +366,7 @@ query = SELECT goto FROM alias WHERE alias_domain.alias_domain = '%d' AND mailbox.username = CONCAT('%u','@',alias_domain.target_domain) AND (mailbox.active = '1' OR mailbox.active ='2') - AND alias_domain.active='1' + AND alias_domain.active='1'; EOF # MX based routing diff --git a/data/web/api/index.css b/data/web/api/index.css new file mode 100644 index 00000000..f2376fda --- /dev/null +++ b/data/web/api/index.css @@ -0,0 +1,16 @@ +html { + box-sizing: border-box; + overflow: -moz-scrollbars-vertical; + overflow-y: scroll; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +body { + margin: 0; + background: #fafafa; +} diff --git a/data/web/api/index.html b/data/web/api/index.html index 581ffba4..84ae62d3 100644 --- a/data/web/api/index.html +++ b/data/web/api/index.html @@ -5,56 +5,15 @@