From 64b529cb4635854ef8aeaf6b1131ff6ee4266d55 Mon Sep 17 00:00:00 2001 From: mstenz Date: Fri, 16 Dec 2022 05:31:48 +0100 Subject: [PATCH 1/5] add always_bcc feature --- README.md | 3 +++ run.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index dbab175..7b3aeba 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,9 @@ The following env variable(s) are optional. * `MESSAGE_SIZE_LIMIT` This will change the default limit of 10240000 bytes (10MB). +* `ALWAYS_BCC` This will send all message via BCC to this address. Example setting: + ALWAYS_BCC=email@company.com + To use this container from anywhere, the 25 port or the one specified by `SMTP_PORT` needs to be exposed to the docker host server: docker run -d --name postfix -p "25:25" \ diff --git a/run.sh b/run.sh index 6e51f81..1422ce4 100644 --- a/run.sh +++ b/run.sh @@ -120,6 +120,12 @@ if [ ! -z "${MESSAGE_SIZE_LIMIT}" ]; then echo "Setting configuration option message_size_limit with value: ${MESSAGE_SIZE_LIMIT}" fi +# Set always_bcc +if [ ! -z "${ALWAYS_BCC}" ]; then + postconf -e "always_bcc = ${ALWAYS_BCC}" + echo "Setting configuration option always_bcc with value: ${ALWAYS_BCC}" +fi + #Start services # If host mounting /var/spool/postfix, we need to delete old pid file before From 54d34907a979417b9aabed9c2b2fe2c6c452e24b Mon Sep 17 00:00:00 2001 From: mstenz Date: Fri, 16 Dec 2022 05:38:34 +0100 Subject: [PATCH 2/5] add variable to example file --- .env.example | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.env.example b/.env.example index ea1d35c..47a1449 100644 --- a/.env.example +++ b/.env.example @@ -40,3 +40,7 @@ # Optional: This will use allow you to set a custom $message_size_limit value. Default is 10240000. #MESSAGE_SIZE_LIMIT= + + +# Optional: This will send all message via BCC to this address. Example setting: ALWAYS_BCC=email@company.com +#ALWAYS_BCC= From 599053598769e49732752502f88d0ae8a61adea9 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Yamasaki Date: Tue, 14 Mar 2023 22:41:29 +0900 Subject: [PATCH 3/5] fix: Update some actions to run on Node 16 instead of Node 12. --- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2048d0f..3a27ab1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.API_GITHUB_TOKEN }} @@ -28,7 +28,7 @@ jobs: alpine - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 08bbb51..5dfe5f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,23 +13,23 @@ jobs: steps: - name: Checkout with token if: github.event_name != 'pull_request' - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.API_GITHUB_TOKEN }} - name: Checkout without token if: github.event_name == 'pull_request' - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Docker Build Test run: docker buildx build --load --tag test:test --file ./Dockerfile ./ - name: Version if: github.event_name != 'pull_request' - uses: cycjimmy/semantic-release-action@v2.5.3 + uses: cycjimmy/semantic-release-action@v3 with: semantic_version: 17.4 env: From 193a9292aded607b40d335dcaad7b4dd44bbe733 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Yamasaki Date: Wed, 15 Mar 2023 01:09:54 +0900 Subject: [PATCH 4/5] fix: Update some actions to run on Node 16 instead of Node 12. --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a27ab1..298b6b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,16 +31,16 @@ jobs: uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3.3.1 with: push: true platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 From 7a958d43828c74f98bb6dc2bbc5d21840629f0fa Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 29 Jul 2023 18:04:39 +0000 Subject: [PATCH 5/5] fix: Dockerfile to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-ALPINE315-OPENSSL-5788364 - https://snyk.io/vuln/SNYK-ALPINE315-OPENSSL-5788364 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d76ffbc..3e2577a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #Dockerfile for a Postfix email relay service -FROM alpine:3.15 +FROM alpine:3.16 MAINTAINER Juan Luis Baptiste juan.baptiste@gmail.com RUN apk update && \