From ad92e1d0a38f4bad4c4874881c86d3bd24e4a31f Mon Sep 17 00:00:00 2001 From: Aravinda-HWK Date: Wed, 12 Aug 2026 17:33:28 +0530 Subject: [PATCH] refactor: keep the PingMailer name, use OpenGovMail only as the org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up correction to #37. That PR renamed the project itself to `opengovmail`, but only the organisation moved — the project is still PingMailer. This restores the project name everywhere and keeps OpenGovMail strictly as the org/registry owner. - Go module: github.com/OpenGovMail/opengovmail -> github.com/OpenGovMail/pingmailer - Images: opengovmail-{api-server,dkim,smtp,certbot} -> pingmailer-{api-server,dkim,smtp,certbot}; ghcr.io/opengovmail/ owner unchanged - Helm: umbrella chart `opengovmail` -> `pingmailer`; template helper prefixes opengovmail-* -> pingmailer-*; default namespace back to `pingmailer` - Paths: mail-infra/{conf/opengovmail.yaml,services/opengovmail-config, images/opengovmail-*} and scripts/service/{start,stop}-opengovmail.sh renamed back to their pingmailer equivalents - Env vars: OPENGOVMAIL_{YAML_FILE,CONFIG} -> PINGMAILER_{YAML_FILE,CONFIG} - Docs, NOTES.txt and workflow comments say PingMailer for the project and OpenGovMail only for the org (chart maintainers, sources, registry) No Silver or LSFLK references return; those stay retired. Verified: `go build ./...` and `go vet ./...` clean; `helm lint` and `helm template` succeed for the umbrella and certbot charts; `bash -n` passes on every shell script; no case-insensitive match for silver, lsflk or `opengovmail-` remains in the tree. --- .env.example | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/workflows/docker-release.yaml | 14 +++--- .github/workflows/helm-release.yaml | 20 ++++---- README.md | 22 ++++---- api-server/Makefile | 16 +++--- api-server/README.md | 6 +-- api-server/go.mod | 2 +- api-server/internal/api/handlers.go | 2 +- api-server/main.go | 2 +- docker-compose.yml | 50 +++++++++---------- helm/Chart.yaml | 8 +-- helm/README.md | 34 ++++++------- helm/charts/api-server/Chart.yaml | 6 +-- helm/charts/api-server/README.md | 30 +++++------ helm/charts/api-server/templates/NOTES.txt | 16 +++--- helm/charts/api-server/templates/_helpers.tpl | 20 ++++---- .../api-server/templates/deployment.yaml | 12 ++--- helm/charts/api-server/templates/ingress.yaml | 6 +-- helm/charts/api-server/templates/pdb.yaml | 6 +-- helm/charts/api-server/templates/route.yaml | 6 +-- helm/charts/api-server/templates/service.yaml | 6 +-- .../api-server/templates/serviceaccount.yaml | 4 +- helm/charts/api-server/values.example.yaml | 6 +-- helm/charts/api-server/values.yaml | 4 +- helm/charts/opendkim-server/Chart.yaml | 8 +-- helm/charts/opendkim-server/README.md | 20 ++++---- .../opendkim-server/templates/NOTES.txt | 16 +++--- .../opendkim-server/templates/_helpers.tpl | 26 +++++----- .../opendkim-server/templates/configmap.yaml | 6 +-- .../opendkim-server/templates/deployment.yaml | 20 ++++---- .../charts/opendkim-server/templates/pvc.yaml | 4 +- .../opendkim-server/templates/service.yaml | 6 +-- .../templates/serviceaccount.yaml | 4 +- helm/charts/opendkim-server/values.yaml | 10 ++-- helm/charts/raven-sasl-server/Chart.yaml | 6 +-- helm/charts/raven-sasl-server/README.md | 10 ++-- .../raven-sasl-server/templates/NOTES.txt | 12 ++--- .../raven-sasl-server/templates/_helpers.tpl | 24 ++++----- .../templates/configmap.yaml | 8 +-- .../templates/deployment.yaml | 12 ++--- .../raven-sasl-server/templates/service.yaml | 6 +-- .../templates/serviceaccount.yaml | 4 +- helm/charts/raven-sasl-server/values.yaml | 6 +-- helm/charts/smtp-server/Chart.yaml | 8 +-- helm/charts/smtp-server/README.md | 22 ++++---- helm/charts/smtp-server/templates/NOTES.txt | 28 +++++------ .../charts/smtp-server/templates/_helpers.tpl | 26 +++++----- .../smtp-server/templates/configmap.yaml | 14 +++--- .../smtp-server/templates/deployment.yaml | 16 +++--- helm/charts/smtp-server/templates/pvc.yaml | 4 +- .../charts/smtp-server/templates/service.yaml | 6 +-- .../smtp-server/templates/serviceaccount.yaml | 4 +- helm/charts/smtp-server/values.yaml | 12 ++--- helm/templates/NOTES.txt | 2 +- helm/values.example.yaml | 4 +- helm/values.yaml | 10 ++-- .../{opengovmail.yaml => pingmailer.yaml} | 2 +- mail-infra/helm/certbot-server/Chart.yaml | 10 ++-- mail-infra/helm/certbot-server/README.md | 22 ++++---- .../helm/certbot-server/templates/NOTES.txt | 2 +- .../certbot-server/templates/_helpers.tpl | 16 +++--- .../certbot-server/templates/certificate.yaml | 2 +- mail-infra/helm/certbot-server/values.yaml | 6 +-- .../Dockerfile | 0 .../entrypoint.sh | 4 +- .../Dockerfile | 4 +- .../entrypoint.sh | 4 +- mail-infra/scripts/cert-manager-bootstrap.sh | 2 +- mail-infra/scripts/service/cleanup-docker.sh | 6 +-- ...art-opengovmail.sh => start-pingmailer.sh} | 14 +++--- ...stop-opengovmail.sh => stop-pingmailer.sh} | 2 +- mail-infra/scripts/setup/setup.sh | 12 ++--- mail-infra/scripts/utils/get-dkim.sh | 2 +- .../config-scripts/gen-certbot-certs.sh | 12 ++--- .../config-scripts/gen-opendkim-conf.sh | 10 ++-- .../config-scripts/gen-postfix-conf.sh | 10 ++-- .../services/config-scripts/gen-raven-conf.sh | 12 ++--- .../services/config-scripts/gen-thunder.sh | 14 +++--- .../opendkim/opendkim.conf | 0 .../postfix/master.cf | 0 .../thunder/console-config.js | 0 .../thunder/deployment.yaml | 0 .../thunder/gate-config.js | 0 84 files changed, 417 insertions(+), 417 deletions(-) rename mail-infra/conf/{opengovmail.yaml => pingmailer.yaml} (91%) rename mail-infra/images/{opengovmail-dkim => pingmailer-dkim}/Dockerfile (100%) rename mail-infra/images/{opengovmail-dkim => pingmailer-dkim}/entrypoint.sh (96%) rename mail-infra/images/{opengovmail-smtp-rootless => pingmailer-smtp-rootless}/Dockerfile (97%) rename mail-infra/images/{opengovmail-smtp-rootless => pingmailer-smtp-rootless}/entrypoint.sh (95%) rename mail-infra/scripts/service/{start-opengovmail.sh => start-pingmailer.sh} (93%) rename mail-infra/scripts/service/{stop-opengovmail.sh => stop-pingmailer.sh} (83%) rename mail-infra/services/{opengovmail-config => pingmailer-config}/opendkim/opendkim.conf (100%) rename mail-infra/services/{opengovmail-config => pingmailer-config}/postfix/master.cf (100%) rename mail-infra/services/{opengovmail-config => pingmailer-config}/thunder/console-config.js (100%) rename mail-infra/services/{opengovmail-config => pingmailer-config}/thunder/deployment.yaml (100%) rename mail-infra/services/{opengovmail-config => pingmailer-config}/thunder/gate-config.js (100%) diff --git a/.env.example b/.env.example index bb891ca..36c3666 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ DOMAIN=yourdomain.com # Path to certbot certificates directory -CERT_PATH=../mail-infra/services/opengovmail-config/certbot/keys/etc +CERT_PATH=../mail-infra/services/pingmailer-config/certbot/keys/etc # OAuth2 Configuration (Required) # The introspection URL is used by the API server to validate application access tokens diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index aeeec87..e533362 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -22,7 +22,7 @@ What actually happened. ## Environment - OS: [e.g. Ubuntu 22.04] - Docker version: [e.g. 20.10.17] -- OpenGovMail version: [e.g. v1.2.0 or commit hash] +- PingMailer version: [e.g. v1.2.0 or commit hash] ## Additional Context Add any other context or screenshots about the issue. diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml index 49fb82a..126b051 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -40,18 +40,18 @@ jobs: fail-fast: false matrix: include: - - name: opengovmail-api-server + - name: pingmailer-api-server context: ./api-server dockerfile: ./api-server/Dockerfile # Static Go binary — cross-compiles cheaply, so build wide. platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x - - name: opengovmail-dkim - context: ./mail-infra/images/opengovmail-dkim - dockerfile: ./mail-infra/images/opengovmail-dkim/Dockerfile + - name: pingmailer-dkim + context: ./mail-infra/images/pingmailer-dkim + dockerfile: ./mail-infra/images/pingmailer-dkim/Dockerfile platforms: linux/amd64,linux/arm64 - - name: opengovmail-smtp - context: ./mail-infra/images/opengovmail-smtp-rootless - dockerfile: ./mail-infra/images/opengovmail-smtp-rootless/Dockerfile + - name: pingmailer-smtp + context: ./mail-infra/images/pingmailer-smtp-rootless + dockerfile: ./mail-infra/images/pingmailer-smtp-rootless/Dockerfile # This image rebuilds Postfix from source; every extra platform is # a full compile under QEMU emulation. Keep the list tight. platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index 3908334..82bc27f 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -1,6 +1,6 @@ name: Publish Helm chart -# Packages the opengovmail umbrella chart and pushes it to GHCR as an OCI +# Packages the pingmailer umbrella chart and pushes it to GHCR as an OCI # artifact, using the same release that publishes the container images. # # Release flow: @@ -63,7 +63,7 @@ jobs: - name: Render smoke test run: | # The example values must produce a complete, parseable manifest. - helm template opengovmail ./helm -f helm/values.example.yaml > /tmp/rendered.yaml + helm template pingmailer ./helm -f helm/values.example.yaml > /tmp/rendered.yaml count=$(grep -c '^kind:' /tmp/rendered.yaml) echo "Rendered $count resources" if [ "$count" -lt 15 ]; then @@ -73,7 +73,7 @@ jobs: # The required-value guards must still fire when values are absent, # otherwise a misconfigured install would fail in-cluster instead of # at render time. - if helm template opengovmail ./helm >/dev/null 2>&1; then + if helm template pingmailer ./helm >/dev/null 2>&1; then echo "::error::Chart rendered with no values — required-value guards are broken." exit 1 fi @@ -98,7 +98,7 @@ jobs: # Charts go in their own namespace so they don't collide with the # image packages in the same org. owner=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]') - helm push "dist/opengovmail-${{ steps.v.outputs.version }}.tgz" \ + helm push "dist/pingmailer-${{ steps.v.outputs.version }}.tgz" \ "oci://${{ env.REGISTRY }}/${owner}/charts" - name: Summary @@ -106,26 +106,26 @@ jobs: owner=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]') v="${{ steps.v.outputs.version }}" { - echo "### Helm chart \`opengovmail\` $v" + echo "### Helm chart \`pingmailer\` $v" echo if [ "${{ github.event_name }}" = "pull_request" ]; then echo "Dry run — lint, render and package passed. Nothing pushed." else - echo "Published to \`oci://${{ env.REGISTRY }}/${owner}/charts/opengovmail\`" + echo "Published to \`oci://${{ env.REGISTRY }}/${owner}/charts/pingmailer\`" echo echo '```bash' - echo "helm install opengovmail \\" - echo " oci://${{ env.REGISTRY }}/${owner}/charts/opengovmail \\" + echo "helm install pingmailer \\" + echo " oci://${{ env.REGISTRY }}/${owner}/charts/pingmailer \\" echo " --version $v -n -f my-values.yaml" echo '```' echo echo "> New GHCR packages are **private** by default. Make the package" - echo "> public under Packages → opengovmail → Package settings, or" + echo "> public under Packages → pingmailer → Package settings, or" echo "> consumers must \`helm registry login ghcr.io\` first." fi } >> "$GITHUB_STEP_SUMMARY" - uses: actions/upload-artifact@v4 with: - name: opengovmail-chart-${{ steps.v.outputs.version }} + name: pingmailer-chart-${{ steps.v.outputs.version }} path: dist/*.tgz diff --git a/README.md b/README.md index dcdfe90..7c33538 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# OpenGovMail +# PingMailer **_Simple Email Service for Transactional Emails_** [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) -![Last Commit](https://img.shields.io/github/last-commit/OpenGovMail/opengovmail) +![Last Commit](https://img.shields.io/github/last-commit/OpenGovMail/pingmailer) -**OpenGovMail** is a lightweight service for sending transactional emails. It provides a simple REST API for email delivery over SMTP, backed by its own Postfix/OpenDKIM mail infrastructure. +**PingMailer** is a lightweight service for sending transactional emails. It provides a simple REST API for email delivery using SMTP, powered by its own Postfix/OpenDKIM mail infrastructure.

• Features • @@ -17,7 +17,7 @@ - **Simple REST API** – Send emails via HTTPS requests - **Template Support** – Pre-built email templates for common use cases -- **SMTP Integration** – Works with any SMTP server or OpenGovMail instance +- **SMTP Integration** – Works with any SMTP server or PingMailer instance - **Lightweight** – Minimal resource footprint - **Dockerized** – Easy deployment with Docker Compose @@ -25,14 +25,14 @@ ### Prerequisites - Docker and Docker Compose installed -- SMTP server credentials (or a running OpenGovMail instance) +- SMTP server credentials (or a running PingMailer instance) ### Quick Start 1. **Clone the repository** ```bash - git clone https://github.com/OpenGovMail/opengovmail.git - cd opengovmail + git clone https://github.com/OpenGovMail/pingmailer.git + cd pingmailer ``` 2. **Set up the mail infrastructure** @@ -40,9 +40,9 @@ bash mail-infra/scripts/setup/setup.sh ``` -3. **Start the OpenGovMail mail server** +3. **Start the PingMailer mail server** ```bash - bash mail-infra/scripts/service/start-opengovmail.sh + bash mail-infra/scripts/service/start-pingmailer.sh ``` 4. **Configure the API server** @@ -81,10 +81,10 @@ ## Architecture -OpenGovMail consists of two main components: +PingMailer consists of two main components: - **`api-server/`** - Go-based REST API server for sending templated emails -- **`mail-infra/`** - OpenGovMail SMTP components for outgoing mail delivery +- **`mail-infra/`** - PingMailer SMTP components for outgoing mail delivery The API server accepts HTTPS requests and forwards emails through the configured SMTP server. Email templates are stored in `api-server/internal/emailer/templates/`. diff --git a/api-server/Makefile b/api-server/Makefile index b1dc014..95cea13 100644 --- a/api-server/Makefile +++ b/api-server/Makefile @@ -4,28 +4,28 @@ run: go run . -port 8000 build: - go build -o bin/opengovmail-api . + go build -o bin/pingmailer-api . clean: rm -rf bin # Docker commands docker-build: - docker build -t opengovmail-api . + docker build -t pingmailer-api . docker-run: docker run -d \ -p 8000:8000 \ -e PORT=8000 \ - --name opengovmail-api \ - opengovmail-api + --name pingmailer-api \ + pingmailer-api docker-stop: - docker stop opengovmail-api || true - docker rm opengovmail-api || true + docker stop pingmailer-api || true + docker rm pingmailer-api || true docker-clean: docker-stop - docker rmi opengovmail-api || true + docker rmi pingmailer-api || true docker-compose-up: docker-compose up -d @@ -34,7 +34,7 @@ docker-compose-down: docker-compose down docker-logs: - docker logs -f opengovmail-api + docker logs -f pingmailer-api gci: golangci-lint run diff --git a/api-server/README.md b/api-server/README.md index e50762d..7eb91af 100644 --- a/api-server/README.md +++ b/api-server/README.md @@ -1,6 +1,6 @@ -# OpenGovMail API Server +# PingMailer API Server -A simple REST API service for sending emails via SMTP. Part of the OpenGovMail platform. +A simple REST API service for sending emails via SMTP. Part of the PingMailer stack, maintained by OpenGovMail. ## Quick Start @@ -14,7 +14,7 @@ cp .env.example .env docker compose up -d # View logs -docker logs opengovmail-api -f +docker logs pingmailer-api -f ``` The API will be available at `http://your-host:8000/notify` diff --git a/api-server/go.mod b/api-server/go.mod index 39f858a..62d26df 100644 --- a/api-server/go.mod +++ b/api-server/go.mod @@ -1,4 +1,4 @@ -module github.com/OpenGovMail/opengovmail +module github.com/OpenGovMail/pingmailer go 1.23 diff --git a/api-server/internal/api/handlers.go b/api-server/internal/api/handlers.go index 6c224b5..ebe8893 100644 --- a/api-server/internal/api/handlers.go +++ b/api-server/internal/api/handlers.go @@ -8,7 +8,7 @@ import ( "net/mail" "strconv" - "github.com/OpenGovMail/opengovmail/internal/emailer" + "github.com/OpenGovMail/pingmailer/internal/emailer" ) // handleHealth provides a simple health check endpoint diff --git a/api-server/main.go b/api-server/main.go index 7474972..68ef0bd 100644 --- a/api-server/main.go +++ b/api-server/main.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/OpenGovMail/opengovmail/internal/api" + "github.com/OpenGovMail/pingmailer/internal/api" ) func main() { diff --git a/docker-compose.yml b/docker-compose.yml index 8800a70..3a04a5e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,16 @@ services: smtp-server: - image: ghcr.io/opengovmail/opengovmail-smtp:main + image: ghcr.io/opengovmail/pingmailer-smtp:main container_name: smtp-server-container ports: - "25:25" - "587:587" volumes: - - ./mail-infra/services/opengovmail-config/postfix/main.cf:/etc/postfix/main.cf:ro - - ./mail-infra/services/opengovmail-config/postfix/master.cf:/etc/postfix/master.cf:ro - - ./mail-infra/services/opengovmail-config/postfix/recipient_access:/etc/postfix/recipient_access:ro - - ./mail-infra/conf/opengovmail.yaml:/etc/postfix/opengovmail.yaml - - ./mail-infra/services/opengovmail-config/certbot/keys/etc:/etc/letsencrypt:ro + - ./mail-infra/services/pingmailer-config/postfix/main.cf:/etc/postfix/main.cf:ro + - ./mail-infra/services/pingmailer-config/postfix/master.cf:/etc/postfix/master.cf:ro + - ./mail-infra/services/pingmailer-config/postfix/recipient_access:/etc/postfix/recipient_access:ro + - ./mail-infra/conf/pingmailer.yaml:/etc/postfix/pingmailer.yaml + - ./mail-infra/services/pingmailer-config/certbot/keys/etc:/etc/letsencrypt:ro - postfix-spool:/var/spool/postfix - postfix-logs:/var/log networks: @@ -26,8 +26,8 @@ services: ports: - "12345:12345" volumes: - - ./mail-infra/services/opengovmail-config/raven/conf:/etc/raven:rw - - ./mail-infra/services/opengovmail-config/raven/certs:/certs:ro + - ./mail-infra/services/pingmailer-config/raven/conf:/etc/raven:rw + - ./mail-infra/services/pingmailer-config/raven/certs:/certs:ro - /var/run/docker.sock:/var/run/docker.sock:ro - ./mail-infra/conf/oauth_client_email_authorization.json:/app/config/oauth_client_email_authorization.json:ro environment: @@ -37,14 +37,14 @@ services: restart: unless-stopped opendkim-server: - image: ghcr.io/opengovmail/opengovmail-dkim:main + image: ghcr.io/opengovmail/pingmailer-dkim:main container_name: opendkim-server volumes: - - ./mail-infra/conf/opengovmail.yaml:/etc/opendkim/opengovmail.yaml - - ./mail-infra/services/opengovmail-config/opendkim/opendkim.conf:/etc/opendkim/opendkim.conf:ro - - ./mail-infra/services/opengovmail-config/opendkim/KeyTable:/etc/opendkim/KeyTable:ro - - ./mail-infra/services/opengovmail-config/opendkim/SigningTable:/etc/opendkim/SigningTable:ro - - ./mail-infra/services/opengovmail-config/opendkim/TrustedHosts:/etc/opendkim/TrustedHosts:ro + - ./mail-infra/conf/pingmailer.yaml:/etc/opendkim/pingmailer.yaml + - ./mail-infra/services/pingmailer-config/opendkim/opendkim.conf:/etc/opendkim/opendkim.conf:ro + - ./mail-infra/services/pingmailer-config/opendkim/KeyTable:/etc/opendkim/KeyTable:ro + - ./mail-infra/services/pingmailer-config/opendkim/SigningTable:/etc/opendkim/SigningTable:ro + - ./mail-infra/services/pingmailer-config/opendkim/TrustedHosts:/etc/opendkim/TrustedHosts:ro - dkim-keys:/etc/dkimkeys networks: - mail-network @@ -69,7 +69,7 @@ services: volumes: - thunder-db:/opt/thunder/repository/database - consent-db:/opt/thunder/consent/repository/database - - ./mail-infra/services/opengovmail-config/thunder/deployment.yaml:/opt/thunder/repository/conf/deployment.yaml:ro + - ./mail-infra/services/pingmailer-config/thunder/deployment.yaml:/opt/thunder/repository/conf/deployment.yaml:ro depends_on: thunder-db-init: condition: service_completed_successfully @@ -86,22 +86,22 @@ services: volumes: - thunder-db:/opt/thunder/repository/database - consent-db:/opt/thunder/consent/repository/database - - ./mail-infra/services/opengovmail-config/thunder/certs/server.cert:/opt/thunder/repository/resources/security/server.cert:ro - - ./mail-infra/services/opengovmail-config/thunder/certs/server.key:/opt/thunder/repository/resources/security/server.key:ro - - ./mail-infra/services/opengovmail-config/thunder/deployment.yaml:/opt/thunder/repository/conf/deployment.yaml:ro - - ./mail-infra/services/opengovmail-config/thunder/console-config.js:/opt/thunder/apps/console/config.js:ro - - ./mail-infra/services/opengovmail-config/thunder/gate-config.js:/opt/thunder/apps/gate/config.js:ro + - ./mail-infra/services/pingmailer-config/thunder/certs/server.cert:/opt/thunder/repository/resources/security/server.cert:ro + - ./mail-infra/services/pingmailer-config/thunder/certs/server.key:/opt/thunder/repository/resources/security/server.key:ro + - ./mail-infra/services/pingmailer-config/thunder/deployment.yaml:/opt/thunder/repository/conf/deployment.yaml:ro + - ./mail-infra/services/pingmailer-config/thunder/console-config.js:/opt/thunder/apps/console/config.js:ro + - ./mail-infra/services/pingmailer-config/thunder/gate-config.js:/opt/thunder/apps/gate/config.js:ro networks: - mail-network restart: unless-stopped certbot-server: - image: ghcr.io/opengovmail/opengovmail-certbot:main + image: ghcr.io/opengovmail/pingmailer-certbot:main container_name: certbot-server volumes: - - ./mail-infra/services/opengovmail-config/certbot/keys/etc:/etc/letsencrypt - - ./mail-infra/services/opengovmail-config/certbot/keys/log:/var/log/letsencrypt - - ./mail-infra/services/opengovmail-config/certbot/keys/lib:/var/lib/letsencrypt + - ./mail-infra/services/pingmailer-config/certbot/keys/etc:/etc/letsencrypt + - ./mail-infra/services/pingmailer-config/certbot/keys/log:/var/log/letsencrypt + - ./mail-infra/services/pingmailer-config/certbot/keys/lib:/var/lib/letsencrypt ports: - "80:80" - "443:443" @@ -112,7 +112,7 @@ services: build: context: ./api-server dockerfile: Dockerfile - container_name: opengovmail-api-server + container_name: pingmailer-api-server restart: unless-stopped ports: - "8443:8443" diff --git a/helm/Chart.yaml b/helm/Chart.yaml index bb2f594..c75af49 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 -name: opengovmail +name: pingmailer description: | - Umbrella Helm chart for the OpenGovMail stack. Installs the + Umbrella Helm chart for the PingMailer stack. Installs the four services that make up a working outbound mail platform as a single release: @@ -22,7 +22,7 @@ type: application version: 0.1.0 appVersion: "0.1.0" keywords: - - opengovmail + - pingmailer - mail - smtp - postfix @@ -34,7 +34,7 @@ maintainers: - name: OpenGovMail url: https://github.com/OpenGovMail sources: - - https://github.com/OpenGovMail/opengovmail + - https://github.com/OpenGovMail/pingmailer dependencies: - name: api-server version: 0.1.0 diff --git a/helm/README.md b/helm/README.md index 5f58f4d..7878468 100644 --- a/helm/README.md +++ b/helm/README.md @@ -1,4 +1,4 @@ -# OpenGovMail — Helm deployment guide +# Pingmailer — Helm deployment guide `helm/` is a single umbrella chart that installs the whole outbound-mail stack as one release. Each service is still a self-contained subchart under @@ -49,16 +49,16 @@ Released versions are published to GHCR as OCI artifacts, so you can install without cloning this repo: ```bash -helm show values oci://ghcr.io/opengovmail/charts/opengovmail --version > my-values.yaml +helm show values oci://ghcr.io/opengovmail/charts/pingmailer --version > my-values.yaml # edit my-values.yaml, then: -helm install opengovmail oci://ghcr.io/opengovmail/charts/opengovmail \ +helm install pingmailer oci://ghcr.io/opengovmail/charts/pingmailer \ --version -n -f my-values.yaml ``` `helm search` does not work against OCI registries. List available versions with: ```bash -helm show chart oci://ghcr.io/opengovmail/charts/opengovmail --version +helm show chart oci://ghcr.io/opengovmail/charts/pingmailer --version ``` If the package is private, authenticate first with a token that has @@ -124,13 +124,13 @@ uncommitted values file, or supply it separately with a second `-f`. ```bash helm lint ./helm -f my-values.yaml -helm template opengovmail ./helm -n -f my-values.yaml | less +helm template pingmailer ./helm -n -f my-values.yaml | less ``` ### 3. Install ```bash -helm upgrade --install opengovmail ./helm \ +helm upgrade --install pingmailer ./helm \ --namespace --create-namespace \ -f my-values.yaml ``` @@ -141,7 +141,7 @@ of this command and the four constraints that namespace enforces. ### 4. Verify ```bash -kubectl -n get pods,svc,pvc -l app.kubernetes.io/instance=opengovmail +kubectl -n get pods,svc,pvc -l app.kubernetes.io/instance=pingmailer kubectl -n rollout status deploy/smtp-server kubectl -n logs deploy/smtp-server -f ``` @@ -185,7 +185,7 @@ oc whoami --show-context # confirm before touching a prod namespace ### Install ```bash -helm upgrade --install opengovmail ./helm \ +helm upgrade --install pingmailer ./helm \ --namespace \ -f my-values.yaml ``` @@ -237,7 +237,7 @@ Confirm before installing — the rendered pod `securityContext` should carry no UID: ```bash -helm template opengovmail ./helm -f my-values.yaml \ +helm template pingmailer ./helm -f my-values.yaml \ | awk '/name: raven-sasl$/,0' | grep -A6 'securityContext:' ``` @@ -304,7 +304,7 @@ oc -n get svc smtp-server -o jsonpath='{.spec.clusterIP}' ### Verify on OpenShift ```bash -oc -n get pods,svc,route,pvc -l app.kubernetes.io/instance=opengovmail +oc -n get pods,svc,route,pvc -l app.kubernetes.io/instance=pingmailer HOST=$(oc -n get route api-server -o jsonpath='{.spec.host}') curl -sk -o /dev/null -w 'HTTP %{http_code}\n' https://$HOST/healthcheck ``` @@ -388,7 +388,7 @@ import smtplib, ssl, base64, os from email.message import EmailMessage tok, user, to = os.environ["TOK"], "contact@example.com", "you@elsewhere.test" m = EmailMessage(); m["From"], m["To"] = user, to -m["Subject"] = "OpenGovMail smoke test" +m["Subject"] = "Pingmailer smoke test" m.set_content("test") s = smtplib.SMTP("mail.example.com", 587, timeout=40) s.ehlo(); s.starttls(context=ssl.create_default_context()); s.ehlo() @@ -448,11 +448,11 @@ Every subchart has an `enabled` flag, so you can roll out incrementally: ```bash # infrastructure first -helm upgrade --install opengovmail ./helm -n -f my-values.yaml \ +helm upgrade --install pingmailer ./helm -n -f my-values.yaml \ --set smtp-server.enabled=false --set api-server.enabled=false # then the rest -helm upgrade --install opengovmail ./helm -n -f my-values.yaml +helm upgrade --install pingmailer ./helm -n -f my-values.yaml ``` A subchart can also be installed entirely on its own — it keeps its own @@ -491,9 +491,9 @@ Ingress or Route, which terminates TLS for it. ## Upgrading and rolling back ```bash -helm upgrade opengovmail ./helm -n -f my-values.yaml -helm history opengovmail -n -helm rollback opengovmail -n +helm upgrade pingmailer ./helm -n -f my-values.yaml +helm history pingmailer -n +helm rollback pingmailer -n ``` Scaling constraints: `opendkim-server` and `smtp-server` must stay at @@ -503,7 +503,7 @@ Postfix queue). Only `api-server` is stateless and safe to scale. ## Uninstalling ```bash -helm uninstall opengovmail -n +helm uninstall pingmailer -n ``` PVCs are **not** removed by `helm uninstall`. That is deliberate — deleting diff --git a/helm/charts/api-server/Chart.yaml b/helm/charts/api-server/Chart.yaml index 5d64c3d..518cdf9 100644 --- a/helm/charts/api-server/Chart.yaml +++ b/helm/charts/api-server/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: api-server description: | - Portable Helm chart for the OpenGovMail api-server (Go service that accepts + Portable Helm chart for the Pingmailer api-server (Go service that accepts `POST /notify` and relays the request to SMTP using the caller's Bearer token as the XOAUTH2 credential). Serves plain HTTP on :8000; external TLS is terminated at the ingress/route layer (Kubernetes Ingress by default, OpenShift @@ -14,7 +14,7 @@ keywords: - api - smtp - mail - - opengovmail + - pingmailer - kubernetes - openshift - portable @@ -22,4 +22,4 @@ maintainers: - name: OpenGovMail url: https://github.com/OpenGovMail sources: - - https://github.com/OpenGovMail/opengovmail + - https://github.com/OpenGovMail/pingmailer diff --git a/helm/charts/api-server/README.md b/helm/charts/api-server/README.md index 031a271..e8d6b20 100644 --- a/helm/charts/api-server/README.md +++ b/helm/charts/api-server/README.md @@ -1,7 +1,7 @@ -# opengovmail-api-server Helm chart +# pingmailer-api-server Helm chart -Helm chart for the OpenGovMail **api-server** — the public HTTP entry point -for sending mail through the OpenGovMail stack. The Kubernetes counterpart of +Helm chart for the Pingmailer **api-server** — the public HTTP entry point +for sending mail through the PingMailer stack. The Kubernetes counterpart of the `api-server` service in [docker-compose.yml](../../../docker-compose.yml). **Platform support:** This chart is portable across **vanilla Kubernetes** (EKS, GKE, AKS, etc.) and **OpenShift**, with OpenShift-specific features available as optional feature toggles. @@ -39,9 +39,9 @@ publishes it yet. Pick one path: ```bash cd api-server -docker build -t ghcr.io//opengovmail-api-server:0.1.0 . +docker build -t ghcr.io//pingmailer-api-server:0.1.0 . echo $GITHUB_TOKEN | docker login ghcr.io -u --password-stdin -docker push ghcr.io//opengovmail-api-server:0.1.0 +docker push ghcr.io//pingmailer-api-server:0.1.0 cd .. ``` @@ -51,12 +51,12 @@ cd .. # Build inside minikube's Docker daemon so the cluster can pull it # without going through an external registry. eval $(minikube docker-env) -docker build -t opengovmail-api-server:dev ./api-server +docker build -t pingmailer-api-server:dev ./api-server eval $(minikube docker-env -u) # Then in your values overlay: # image: -# repository: opengovmail-api-server +# repository: pingmailer-api-server # tag: dev # pullPolicy: Never # local image, never try to pull ``` @@ -70,7 +70,7 @@ This is the recommended setup for portable deployment. ```yaml # my-api-values.yaml image: - repository: "ghcr.io//opengovmail-api-server" + repository: "ghcr.io//pingmailer-api-server" tag: "0.1.0" ingress: @@ -93,7 +93,7 @@ oauth2IntrospectUrl: "https://thunder.example.com/oauth2/introspect" ```bash helm upgrade --install api-server ./helm/charts/api-server \ - --namespace opengovmail --create-namespace \ + --namespace pingmailer --create-namespace \ -f my-api-values.yaml ``` @@ -104,7 +104,7 @@ To deploy on OpenShift and use OpenShift Route: ```yaml # my-api-values-openshift.yaml image: - repository: "ghcr.io//opengovmail-api-server" + repository: "ghcr.io//pingmailer-api-server" tag: "0.1.0" ingress: @@ -122,7 +122,7 @@ oauth2IntrospectUrl: "https://thunder.example.com/oauth2/introspect" ```bash helm upgrade --install api-server ./helm/charts/api-server \ - --namespace opengovmail --create-namespace \ + --namespace pingmailer --create-namespace \ -f my-api-values-openshift.yaml ``` @@ -132,11 +132,11 @@ Once deployed, verify the ingress or route: ```bash # Kubernetes -kubectl -n opengovmail get ingress +kubectl -n pingmailer get ingress # Update DNS A-record to point at the ingress controller's IP # OpenShift -oc -n opengovmail get route api-server +oc -n pingmailer get route api-server # Router automatically handles DNS (or configure your external DNS) ``` @@ -222,7 +222,7 @@ ingress: | Key | Default | Notes | |---|---|---| -| `image.repository` | `""` (**required**) | Your registry path, e.g. `ghcr.io/opengovmail/opengovmail-api-server` | +| `image.repository` | `""` (**required**) | Your registry path, e.g. `ghcr.io/opengovmail/pingmailer-api-server` | | `image.tag` | `""` | Defaults to Chart.appVersion (0.1.0); pin to a real version in production | | `containerPort` | `8000` | Port the Go server listens on inside the pod | | `replicaCount` | `2` | API server is stateless — scale freely | @@ -286,7 +286,7 @@ This chart follows **best practices for open-source Helm charts**: ## Uninstall ```bash -helm uninstall api-server -n opengovmail +helm uninstall api-server -n pingmailer ``` Nothing persistent is created by this chart — uninstall is clean. diff --git a/helm/charts/api-server/templates/NOTES.txt b/helm/charts/api-server/templates/NOTES.txt index 5ab8315..bbb934d 100644 --- a/helm/charts/api-server/templates/NOTES.txt +++ b/helm/charts/api-server/templates/NOTES.txt @@ -1,26 +1,26 @@ -opengovmail-api-server has been installed. +pingmailer-api-server has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} Image: {{ .Values.image.repository }}:{{ .Values.image.tag }} -Service: {{ include "opengovmail-api-server.fullname" . }}:{{ .Values.service.port }} (ClusterIP, HTTP) +Service: {{ include "pingmailer-api-server.fullname" . }}:{{ .Values.service.port }} (ClusterIP, HTTP) ----- 1. Watch the pods ----- - kubectl -n {{ .Release.Namespace }} get pod -l app.kubernetes.io/name=opengovmail-api-server -w - kubectl -n {{ .Release.Namespace }} logs deploy/{{ include "opengovmail-api-server.fullname" . }} -f + kubectl -n {{ .Release.Namespace }} get pod -l app.kubernetes.io/name=pingmailer-api-server -w + kubectl -n {{ .Release.Namespace }} logs deploy/{{ include "pingmailer-api-server.fullname" . }} -f ----- 2. Reach the API ----- In-cluster (HTTP): - http://{{ include "opengovmail-api-server.fullname" . }}:{{ .Values.service.port }}/healthcheck + http://{{ include "pingmailer-api-server.fullname" . }}:{{ .Values.service.port }}/healthcheck {{- if .Values.ingress.enabled }} External (TLS terminated at your Ingress controller): - kubectl -n {{ .Release.Namespace }} get ingress {{ include "opengovmail-api-server.fullname" . }} \ + kubectl -n {{ .Release.Namespace }} get ingress {{ include "pingmailer-api-server.fullname" . }} \ -o jsonpath='{.spec.rules[0].host}{"\n"}' Then: https:///healthcheck @@ -31,7 +31,7 @@ Service: {{ include "opengovmail-api-server.fullname" . }}:{{ .Values.service. External (TLS terminated at the OpenShift Route): - oc -n {{ .Release.Namespace }} get route {{ include "opengovmail-api-server.fullname" . }} \ + oc -n {{ .Release.Namespace }} get route {{ include "pingmailer-api-server.fullname" . }} \ -o jsonpath='{.spec.host}{"\n"}' Then: https:///healthcheck @@ -43,7 +43,7 @@ Service: {{ include "opengovmail-api-server.fullname" . }}:{{ .Values.service. For local testing, port-forward to the service: - kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "opengovmail-api-server.fullname" . }} 8000:{{ .Values.service.port }} & + kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "pingmailer-api-server.fullname" . }} 8000:{{ .Values.service.port }} & curl http://localhost:8000/healthcheck {{- end }} diff --git a/helm/charts/api-server/templates/_helpers.tpl b/helm/charts/api-server/templates/_helpers.tpl index 9442d30..cb94370 100644 --- a/helm/charts/api-server/templates/_helpers.tpl +++ b/helm/charts/api-server/templates/_helpers.tpl @@ -1,8 +1,8 @@ -{{- define "opengovmail-api-server.name" -}} +{{- define "pingmailer-api-server.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} -{{- define "opengovmail-api-server.fullname" -}} +{{- define "pingmailer-api-server.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -15,13 +15,13 @@ {{- end }} {{- end }} -{{- define "opengovmail-api-server.chart" -}} +{{- define "pingmailer-api-server.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} -{{- define "opengovmail-api-server.labels" -}} -helm.sh/chart: {{ include "opengovmail-api-server.chart" . }} -{{ include "opengovmail-api-server.selectorLabels" . }} +{{- define "pingmailer-api-server.labels" -}} +helm.sh/chart: {{ include "pingmailer-api-server.chart" . }} +{{ include "pingmailer-api-server.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -29,14 +29,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/component: api {{- end }} -{{- define "opengovmail-api-server.selectorLabels" -}} -app.kubernetes.io/name: {{ include "opengovmail-api-server.name" . }} +{{- define "pingmailer-api-server.selectorLabels" -}} +app.kubernetes.io/name: {{ include "pingmailer-api-server.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- define "opengovmail-api-server.serviceAccountName" -}} +{{- define "pingmailer-api-server.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "opengovmail-api-server.fullname" .) .Values.serviceAccount.name }} +{{- default (include "pingmailer-api-server.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} diff --git a/helm/charts/api-server/templates/deployment.yaml b/helm/charts/api-server/templates/deployment.yaml index 32414a3..5bb63a7 100644 --- a/helm/charts/api-server/templates/deployment.yaml +++ b/helm/charts/api-server/templates/deployment.yaml @@ -1,27 +1,27 @@ {{- if not .Values.image.repository }} -{{- fail "image.repository is required — set it to the registry path you pushed the api-server image to (e.g. ghcr.io/opengovmail/opengovmail-api-server)." }} +{{- fail "image.repository is required — set it to the registry path you pushed the api-server image to (e.g. ghcr.io/opengovmail/pingmailer-api-server)." }} {{- end }} apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "opengovmail-api-server.fullname" . }} + name: {{ include "pingmailer-api-server.fullname" . }} labels: - {{- include "opengovmail-api-server.labels" . | nindent 4 }} + {{- include "pingmailer-api-server.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "opengovmail-api-server.selectorLabels" . | nindent 6 }} + {{- include "pingmailer-api-server.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "opengovmail-api-server.selectorLabels" . | nindent 8 }} + {{- include "pingmailer-api-server.selectorLabels" . | nindent 8 }} {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "opengovmail-api-server.serviceAccountName" . }} + serviceAccountName: {{ include "pingmailer-api-server.serviceAccountName" . }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/helm/charts/api-server/templates/ingress.yaml b/helm/charts/api-server/templates/ingress.yaml index b1e6c8e..1835fbe 100644 --- a/helm/charts/api-server/templates/ingress.yaml +++ b/helm/charts/api-server/templates/ingress.yaml @@ -2,9 +2,9 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ include "opengovmail-api-server.fullname" . }} + name: {{ include "pingmailer-api-server.fullname" . }} labels: - {{- include "opengovmail-api-server.labels" . | nindent 4 }} + {{- include "pingmailer-api-server.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -33,7 +33,7 @@ spec: pathType: {{ .pathType }} backend: service: - name: {{ include "opengovmail-api-server.fullname" $ }} + name: {{ include "pingmailer-api-server.fullname" $ }} port: number: {{ $.Values.service.port }} {{- end }} diff --git a/helm/charts/api-server/templates/pdb.yaml b/helm/charts/api-server/templates/pdb.yaml index 64b5c81..c042080 100644 --- a/helm/charts/api-server/templates/pdb.yaml +++ b/helm/charts/api-server/templates/pdb.yaml @@ -2,12 +2,12 @@ apiVersion: policy/v1 kind: PodDisruptionBudget metadata: - name: {{ include "opengovmail-api-server.fullname" . }} + name: {{ include "pingmailer-api-server.fullname" . }} labels: - {{- include "opengovmail-api-server.labels" . | nindent 4 }} + {{- include "pingmailer-api-server.labels" . | nindent 4 }} spec: minAvailable: {{ .Values.pdb.minAvailable }} selector: matchLabels: - {{- include "opengovmail-api-server.selectorLabels" . | nindent 6 }} + {{- include "pingmailer-api-server.selectorLabels" . | nindent 6 }} {{- end }} diff --git a/helm/charts/api-server/templates/route.yaml b/helm/charts/api-server/templates/route.yaml index 796349a..269bab7 100644 --- a/helm/charts/api-server/templates/route.yaml +++ b/helm/charts/api-server/templates/route.yaml @@ -2,9 +2,9 @@ apiVersion: route.openshift.io/v1 kind: Route metadata: - name: {{ include "opengovmail-api-server.fullname" . }} + name: {{ include "pingmailer-api-server.fullname" . }} labels: - {{- include "opengovmail-api-server.labels" . | nindent 4 }} + {{- include "pingmailer-api-server.labels" . | nindent 4 }} {{- with .Values.route.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ spec: {{- end }} to: kind: Service - name: {{ include "opengovmail-api-server.fullname" . }} + name: {{ include "pingmailer-api-server.fullname" . }} weight: 100 port: targetPort: http diff --git a/helm/charts/api-server/templates/service.yaml b/helm/charts/api-server/templates/service.yaml index e1570f6..22c18a5 100644 --- a/helm/charts/api-server/templates/service.yaml +++ b/helm/charts/api-server/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "opengovmail-api-server.fullname" . }} + name: {{ include "pingmailer-api-server.fullname" . }} labels: - {{- include "opengovmail-api-server.labels" . | nindent 4 }} + {{- include "pingmailer-api-server.labels" . | nindent 4 }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -16,4 +16,4 @@ spec: protocol: TCP name: http selector: - {{- include "opengovmail-api-server.selectorLabels" . | nindent 4 }} + {{- include "pingmailer-api-server.selectorLabels" . | nindent 4 }} diff --git a/helm/charts/api-server/templates/serviceaccount.yaml b/helm/charts/api-server/templates/serviceaccount.yaml index 8ccc8b4..fb6a805 100644 --- a/helm/charts/api-server/templates/serviceaccount.yaml +++ b/helm/charts/api-server/templates/serviceaccount.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "opengovmail-api-server.serviceAccountName" . }} + name: {{ include "pingmailer-api-server.serviceAccountName" . }} labels: - {{- include "opengovmail-api-server.labels" . | nindent 4 }} + {{- include "pingmailer-api-server.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/helm/charts/api-server/values.example.yaml b/helm/charts/api-server/values.example.yaml index 4613d64..5c8facb 100644 --- a/helm/charts/api-server/values.example.yaml +++ b/helm/charts/api-server/values.example.yaml @@ -1,8 +1,8 @@ -# Minimal overrides for the opengovmail-api-server chart. +# Minimal overrides for the pingmailer-api-server chart. # Copy to a private file (e.g. my-api-values.yaml) and DO NOT commit. # # helm upgrade --install api-server ./helm/charts/api-server \ -# --namespace opengovmail --create-namespace \ +# --namespace pingmailer --create-namespace \ # -f my-api-values.yaml # ============================================================================ @@ -10,7 +10,7 @@ # cluster can reach. See README for build/push commands. # ============================================================================ image: - repository: "ghcr.io//opengovmail-api-server" + repository: "ghcr.io//pingmailer-api-server" tag: "0.1.0" # ============================================================================ diff --git a/helm/charts/api-server/values.yaml b/helm/charts/api-server/values.yaml index 7e800d1..6933fde 100644 --- a/helm/charts/api-server/values.yaml +++ b/helm/charts/api-server/values.yaml @@ -1,5 +1,5 @@ # --------------------------------------------------------------------------- -# opengovmail-api-server values +# pingmailer-api-server values # # The api-server is a stateless Go HTTP service. It listens on a plain HTTP # port, exposes POST /notify and GET /healthcheck, and relays mail to whatever @@ -24,7 +24,7 @@ replicaCount: 2 # stateless; safe to scale # registry the cluster can reach. See README for build commands. # --------------------------------------------------------------------------- image: - repository: ghcr.io/opengovmail/opengovmail-api-server + repository: ghcr.io/opengovmail/pingmailer-api-server tag: "" pullPolicy: Always diff --git a/helm/charts/opendkim-server/Chart.yaml b/helm/charts/opendkim-server/Chart.yaml index 9a2b571..0a60d74 100644 --- a/helm/charts/opendkim-server/Chart.yaml +++ b/helm/charts/opendkim-server/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: opendkim-server description: | - Helm chart for the OpenDKIM milter (ghcr.io/opengovmail/opengovmail-dkim) used by the - OpenGovMail stack. Generates per-domain DKIM signing keys on + Helm chart for the OpenDKIM milter (ghcr.io/opengovmail/pingmailer-dkim) used by the + PingMailer stack. Generates per-domain DKIM signing keys on first start, persists them in a PVC, and exposes the Milter socket on :8891 for Postfix to consume. type: application @@ -13,9 +13,9 @@ keywords: - dkim - milter - email - - opengovmail + - pingmailer maintainers: - name: OpenGovMail url: https://github.com/OpenGovMail sources: - - https://github.com/OpenGovMail/opengovmail + - https://github.com/OpenGovMail/pingmailer diff --git a/helm/charts/opendkim-server/README.md b/helm/charts/opendkim-server/README.md index fa57da0..bf7368e 100644 --- a/helm/charts/opendkim-server/README.md +++ b/helm/charts/opendkim-server/README.md @@ -1,15 +1,15 @@ -# opengovmail-opendkim Helm chart +# pingmailer-opendkim Helm chart -Helm chart for the OpenDKIM milter (`ghcr.io/opengovmail/opengovmail-dkim`) — the +Helm chart for the OpenDKIM milter (`ghcr.io/opengovmail/pingmailer-dkim`) — the Kubernetes counterpart of the `opendkim-server` service in this repo's [docker-compose.yml](../../../docker-compose.yml). OpenDKIM signs (and verifies) outbound SMTP traffic from Postfix. This chart: 1. Generates `opendkim.conf`, `KeyTable`, `SigningTable`, `TrustedHosts`, and - `opengovmail.yaml` deterministically from your `domains` list and packs them + `pingmailer.yaml` deterministically from your `domains` list and packs them into a `ConfigMap`. -2. Runs the `opengovmail-dkim` image, which inspects `opengovmail.yaml` on startup and +2. Runs the `pingmailer-dkim` image, which inspects `pingmailer.yaml` on startup and calls `opendkim-genkey` for any domain whose private key is not yet on disk at `/etc/dkimkeys//.private`. 3. Persists those generated keys on a `PersistentVolumeClaim` so subsequent @@ -27,7 +27,7 @@ The two mainstream patterns in Kubernetes are: | **Secret-mount** | Pre-generate the private keys, `kubectl create secret`, mount it at `/etc/dkimkeys` | etcd encryption-at-rest, RBAC-gated, easy to mirror across clusters | Manual bootstrap + manual rotation | | **PVC-mount (this chart)** | Container self-bootstraps via `opendkim-genkey` on a PVC | Zero-touch — install and forget | Encryption depends on your `StorageClass`; you own backup | -The `opengovmail-dkim` image is **designed for the PVC pattern** — its entrypoint +The `pingmailer-dkim` image is **designed for the PVC pattern** — its entrypoint runs `opendkim-genkey` for any missing key and writes into `/etc/dkimkeys/`. If you want the Secret pattern instead, point `persistence.existingClaim` at a CSI Secret-backed PVC (or kustomize-patch the Deployment to mount a @@ -50,7 +50,7 @@ domains: ```bash helm upgrade --install opendkim-server ./helm/charts/opendkim-server \ - --namespace opengovmail --create-namespace \ + --namespace pingmailer --create-namespace \ -f my-domains.yaml ``` @@ -58,7 +58,7 @@ Or inline: ```bash helm upgrade --install opendkim-server ./helm/charts/opendkim-server \ - --namespace opengovmail --create-namespace \ + --namespace pingmailer --create-namespace \ --set 'domains[0].domain=example.com' ``` @@ -70,7 +70,7 @@ The chart `fail`s loudly when `domains` is empty. The pod prints them on startup; you can also grab them on demand: ```bash -kubectl -n opengovmail exec deploy/opendkim-server -- \ +kubectl -n pingmailer exec deploy/opendkim-server -- \ sh -c 'for d in /etc/dkimkeys/*; do echo "--- $(basename "$d") ---"; cat "$d"/*.txt; done' ``` @@ -96,7 +96,7 @@ charts share a namespace. | Key | Default | Notes | |------------------------------|--------------------------|-----------------------------------------------------------------------| | `domains` | `[]` (**required**) | List of `{domain, selector?, keySize?}`. `selector` defaults to `mail`, `keySize` to `2048` | -| `image.repository` | `ghcr.io/opengovmail/opengovmail-dkim` | | +| `image.repository` | `ghcr.io/opengovmail/pingmailer-dkim` | | | `image.tag` | `main` | | | `opendkim.mode` | `sv` | `s` = sign only, `v` = verify only, `sv` = both | | `opendkim.trustedHosts` | RFC1918 + loopback | Chart appends each configured domain + `*.` automatically | @@ -117,7 +117,7 @@ charts share a namespace. ## Uninstall ```bash -helm uninstall opendkim-server -n opengovmail +helm uninstall opendkim-server -n pingmailer ``` PVC stays behind — see NOTES.txt to delete it explicitly. diff --git a/helm/charts/opendkim-server/templates/NOTES.txt b/helm/charts/opendkim-server/templates/NOTES.txt index 6c9b167..d79b761 100644 --- a/helm/charts/opendkim-server/templates/NOTES.txt +++ b/helm/charts/opendkim-server/templates/NOTES.txt @@ -1,8 +1,8 @@ -opengovmail-opendkim has been installed. +pingmailer-opendkim has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} -Service: {{ include "opengovmail-opendkim.fullname" . }}:{{ .Values.service.port }} (Milter) +Service: {{ include "pingmailer-opendkim.fullname" . }}:{{ .Values.service.port }} (Milter) Domains configured: {{- range .Values.domains }} @@ -11,11 +11,11 @@ Domains configured: ----- 1. Watch first-time key generation ----- - kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "opengovmail-opendkim.fullname" . }} + kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "pingmailer-opendkim.fullname" . }} The pod prints DKIM DNS TXT records on first start. Capture them with: - kubectl -n {{ .Release.Namespace }} exec deploy/{{ include "opengovmail-opendkim.fullname" . }} \ + kubectl -n {{ .Release.Namespace }} exec deploy/{{ include "pingmailer-opendkim.fullname" . }} \ -- sh -c 'for d in /etc/dkimkeys/*; do echo "--- $(basename "$d") ---"; cat "$d"/*.txt; done' Publish each TXT record at `._domainkey.` in your DNS. @@ -24,8 +24,8 @@ Publish each TXT record at `._domainkey.` in your DNS. In your Postfix smtp-server chart / configmap, add: - smtpd_milters = inet:{{ include "opengovmail-opendkim.fullname" . }}:{{ .Values.service.port }} - non_smtpd_milters = inet:{{ include "opengovmail-opendkim.fullname" . }}:{{ .Values.service.port }} + smtpd_milters = inet:{{ include "pingmailer-opendkim.fullname" . }}:{{ .Values.service.port }} + non_smtpd_milters = inet:{{ include "pingmailer-opendkim.fullname" . }}:{{ .Values.service.port }} milter_default_action = accept (In docker-compose terms: replace `opendkim-server:8891` with the K8s Service @@ -34,10 +34,10 @@ hostname will Just Work as long as both charts share a namespace.) ----- 3. Persistent storage ----- -DKIM private keys live on the PVC `{{ include "opengovmail-opendkim.claimName" . }}` +DKIM private keys live on the PVC `{{ include "pingmailer-opendkim.claimName" . }}` ({{ .Values.persistence.size }}). The PVC survives `helm uninstall` — delete it explicitly to force key regeneration: - kubectl -n {{ .Release.Namespace }} delete pvc {{ include "opengovmail-opendkim.claimName" . }} + kubectl -n {{ .Release.Namespace }} delete pvc {{ include "pingmailer-opendkim.claimName" . }} Back this PVC up: losing it means publishing new TXT records. diff --git a/helm/charts/opendkim-server/templates/_helpers.tpl b/helm/charts/opendkim-server/templates/_helpers.tpl index 4590d65..eb28eff 100644 --- a/helm/charts/opendkim-server/templates/_helpers.tpl +++ b/helm/charts/opendkim-server/templates/_helpers.tpl @@ -1,14 +1,14 @@ {{/* Expand the name of the chart. */}} -{{- define "opengovmail-opendkim.name" -}} +{{- define "pingmailer-opendkim.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Fully qualified app name. */}} -{{- define "opengovmail-opendkim.fullname" -}} +{{- define "pingmailer-opendkim.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -24,16 +24,16 @@ Fully qualified app name. {{/* Chart label. */}} -{{- define "opengovmail-opendkim.chart" -}} +{{- define "pingmailer-opendkim.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels. */}} -{{- define "opengovmail-opendkim.labels" -}} -helm.sh/chart: {{ include "opengovmail-opendkim.chart" . }} -{{ include "opengovmail-opendkim.selectorLabels" . }} +{{- define "pingmailer-opendkim.labels" -}} +helm.sh/chart: {{ include "pingmailer-opendkim.chart" . }} +{{ include "pingmailer-opendkim.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -44,17 +44,17 @@ app.kubernetes.io/component: opendkim {{/* Selector labels. */}} -{{- define "opengovmail-opendkim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "opengovmail-opendkim.name" . }} +{{- define "pingmailer-opendkim.selectorLabels" -}} +app.kubernetes.io/name: {{ include "pingmailer-opendkim.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Service account name. */}} -{{- define "opengovmail-opendkim.serviceAccountName" -}} +{{- define "pingmailer-opendkim.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "opengovmail-opendkim.fullname" .) .Values.serviceAccount.name }} +{{- default (include "pingmailer-opendkim.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} @@ -63,11 +63,11 @@ Service account name. {{/* PVC claim name (existing or chart-managed). */}} -{{- define "opengovmail-opendkim.claimName" -}} +{{- define "pingmailer-opendkim.claimName" -}} {{- if .Values.persistence.existingClaim }} {{- .Values.persistence.existingClaim }} {{- else }} -{{- printf "%s-keys" (include "opengovmail-opendkim.fullname" .) }} +{{- printf "%s-keys" (include "pingmailer-opendkim.fullname" .) }} {{- end }} {{- end }} @@ -75,7 +75,7 @@ PVC claim name (existing or chart-managed). Normalize a single domain entry to a dict with domain/selector/keySize. Pass the entry as the context. */}} -{{- define "opengovmail-opendkim.domain" -}} +{{- define "pingmailer-opendkim.domain" -}} {{- $entry := . -}} {{- $selector := default "mail" $entry.selector -}} {{- $keySize := default 2048 $entry.keySize -}} diff --git a/helm/charts/opendkim-server/templates/configmap.yaml b/helm/charts/opendkim-server/templates/configmap.yaml index 95af6cc..e41f2cd 100644 --- a/helm/charts/opendkim-server/templates/configmap.yaml +++ b/helm/charts/opendkim-server/templates/configmap.yaml @@ -5,9 +5,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "opengovmail-opendkim.fullname" . }}-conf + name: {{ include "pingmailer-opendkim.fullname" . }}-conf labels: - {{- include "opengovmail-opendkim.labels" . | nindent 4 }} + {{- include "pingmailer-opendkim.labels" . | nindent 4 }} data: opendkim.conf: | AutoRestart {{ .Values.opendkim.autoRestart }} @@ -60,7 +60,7 @@ data: {{ $selector }}._domainkey.{{ .domain }} {{ .domain }}:{{ $selector }}:/etc/dkimkeys/{{ .domain }}/{{ $selector }}.private {{- end }} - opengovmail.yaml: | + pingmailer.yaml: | domains: {{- range .Values.domains }} - domain: {{ .domain }} diff --git a/helm/charts/opendkim-server/templates/deployment.yaml b/helm/charts/opendkim-server/templates/deployment.yaml index fa94600..9ba01f4 100644 --- a/helm/charts/opendkim-server/templates/deployment.yaml +++ b/helm/charts/opendkim-server/templates/deployment.yaml @@ -1,29 +1,29 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "opengovmail-opendkim.fullname" . }} + name: {{ include "pingmailer-opendkim.fullname" . }} labels: - {{- include "opengovmail-opendkim.labels" . | nindent 4 }} + {{- include "pingmailer-opendkim.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: type: Recreate # PVC is RWO and DKIM is singleton — avoid rolling. selector: matchLabels: - {{- include "opengovmail-opendkim.selectorLabels" . | nindent 6 }} + {{- include "pingmailer-opendkim.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "opengovmail-opendkim.selectorLabels" . | nindent 8 }} + {{- include "pingmailer-opendkim.selectorLabels" . | nindent 8 }} annotations: # Roll the pod when the ConfigMap (and therefore opendkim.conf / - # KeyTable / SigningTable / TrustedHosts / opengovmail.yaml) changes. + # KeyTable / SigningTable / TrustedHosts / pingmailer.yaml) changes. checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "opengovmail-opendkim.serviceAccountName" . }} + serviceAccountName: {{ include "pingmailer-opendkim.serviceAccountName" . }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -62,8 +62,8 @@ spec: subPath: TrustedHosts readOnly: true - name: config - mountPath: /etc/opendkim/opengovmail.yaml - subPath: opengovmail.yaml + mountPath: /etc/opendkim/pingmailer.yaml + subPath: pingmailer.yaml readOnly: true - name: keys mountPath: /etc/dkimkeys @@ -88,11 +88,11 @@ spec: volumes: - name: config configMap: - name: {{ include "opengovmail-opendkim.fullname" . }}-conf + name: {{ include "pingmailer-opendkim.fullname" . }}-conf - name: keys {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ include "opengovmail-opendkim.claimName" . }} + claimName: {{ include "pingmailer-opendkim.claimName" . }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm/charts/opendkim-server/templates/pvc.yaml b/helm/charts/opendkim-server/templates/pvc.yaml index 35d7cec..fcc6517 100644 --- a/helm/charts/opendkim-server/templates/pvc.yaml +++ b/helm/charts/opendkim-server/templates/pvc.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "opengovmail-opendkim.claimName" . }} + name: {{ include "pingmailer-opendkim.claimName" . }} labels: - {{- include "opengovmail-opendkim.labels" . | nindent 4 }} + {{- include "pingmailer-opendkim.labels" . | nindent 4 }} spec: accessModes: {{- toYaml .Values.persistence.accessModes | nindent 4 }} diff --git a/helm/charts/opendkim-server/templates/service.yaml b/helm/charts/opendkim-server/templates/service.yaml index a8354a5..32d431f 100644 --- a/helm/charts/opendkim-server/templates/service.yaml +++ b/helm/charts/opendkim-server/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "opengovmail-opendkim.fullname" . }} + name: {{ include "pingmailer-opendkim.fullname" . }} labels: - {{- include "opengovmail-opendkim.labels" . | nindent 4 }} + {{- include "pingmailer-opendkim.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -12,4 +12,4 @@ spec: protocol: TCP name: milter selector: - {{- include "opengovmail-opendkim.selectorLabels" . | nindent 4 }} + {{- include "pingmailer-opendkim.selectorLabels" . | nindent 4 }} diff --git a/helm/charts/opendkim-server/templates/serviceaccount.yaml b/helm/charts/opendkim-server/templates/serviceaccount.yaml index f99665f..6562b03 100644 --- a/helm/charts/opendkim-server/templates/serviceaccount.yaml +++ b/helm/charts/opendkim-server/templates/serviceaccount.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "opengovmail-opendkim.serviceAccountName" . }} + name: {{ include "pingmailer-opendkim.serviceAccountName" . }} labels: - {{- include "opengovmail-opendkim.labels" . | nindent 4 }} + {{- include "pingmailer-opendkim.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/helm/charts/opendkim-server/values.yaml b/helm/charts/opendkim-server/values.yaml index 794bdb3..27d8bb2 100644 --- a/helm/charts/opendkim-server/values.yaml +++ b/helm/charts/opendkim-server/values.yaml @@ -1,11 +1,11 @@ # --------------------------------------------------------------------------- -# opengovmail-opendkim values +# pingmailer-opendkim values # # Sensitive values (the domain list) are intentionally empty here. Provide # them at install/upgrade time, e.g.: # # helm upgrade --install opendkim-server ./helm/charts/opendkim-server \ -# --namespace opengovmail --create-namespace \ +# --namespace pingmailer --create-namespace \ # -f my-domains.yaml # # Where my-domains.yaml contains: @@ -25,8 +25,8 @@ replicaCount: 1 # MUST stay 1 — DKIM keys live on a single-writer PVC. image: # OpenShift-compatible image: entrypoint is world-executable and writable # dirs are group-owned by GID 0, so it runs under an arbitrary non-root UID. - # Built from mail-infra/images/opengovmail-dkim. - repository: ghcr.io/opengovmail/opengovmail-dkim + # Built from mail-infra/images/pingmailer-dkim. + repository: ghcr.io/opengovmail/pingmailer-dkim tag: latest pullPolicy: Always @@ -81,7 +81,7 @@ service: port: 8891 # --------------------------------------------------------------------------- -# Persistent storage for /etc/dkimkeys. opengovmail-dkim generates per-domain +# Persistent storage for /etc/dkimkeys. pingmailer-dkim generates per-domain # private keys here on first start and reuses them across restarts. # # Trade-off vs storing keys in a Secret: diff --git a/helm/charts/raven-sasl-server/Chart.yaml b/helm/charts/raven-sasl-server/Chart.yaml index 2a794d5..fab343f 100644 --- a/helm/charts/raven-sasl-server/Chart.yaml +++ b/helm/charts/raven-sasl-server/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: raven-sasl-server description: | Helm chart for the raven-sasl service (ghcr.io/opengovmail/raven-sasl) used by - the OpenGovMail stack. Provides a Dovecot-compatible SASL + the PingMailer stack. Provides a Dovecot-compatible SASL authentication daemon on :12345 that delegates credential checks to Thunder and validates OAUTHBEARER tokens against an OAuth client/email allowlist. Postfix connects via smtpd_sasl_path = inet:raven-sasl:12345. @@ -15,9 +15,9 @@ keywords: - dovecot - oauth - email - - opengovmail + - pingmailer maintainers: - name: OpenGovMail url: https://github.com/OpenGovMail sources: - - https://github.com/OpenGovMail/opengovmail + - https://github.com/OpenGovMail/pingmailer diff --git a/helm/charts/raven-sasl-server/README.md b/helm/charts/raven-sasl-server/README.md index bbb4e2f..68a846e 100644 --- a/helm/charts/raven-sasl-server/README.md +++ b/helm/charts/raven-sasl-server/README.md @@ -1,4 +1,4 @@ -# opengovmail-raven-sasl Helm chart +# pingmailer-raven-sasl Helm chart Helm chart for the `raven-sasl` service (`ghcr.io/opengovmail/raven-sasl`) — the Kubernetes counterpart of the `raven-sasl-server` block in this repo's @@ -25,7 +25,7 @@ It validates two flavours of credentials: - A `ClusterIP Service` on port 12345 named `raven-sasl` (configurable) so the existing Postfix `master.cf` (`inet:raven-sasl:12345`) works unmodified. - Optionally mounts a cert-manager-managed `Secret` at `/certs` - (compatible with the [opengovmail-certificates chart](../certbot-server/) — + (compatible with the [pingmailer-certificates chart](../certbot-server/) — `-tls` Secrets with `tls.crt`/`tls.key` keys get remapped to `fullchain.pem`/`privkey.pem` automatically). @@ -55,14 +55,14 @@ oauthEmailAuthorization: - alerts@example.com - noreply@example.com -# Optional — TLS Secret produced by the opengovmail-certificates chart +# Optional — TLS Secret produced by the pingmailer-certificates chart tlsSecret: name: mail-example-com-tls ``` ```bash helm upgrade --install raven-sasl ./helm/charts/raven-sasl-server \ - --namespace opengovmail --create-namespace \ + --namespace pingmailer --create-namespace \ -f my-raven-values.yaml ``` @@ -118,7 +118,7 @@ when Thunder is in a different namespace or behind an ingress. ## Uninstall ```bash -helm uninstall raven-sasl -n opengovmail +helm uninstall raven-sasl -n pingmailer ``` Nothing persistent is created by this chart — uninstall is clean. diff --git a/helm/charts/raven-sasl-server/templates/NOTES.txt b/helm/charts/raven-sasl-server/templates/NOTES.txt index 0b8faf5..8751278 100644 --- a/helm/charts/raven-sasl-server/templates/NOTES.txt +++ b/helm/charts/raven-sasl-server/templates/NOTES.txt @@ -1,8 +1,8 @@ -opengovmail-raven-sasl has been installed. +pingmailer-raven-sasl has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} -Service: {{ include "opengovmail-raven-sasl.fullname" . }}:{{ .Values.service.port }} (Dovecot SASL) +Service: {{ include "pingmailer-raven-sasl.fullname" . }}:{{ .Values.service.port }} (Dovecot SASL) Domain: {{ .Values.config.domain }} OAuth audiences accepted: @@ -15,7 +15,7 @@ OAuth audiences accepted: In your smtp-server (Postfix) chart, set: smtpd_sasl_type = dovecot - smtpd_sasl_path = inet:{{ include "opengovmail-raven-sasl.fullname" . }}:{{ .Values.service.port }} + smtpd_sasl_path = inet:{{ include "pingmailer-raven-sasl.fullname" . }}:{{ .Values.service.port }} smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous @@ -24,11 +24,11 @@ master.cf string working when both charts share a namespace.) ----- Check the pod ----- - kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "opengovmail-raven-sasl.fullname" . }} + kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "pingmailer-raven-sasl.fullname" . }} # TCP smoke test kubectl -n {{ .Release.Namespace }} run -it --rm tmp-busybox --image=busybox --restart=Never -- \ - sh -c 'nc -zv {{ include "opengovmail-raven-sasl.fullname" . }} {{ .Values.service.port }}' + sh -c 'nc -zv {{ include "pingmailer-raven-sasl.fullname" . }} {{ .Values.service.port }}' ----- Upgrade with new sensitive values ----- @@ -43,5 +43,5 @@ fullchain.pem + privkey.pem. No TLS Secret was provided (tlsSecret.name is empty). If raven needs TLS certs (e.g. to call thunder over HTTPS with a private CA), point `tlsSecret.name` at a cert-manager-managed Secret like -`-tls` from the opengovmail-certificates chart. +`-tls` from the pingmailer-certificates chart. {{- end }} diff --git a/helm/charts/raven-sasl-server/templates/_helpers.tpl b/helm/charts/raven-sasl-server/templates/_helpers.tpl index f6f7d65..aa717b8 100644 --- a/helm/charts/raven-sasl-server/templates/_helpers.tpl +++ b/helm/charts/raven-sasl-server/templates/_helpers.tpl @@ -1,8 +1,8 @@ -{{- define "opengovmail-raven-sasl.name" -}} +{{- define "pingmailer-raven-sasl.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} -{{- define "opengovmail-raven-sasl.fullname" -}} +{{- define "pingmailer-raven-sasl.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -15,13 +15,13 @@ {{- end }} {{- end }} -{{- define "opengovmail-raven-sasl.chart" -}} +{{- define "pingmailer-raven-sasl.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} -{{- define "opengovmail-raven-sasl.labels" -}} -helm.sh/chart: {{ include "opengovmail-raven-sasl.chart" . }} -{{ include "opengovmail-raven-sasl.selectorLabels" . }} +{{- define "pingmailer-raven-sasl.labels" -}} +helm.sh/chart: {{ include "pingmailer-raven-sasl.chart" . }} +{{ include "pingmailer-raven-sasl.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -29,14 +29,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/component: sasl {{- end }} -{{- define "opengovmail-raven-sasl.selectorLabels" -}} -app.kubernetes.io/name: {{ include "opengovmail-raven-sasl.name" . }} +{{- define "pingmailer-raven-sasl.selectorLabels" -}} +app.kubernetes.io/name: {{ include "pingmailer-raven-sasl.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- define "opengovmail-raven-sasl.serviceAccountName" -}} +{{- define "pingmailer-raven-sasl.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "opengovmail-raven-sasl.fullname" .) .Values.serviceAccount.name }} +{{- default (include "pingmailer-raven-sasl.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} @@ -46,7 +46,7 @@ app.kubernetes.io/instance: {{ .Release.Name }} Derive oauth_issuer_url from config.oauth.issuerUrl if set, otherwise from config.domain (https://:8090). */}} -{{- define "opengovmail-raven-sasl.issuerUrl" -}} +{{- define "pingmailer-raven-sasl.issuerUrl" -}} {{- if .Values.config.oauth.issuerUrl -}} {{ .Values.config.oauth.issuerUrl }} {{- else -}} @@ -57,7 +57,7 @@ https://{{ required "config.domain is required" .Values.config.domain }}:8090 {{/* Derive oauth_jwks_url similarly. */}} -{{- define "opengovmail-raven-sasl.jwksUrl" -}} +{{- define "pingmailer-raven-sasl.jwksUrl" -}} {{- if .Values.config.oauth.jwksUrl -}} {{ .Values.config.oauth.jwksUrl }} {{- else -}} diff --git a/helm/charts/raven-sasl-server/templates/configmap.yaml b/helm/charts/raven-sasl-server/templates/configmap.yaml index beceba7..e173607 100644 --- a/helm/charts/raven-sasl-server/templates/configmap.yaml +++ b/helm/charts/raven-sasl-server/templates/configmap.yaml @@ -11,9 +11,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "opengovmail-raven-sasl.fullname" . }}-conf + name: {{ include "pingmailer-raven-sasl.fullname" . }}-conf labels: - {{- include "opengovmail-raven-sasl.labels" . | nindent 4 }} + {{- include "pingmailer-raven-sasl.labels" . | nindent 4 }} data: raven.yaml: | domain: {{ .Values.config.domain }} @@ -22,8 +22,8 @@ data: sasl_scope: {{ .Values.config.saslScope | quote }} # OAUTHBEARER Token Validation (RFC 7628) - oauth_issuer_url: {{ include "opengovmail-raven-sasl.issuerUrl" . | quote }} - oauth_jwks_url: {{ include "opengovmail-raven-sasl.jwksUrl" . | quote }} + oauth_issuer_url: {{ include "pingmailer-raven-sasl.issuerUrl" . | quote }} + oauth_jwks_url: {{ include "pingmailer-raven-sasl.jwksUrl" . | quote }} oauth_audience: {{- range .Values.config.oauth.audience }} - {{ . | quote }} diff --git a/helm/charts/raven-sasl-server/templates/deployment.yaml b/helm/charts/raven-sasl-server/templates/deployment.yaml index 78346bf..cfa9c2a 100644 --- a/helm/charts/raven-sasl-server/templates/deployment.yaml +++ b/helm/charts/raven-sasl-server/templates/deployment.yaml @@ -1,25 +1,25 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "opengovmail-raven-sasl.fullname" . }} + name: {{ include "pingmailer-raven-sasl.fullname" . }} labels: - {{- include "opengovmail-raven-sasl.labels" . | nindent 4 }} + {{- include "pingmailer-raven-sasl.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "opengovmail-raven-sasl.selectorLabels" . | nindent 6 }} + {{- include "pingmailer-raven-sasl.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "opengovmail-raven-sasl.selectorLabels" . | nindent 8 }} + {{- include "pingmailer-raven-sasl.selectorLabels" . | nindent 8 }} annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "opengovmail-raven-sasl.serviceAccountName" . }} + serviceAccountName: {{ include "pingmailer-raven-sasl.serviceAccountName" . }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -71,7 +71,7 @@ spec: volumes: - name: config configMap: - name: {{ include "opengovmail-raven-sasl.fullname" . }}-conf + name: {{ include "pingmailer-raven-sasl.fullname" . }}-conf {{- if .Values.tlsSecret.name }} - name: tls secret: diff --git a/helm/charts/raven-sasl-server/templates/service.yaml b/helm/charts/raven-sasl-server/templates/service.yaml index 62c5f90..ee536ef 100644 --- a/helm/charts/raven-sasl-server/templates/service.yaml +++ b/helm/charts/raven-sasl-server/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "opengovmail-raven-sasl.fullname" . }} + name: {{ include "pingmailer-raven-sasl.fullname" . }} labels: - {{- include "opengovmail-raven-sasl.labels" . | nindent 4 }} + {{- include "pingmailer-raven-sasl.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -12,4 +12,4 @@ spec: protocol: TCP name: sasl selector: - {{- include "opengovmail-raven-sasl.selectorLabels" . | nindent 4 }} + {{- include "pingmailer-raven-sasl.selectorLabels" . | nindent 4 }} diff --git a/helm/charts/raven-sasl-server/templates/serviceaccount.yaml b/helm/charts/raven-sasl-server/templates/serviceaccount.yaml index 7833b3e..137f5dd 100644 --- a/helm/charts/raven-sasl-server/templates/serviceaccount.yaml +++ b/helm/charts/raven-sasl-server/templates/serviceaccount.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "opengovmail-raven-sasl.serviceAccountName" . }} + name: {{ include "pingmailer-raven-sasl.serviceAccountName" . }} labels: - {{- include "opengovmail-raven-sasl.labels" . | nindent 4 }} + {{- include "pingmailer-raven-sasl.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/helm/charts/raven-sasl-server/values.yaml b/helm/charts/raven-sasl-server/values.yaml index 051c0ab..ed397c9 100644 --- a/helm/charts/raven-sasl-server/values.yaml +++ b/helm/charts/raven-sasl-server/values.yaml @@ -1,11 +1,11 @@ # --------------------------------------------------------------------------- -# opengovmail-raven-sasl values +# pingmailer-raven-sasl values # # Sensitive values (mail domain, OAuth audience, email allowlist, TLS secret # name) are intentionally empty here. Supply them at install/upgrade time: # # helm upgrade --install raven-sasl ./helm/charts/raven-sasl-server \ -# --namespace opengovmail --create-namespace \ +# --namespace pingmailer --create-namespace \ # -f my-raven-values.yaml # # Where my-raven-values.yaml contains the secrets (DO NOT commit). @@ -73,7 +73,7 @@ oauthEmailAuthorization: {} # - noreply@example.com # --------------------------------------------------------------------------- -# TLS certs mounted at /certs (compatible with the opengovmail-certificates chart, +# TLS certs mounted at /certs (compatible with the pingmailer-certificates chart, # which produces Secrets named -tls with tls.crt + tls.key). # # Leave .name empty to skip the mount entirely. Set .alreadyRenamed=true if diff --git a/helm/charts/smtp-server/Chart.yaml b/helm/charts/smtp-server/Chart.yaml index c71920f..4cfb5f6 100644 --- a/helm/charts/smtp-server/Chart.yaml +++ b/helm/charts/smtp-server/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: smtp-server description: | - Helm chart for the Postfix-based SMTP server (ghcr.io/opengovmail/opengovmail-smtp) - used by the OpenGovMail stack. Renders main.cf / master.cf / + Helm chart for the Postfix-based SMTP server (ghcr.io/opengovmail/pingmailer-smtp) + used by the PingMailer stack. Renders main.cf / master.cf / recipient_access from values, wires Postfix to opendkim-server, raven-sasl, and (optionally) rspamd-server, mounts TLS certs from a cert-manager Secret, and persists the mail queue on a PVC. @@ -13,9 +13,9 @@ keywords: - postfix - smtp - email - - opengovmail + - pingmailer maintainers: - name: OpenGovMail url: https://github.com/OpenGovMail sources: - - https://github.com/OpenGovMail/opengovmail + - https://github.com/OpenGovMail/pingmailer diff --git a/helm/charts/smtp-server/README.md b/helm/charts/smtp-server/README.md index b89198b..588711a 100644 --- a/helm/charts/smtp-server/README.md +++ b/helm/charts/smtp-server/README.md @@ -1,19 +1,19 @@ -# opengovmail-smtp Helm chart +# pingmailer-smtp Helm chart -Helm chart for the Postfix-based SMTP server (`ghcr.io/opengovmail/opengovmail-smtp`) — +Helm chart for the Postfix-based SMTP server (`ghcr.io/opengovmail/pingmailer-smtp`) — the Kubernetes counterpart of the `smtp-server` block in this repo's [docker-compose.yml](../../../docker-compose.yml). -This is the third of four OpenGovMail mail-plane charts. Install order: +This is the third of four Pingmailer mail-plane charts. Install order: -1. [opengovmail-certificates](../certbot-server/) — issues TLS certs via cert-manager. -2. [opengovmail-opendkim](../opendkim-server/) — DKIM milter on `:8891`. -3. [opengovmail-raven-sasl](../raven-sasl-server/) — SASL auth daemon on `:12345`. -4. **opengovmail-smtp** (this chart) — Postfix on `:25` (+ optional submission `:587`). +1. [pingmailer-certificates](../certbot-server/) — issues TLS certs via cert-manager. +2. [pingmailer-opendkim](../opendkim-server/) — DKIM milter on `:8891`. +3. [pingmailer-raven-sasl](../raven-sasl-server/) — SASL auth daemon on `:12345`. +4. **pingmailer-smtp** (this chart) — Postfix on `:25` (+ optional submission `:587`). ## What this chart deploys -- A `ConfigMap` that templates `main.cf`, `master.cf`, `opengovmail.yaml`, and +- A `ConfigMap` that templates `main.cf`, `master.cf`, `pingmailer.yaml`, and `recipient_access` from your values. The docker-compose flow renders these via a host-side `gen-postfix-conf.sh`; the chart does it in Helm. - A `Deployment` whose **init container**: @@ -55,12 +55,12 @@ Sensitive values stay out of `values.yaml`: # my-smtp-values.yaml domain: mail.example.com tlsSecret: - name: mail-example-com-tls # produced by the opengovmail-certificates chart + name: mail-example-com-tls # produced by the pingmailer-certificates chart ``` ```bash helm upgrade --install smtp-server ./helm/charts/smtp-server \ - --namespace opengovmail --create-namespace \ + --namespace pingmailer --create-namespace \ -f my-smtp-values.yaml ``` @@ -148,7 +148,7 @@ support case to unblock 25. ## Uninstall ```bash -helm uninstall smtp-server -n opengovmail +helm uninstall smtp-server -n pingmailer ``` The spool PVC is preserved (in-flight mail). Delete it explicitly to diff --git a/helm/charts/smtp-server/templates/NOTES.txt b/helm/charts/smtp-server/templates/NOTES.txt index 785f998..2702591 100644 --- a/helm/charts/smtp-server/templates/NOTES.txt +++ b/helm/charts/smtp-server/templates/NOTES.txt @@ -1,11 +1,11 @@ -opengovmail-smtp has been installed. +pingmailer-smtp has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} -Hostname: {{ include "opengovmail-smtp.hostname" . }} +Hostname: {{ include "pingmailer-smtp.hostname" . }} Domain: {{ .Values.domain }} -Service: {{ include "opengovmail-smtp.fullname" . }} +Service: {{ include "pingmailer-smtp.fullname" . }} SMTP: :{{ .Values.service.smtpPort }} {{- if .Values.postfix.submission.enabled }} Submission: :{{ .Values.service.submissionPort }} @@ -13,7 +13,7 @@ Service: {{ include "opengovmail-smtp.fullname" . }} ----- 1. Check the pod is up ----- - kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "opengovmail-smtp.fullname" . }} + kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "pingmailer-smtp.fullname" . }} kubectl -n {{ .Release.Namespace }} get pod -l app.kubernetes.io/instance={{ .Release.Name }} ----- 2. Service exposure ----- @@ -35,11 +35,11 @@ Type: {{ .Values.service.type }} Watch the LoadBalancer get its address (stays if the cluster has no L4 LB provider — fall back to NodePort in that case): - kubectl -n {{ .Release.Namespace }} get svc {{ include "opengovmail-smtp.fullname" . }} -w + kubectl -n {{ .Release.Namespace }} get svc {{ include "pingmailer-smtp.fullname" . }} -w Then publish DNS: - MX {{ .Values.domain }}. 10 {{ include "opengovmail-smtp.hostname" . }}. - A {{ include "opengovmail-smtp.hostname" . }}. + MX {{ .Values.domain }}. 10 {{ include "pingmailer-smtp.hostname" . }}. + A {{ include "pingmailer-smtp.hostname" . }}. Test from outside: openssl s_client -starttls smtp -connect :{{ .Values.service.submissionPort }} @@ -47,7 +47,7 @@ Type: {{ .Values.service.type }} {{- else if eq .Values.service.type "NodePort" }} Find the assigned node ports: - kubectl -n {{ .Release.Namespace }} get svc {{ include "opengovmail-smtp.fullname" . }} \ + kubectl -n {{ .Release.Namespace }} get svc {{ include "pingmailer-smtp.fullname" . }} \ -o jsonpath='{range .spec.ports[*]}{.name}={.nodePort}{"\n"}{end}' Connect from outside to :. Have your @@ -58,22 +58,22 @@ Type: {{ .Values.service.type }} ----- 3. Dependencies (charts you should already have installed) ----- - opengovmail-opendkim (Service: opendkim-server:8891) - opengovmail-raven-sasl (Service: raven-sasl:12345) - opengovmail-certificates (TLS Secret: {{ .Values.tlsSecret.name | default "(not set)" }}) + pingmailer-opendkim (Service: opendkim-server:8891) + pingmailer-raven-sasl (Service: raven-sasl:12345) + pingmailer-certificates (TLS Secret: {{ .Values.tlsSecret.name | default "(not set)" }}) ----- 4. Mail queue ----- -The Postfix mail queue lives on the PVC `{{ include "opengovmail-smtp.spoolClaim" . }}` +The Postfix mail queue lives on the PVC `{{ include "pingmailer-smtp.spoolClaim" . }}` ({{ .Values.persistence.spool.size }}). Survives `helm uninstall`; delete explicitly to discard in-flight mail: - kubectl -n {{ .Release.Namespace }} delete pvc {{ include "opengovmail-smtp.spoolClaim" . }} + kubectl -n {{ .Release.Namespace }} delete pvc {{ include "pingmailer-smtp.spoolClaim" . }} ----- 5. Smoke-test SMTP ----- kubectl -n {{ .Release.Namespace }} run -it --rm tmp --image=busybox --restart=Never -- \ - sh -c 'nc -v {{ include "opengovmail-smtp.fullname" . }} {{ .Values.service.smtpPort }} <`. */}} -{{- define "opengovmail-smtp.hostname" -}} +{{- define "pingmailer-smtp.hostname" -}} {{- if .Values.hostname -}} {{ .Values.hostname }} {{- else -}} @@ -56,10 +56,10 @@ mail.{{ required "domain is required" .Values.domain }} {{/* PVC claim name for the postfix spool. */}} -{{- define "opengovmail-smtp.spoolClaim" -}} +{{- define "pingmailer-smtp.spoolClaim" -}} {{- if .Values.persistence.spool.existingClaim }} {{- .Values.persistence.spool.existingClaim }} {{- else }} -{{- printf "%s-spool" (include "opengovmail-smtp.fullname" .) }} +{{- printf "%s-spool" (include "pingmailer-smtp.fullname" .) }} {{- end }} {{- end }} diff --git a/helm/charts/smtp-server/templates/configmap.yaml b/helm/charts/smtp-server/templates/configmap.yaml index 2dc7154..96e107b 100644 --- a/helm/charts/smtp-server/templates/configmap.yaml +++ b/helm/charts/smtp-server/templates/configmap.yaml @@ -2,27 +2,27 @@ {{- fail "domain is required — pass via -f my-values.yaml or --set domain=example.com" }} {{- end }} {{- if and .Values.postfix.submission.enabled (not .Values.tlsSecret.name) }} -{{- fail "tlsSecret.name is required when postfix.submission.enabled=true (submission/587 enforces STARTTLS). Point this at a cert-manager Secret produced by the opengovmail-certificates chart." }} +{{- fail "tlsSecret.name is required when postfix.submission.enabled=true (submission/587 enforces STARTTLS). Point this at a cert-manager Secret produced by the pingmailer-certificates chart." }} {{- end }} --- apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "opengovmail-smtp.fullname" . }}-conf + name: {{ include "pingmailer-smtp.fullname" . }}-conf labels: - {{- include "opengovmail-smtp.labels" . | nindent 4 }} + {{- include "pingmailer-smtp.labels" . | nindent 4 }} data: - opengovmail.yaml: | + pingmailer.yaml: | domains: - domain: {{ .Values.domain }} main.cf: | # =========================================================== - # main.cf — rendered by the opengovmail-smtp Helm chart + # main.cf — rendered by the pingmailer-smtp Helm chart # =========================================================== # --- Identity --- - myhostname = {{ include "opengovmail-smtp.hostname" . }} + myhostname = {{ include "pingmailer-smtp.hostname" . }} mydomain = {{ .Values.domain }} myorigin = $mydomain mydestination = localhost.localdomain, localhost @@ -84,7 +84,7 @@ data: master.cf: | # =========================================================== - # master.cf — rendered by the opengovmail-smtp Helm chart + # master.cf — rendered by the pingmailer-smtp Helm chart # # chroot column is "n" for every service (chroot is redundant in a container # and needs CAP_SYS_CHROOT). The smtp/submission listeners use HIGH ports diff --git a/helm/charts/smtp-server/templates/deployment.yaml b/helm/charts/smtp-server/templates/deployment.yaml index ed80695..55f59f1 100644 --- a/helm/charts/smtp-server/templates/deployment.yaml +++ b/helm/charts/smtp-server/templates/deployment.yaml @@ -1,27 +1,27 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "opengovmail-smtp.fullname" . }} + name: {{ include "pingmailer-smtp.fullname" . }} labels: - {{- include "opengovmail-smtp.labels" . | nindent 4 }} + {{- include "pingmailer-smtp.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: type: Recreate # Postfix queue PVC is RWO — avoid rolling. selector: matchLabels: - {{- include "opengovmail-smtp.selectorLabels" . | nindent 6 }} + {{- include "pingmailer-smtp.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "opengovmail-smtp.selectorLabels" . | nindent 8 }} + {{- include "pingmailer-smtp.selectorLabels" . | nindent 8 }} annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "opengovmail-smtp.serviceAccountName" . }} + serviceAccountName: {{ include "pingmailer-smtp.serviceAccountName" . }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -55,7 +55,7 @@ spec: cp -rL /etc/postfix/. /shared-postfix/ cp /configs/main.cf /shared-postfix/main.cf cp /configs/master.cf /shared-postfix/master.cf - cp /configs/opengovmail.yaml /shared-postfix/opengovmail.yaml + cp /configs/pingmailer.yaml /shared-postfix/pingmailer.yaml cp /configs/recipient_access /shared-postfix/recipient_access postmap /shared-postfix/recipient_access echo "✓ /etc/postfix prepared, recipient_access compiled." @@ -109,13 +109,13 @@ spec: volumes: - name: configs configMap: - name: {{ include "opengovmail-smtp.fullname" . }}-conf + name: {{ include "pingmailer-smtp.fullname" . }}-conf - name: postfix-etc emptyDir: {} - name: spool {{- if .Values.persistence.spool.enabled }} persistentVolumeClaim: - claimName: {{ include "opengovmail-smtp.spoolClaim" . }} + claimName: {{ include "pingmailer-smtp.spoolClaim" . }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm/charts/smtp-server/templates/pvc.yaml b/helm/charts/smtp-server/templates/pvc.yaml index 825930b..005e951 100644 --- a/helm/charts/smtp-server/templates/pvc.yaml +++ b/helm/charts/smtp-server/templates/pvc.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "opengovmail-smtp.spoolClaim" . }} + name: {{ include "pingmailer-smtp.spoolClaim" . }} labels: - {{- include "opengovmail-smtp.labels" . | nindent 4 }} + {{- include "pingmailer-smtp.labels" . | nindent 4 }} spec: accessModes: {{- toYaml .Values.persistence.spool.accessModes | nindent 4 }} diff --git a/helm/charts/smtp-server/templates/service.yaml b/helm/charts/smtp-server/templates/service.yaml index dba5336..3553cd1 100644 --- a/helm/charts/smtp-server/templates/service.yaml +++ b/helm/charts/smtp-server/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "opengovmail-smtp.fullname" . }} + name: {{ include "pingmailer-smtp.fullname" . }} labels: - {{- include "opengovmail-smtp.labels" . | nindent 4 }} + {{- include "pingmailer-smtp.labels" . | nindent 4 }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -38,4 +38,4 @@ spec: {{- end }} {{- end }} selector: - {{- include "opengovmail-smtp.selectorLabels" . | nindent 4 }} + {{- include "pingmailer-smtp.selectorLabels" . | nindent 4 }} diff --git a/helm/charts/smtp-server/templates/serviceaccount.yaml b/helm/charts/smtp-server/templates/serviceaccount.yaml index 9efb8c6..490c19d 100644 --- a/helm/charts/smtp-server/templates/serviceaccount.yaml +++ b/helm/charts/smtp-server/templates/serviceaccount.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "opengovmail-smtp.serviceAccountName" . }} + name: {{ include "pingmailer-smtp.serviceAccountName" . }} labels: - {{- include "opengovmail-smtp.labels" . | nindent 4 }} + {{- include "pingmailer-smtp.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/helm/charts/smtp-server/values.yaml b/helm/charts/smtp-server/values.yaml index fbcdec2..c00fef7 100644 --- a/helm/charts/smtp-server/values.yaml +++ b/helm/charts/smtp-server/values.yaml @@ -1,11 +1,11 @@ # --------------------------------------------------------------------------- -# opengovmail-smtp values +# pingmailer-smtp values # # Sensitive values (mail domain, TLS Secret name) are intentionally empty # here. Supply them at install/upgrade time: # # helm upgrade --install smtp-server ./helm/charts/smtp-server \ -# --namespace opengovmail --create-namespace \ +# --namespace pingmailer --create-namespace \ # -f my-smtp-values.yaml # --------------------------------------------------------------------------- @@ -18,12 +18,12 @@ fullnameOverride: "smtp-server" replicaCount: 1 image: - # Patched-Postfix (rootless) image built from mail-infra/images/opengovmail-smtp-rootless. + # Patched-Postfix (rootless) image built from mail-infra/images/pingmailer-smtp-rootless. # The postfix/master/postsuper getuid()==0 checks are removed and the # set_eugid/set_ugid/chroot_uid privilege-drops are no-op'd for non-root, so # Postfix runs single-UID as the arbitrary non-root UID OpenShift assigns # under restricted-v2 — no custom SCC / anyuid grant required. - repository: ghcr.io/opengovmail/opengovmail-smtp + repository: ghcr.io/opengovmail/pingmailer-smtp tag: rootless pullPolicy: Always @@ -68,7 +68,7 @@ postfix: milterProtocol: 6 milterDefaultAction: accept - # SASL — points at opengovmail-raven-sasl. + # SASL — points at pingmailer-raven-sasl. sasl: type: dovecot path: "inet:raven-sasl:12345" @@ -103,7 +103,7 @@ postfix: # - "myorigin = $mydomain" # --------------------------------------------------------------------------- -# TLS certificate Secret (typically produced by the opengovmail-certificates +# TLS certificate Secret (typically produced by the pingmailer-certificates # chart with keys `tls.crt` + `tls.key`). The chart remaps them to # fullchain.pem + privkey.pem under /etc/letsencrypt/live// to # match the paths Postfix expects. diff --git a/helm/templates/NOTES.txt b/helm/templates/NOTES.txt index 19bec3a..9e081c2 100644 --- a/helm/templates/NOTES.txt +++ b/helm/templates/NOTES.txt @@ -1,4 +1,4 @@ -opengovmail {{ .Chart.Version }} installed as release "{{ .Release.Name }}" in namespace "{{ .Release.Namespace }}". +pingmailer {{ .Chart.Version }} installed as release "{{ .Release.Name }}" in namespace "{{ .Release.Namespace }}". Components in this release: {{ if index .Values "api-server" "enabled" }} [x]{{ else }} [ ]{{ end }} api-server http :8000 (POST /notify, GET /healthcheck) diff --git a/helm/values.example.yaml b/helm/values.example.yaml index 6c7a176..a0f7004 100644 --- a/helm/values.example.yaml +++ b/helm/values.example.yaml @@ -3,7 +3,7 @@ # every example.com / client-id placeholder, and DO NOT COMMIT the result: # # cp helm/values.example.yaml my-values.yaml -# helm upgrade --install opengovmail ./helm -n opengovmail -f my-values.yaml +# helm upgrade --install pingmailer ./helm -n pingmailer -f my-values.yaml # # This file assumes the mail domain is `example.com` and that a TLS Secret # named `example-com-tls` (keys tls.crt / tls.key) already exists in the @@ -14,7 +14,7 @@ api-server: enabled: true replicaCount: 2 image: - repository: ghcr.io/opengovmail/opengovmail-api-server + repository: ghcr.io/opengovmail/pingmailer-api-server tag: "0.1.0" ingress: enabled: true diff --git a/helm/values.yaml b/helm/values.yaml index a86037f..e20c1a8 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,5 +1,5 @@ # =========================================================================== -# opengovmail — umbrella chart values +# pingmailer — umbrella chart values # # Every top-level key below matches a subchart name under charts/. Anything # nested under that key is passed straight through to the subchart, so the @@ -24,7 +24,7 @@ # "### MAIL DOMAIN" below. # # Copy values.example.yaml, fill it in, and keep it out of git: -# helm upgrade --install opengovmail ./helm -n -f my-values.yaml +# helm upgrade --install pingmailer ./helm -n -f my-values.yaml # =========================================================================== # --------------------------------------------------------------------------- @@ -37,7 +37,7 @@ api-server: replicaCount: 2 image: - repository: ghcr.io/opengovmail/opengovmail-api-server + repository: ghcr.io/opengovmail/pingmailer-api-server tag: "" pullPolicy: Always @@ -69,7 +69,7 @@ opendkim-server: enabled: true image: - repository: ghcr.io/opengovmail/opengovmail-dkim + repository: ghcr.io/opengovmail/pingmailer-dkim tag: latest # REQUIRED. One entry per signing domain. @@ -134,7 +134,7 @@ smtp-server: enabled: true image: - repository: ghcr.io/opengovmail/opengovmail-smtp + repository: ghcr.io/opengovmail/pingmailer-smtp tag: rootless domain: "" ### MAIL DOMAIN — REQUIRED diff --git a/mail-infra/conf/opengovmail.yaml b/mail-infra/conf/pingmailer.yaml similarity index 91% rename from mail-infra/conf/opengovmail.yaml rename to mail-infra/conf/pingmailer.yaml index b13995b..2d7502f 100644 --- a/mail-infra/conf/opengovmail.yaml +++ b/mail-infra/conf/pingmailer.yaml @@ -1,5 +1,5 @@ # =============================================================== -# OpenGovMail Server Configuration (`opengovmail.yaml`) +# PingMailer Server Configuration (`pingmailer.yaml`) # =============================================================== # # This file contains the primary configuration for your mail server. diff --git a/mail-infra/helm/certbot-server/Chart.yaml b/mail-infra/helm/certbot-server/Chart.yaml index 30f35d1..a1805f7 100644 --- a/mail-infra/helm/certbot-server/Chart.yaml +++ b/mail-infra/helm/certbot-server/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -name: opengovmail-certificates +name: pingmailer-certificates description: | - Helm chart that renders cert-manager Certificate resources for the OpenGovMail - / OpenGovMail stack. Each configured domain gets a Certificate (covering + Helm chart that renders cert-manager Certificate resources for the Pingmailer + stack. Each configured domain gets a Certificate (covering `domain` and `*.domain`) issued by a cluster-scoped ClusterIssuer. This chart does NOT install cert-manager or create the ClusterIssuer — those @@ -15,9 +15,9 @@ keywords: - letsencrypt - tls - certificates - - opengovmail + - pingmailer maintainers: - name: OpenGovMail url: https://github.com/OpenGovMail sources: - - https://github.com/OpenGovMail/opengovmail/pull/325 + - https://github.com/OpenGovMail/pingmailer/pull/325 diff --git a/mail-infra/helm/certbot-server/README.md b/mail-infra/helm/certbot-server/README.md index a2625e9..35a7ce8 100644 --- a/mail-infra/helm/certbot-server/README.md +++ b/mail-infra/helm/certbot-server/README.md @@ -1,7 +1,7 @@ -# opengovmail-certificates Helm chart +# pingmailer-certificates Helm chart Renders [cert-manager](https://cert-manager.io) `Certificate` CRDs for the -OpenGovMail stack. Each configured domain gets a certificate +PingMailer stack. Each configured domain gets a certificate covering `domain` and `*.domain`, issued by a Let's Encrypt ClusterIssuer via the Cloudflare DNS-01 solver. @@ -10,13 +10,13 @@ run a workload — it only declares `Certificate` resources. cert-manager reconciles them and writes the resulting TLS material into Kubernetes Secrets that your other workloads (smtp-server, api-server, etc.) mount. -Modeled after [OpenGovMail/opengovmail#325](https://github.com/OpenGovMail/opengovmail/pull/325). +Modeled after [OpenGovMail/pingmailer#325](https://github.com/OpenGovMail/pingmailer/pull/325). ## Architecture ``` ┌─────────────────────────┐ creates ┌──────────────────────────┐ - │ opengovmail-certificates │ ───────────▶ │ Certificate (per domain) │ + │ pingmailer-certificates │ ───────────▶ │ Certificate (per domain) │ │ Helm chart │ └────────────┬─────────────┘ └─────────────────────────┘ │ reconciled by ▼ @@ -74,8 +74,8 @@ kubectl get clusterissuer # le-staging + le-prod with READY=True Sensitive values stay out of `values.yaml`. Pass them on the command line: ```bash -helm upgrade --install opengovmail-certificates ./mail-infra/helm/certbot-server \ - --namespace opengovmail --create-namespace \ +helm upgrade --install pingmailer-certificates ./mail-infra/helm/certbot-server \ + --namespace pingmailer --create-namespace \ --set tls.issuer=le-staging \ --set 'tls.domains={mail.example.com,example.com}' ``` @@ -83,16 +83,16 @@ helm upgrade --install opengovmail-certificates ./mail-infra/helm/certbot-server When the staging certificate reports `READY=True`, flip to prod: ```bash -helm upgrade --install opengovmail-certificates ./mail-infra/helm/certbot-server \ - --namespace opengovmail --reuse-values \ +helm upgrade --install pingmailer-certificates ./mail-infra/helm/certbot-server \ + --namespace pingmailer --reuse-values \ --set tls.issuer=le-prod ``` Track issuance: ```bash -kubectl -n opengovmail get certificate -kubectl -n opengovmail describe certificate mail-example-com-tls +kubectl -n pingmailer get certificate +kubectl -n pingmailer describe certificate mail-example-com-tls ``` ## Values @@ -127,7 +127,7 @@ volumes: ## Uninstall ```bash -helm uninstall opengovmail-certificates -n opengovmail +helm uninstall pingmailer-certificates -n pingmailer ``` This removes the `Certificate` objects. cert-manager will then garbage-collect diff --git a/mail-infra/helm/certbot-server/templates/NOTES.txt b/mail-infra/helm/certbot-server/templates/NOTES.txt index 79ac2ac..8437abe 100644 --- a/mail-infra/helm/certbot-server/templates/NOTES.txt +++ b/mail-infra/helm/certbot-server/templates/NOTES.txt @@ -1,4 +1,4 @@ -opengovmail-certificates has been installed. +pingmailer-certificates has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} diff --git a/mail-infra/helm/certbot-server/templates/_helpers.tpl b/mail-infra/helm/certbot-server/templates/_helpers.tpl index abd2786..1e35046 100644 --- a/mail-infra/helm/certbot-server/templates/_helpers.tpl +++ b/mail-infra/helm/certbot-server/templates/_helpers.tpl @@ -1,14 +1,14 @@ {{/* Expand the name of the chart. */}} -{{- define "opengovmail-certificates.name" -}} +{{- define "pingmailer-certificates.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Create a default fully qualified app name. */}} -{{- define "opengovmail-certificates.fullname" -}} +{{- define "pingmailer-certificates.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -24,16 +24,16 @@ Create a default fully qualified app name. {{/* Chart label. */}} -{{- define "opengovmail-certificates.chart" -}} +{{- define "pingmailer-certificates.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels. */}} -{{- define "opengovmail-certificates.labels" -}} -helm.sh/chart: {{ include "opengovmail-certificates.chart" . }} -{{ include "opengovmail-certificates.selectorLabels" . }} +{{- define "pingmailer-certificates.labels" -}} +helm.sh/chart: {{ include "pingmailer-certificates.chart" . }} +{{ include "pingmailer-certificates.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -43,7 +43,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels. */}} -{{- define "opengovmail-certificates.selectorLabels" -}} -app.kubernetes.io/name: {{ include "opengovmail-certificates.name" . }} +{{- define "pingmailer-certificates.selectorLabels" -}} +app.kubernetes.io/name: {{ include "pingmailer-certificates.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} diff --git a/mail-infra/helm/certbot-server/templates/certificate.yaml b/mail-infra/helm/certbot-server/templates/certificate.yaml index dddab35..7bfd5f2 100644 --- a/mail-infra/helm/certbot-server/templates/certificate.yaml +++ b/mail-infra/helm/certbot-server/templates/certificate.yaml @@ -10,7 +10,7 @@ metadata: name: {{ . | replace "." "-" }}-tls namespace: {{ $.Release.Namespace }} labels: - {{- include "opengovmail-certificates.labels" $ | nindent 4 }} + {{- include "pingmailer-certificates.labels" $ | nindent 4 }} spec: secretName: {{ . | replace "." "-" }}-tls issuerRef: diff --git a/mail-infra/helm/certbot-server/values.yaml b/mail-infra/helm/certbot-server/values.yaml index 11fffe1..8efb0bc 100644 --- a/mail-infra/helm/certbot-server/values.yaml +++ b/mail-infra/helm/certbot-server/values.yaml @@ -1,11 +1,11 @@ # --------------------------------------------------------------------------- -# opengovmail-certificates values +# pingmailer-certificates values # # Sensitive values (domain list, ACME email, Cloudflare API token) are NOT # baked into this file. Pass them at install/upgrade time: # -# helm upgrade --install opengovmail-certificates ./mail-infra/helm/certbot-server \ -# --namespace opengovmail --create-namespace \ +# helm upgrade --install pingmailer-certificates ./mail-infra/helm/certbot-server \ +# --namespace pingmailer --create-namespace \ # --set tls.issuer=le-staging \ # --set 'tls.domains={mail.example.com,example.com}' # diff --git a/mail-infra/images/opengovmail-dkim/Dockerfile b/mail-infra/images/pingmailer-dkim/Dockerfile similarity index 100% rename from mail-infra/images/opengovmail-dkim/Dockerfile rename to mail-infra/images/pingmailer-dkim/Dockerfile diff --git a/mail-infra/images/opengovmail-dkim/entrypoint.sh b/mail-infra/images/pingmailer-dkim/entrypoint.sh similarity index 96% rename from mail-infra/images/opengovmail-dkim/entrypoint.sh rename to mail-infra/images/pingmailer-dkim/entrypoint.sh index 425c14a..1a4f44b 100755 --- a/mail-infra/images/opengovmail-dkim/entrypoint.sh +++ b/mail-infra/images/pingmailer-dkim/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -CONFIG_FILE="/etc/opendkim/opengovmail.yaml" +CONFIG_FILE="/etc/opendkim/pingmailer.yaml" echo "=== Extracting domains from $CONFIG_FILE ===" @@ -11,7 +11,7 @@ DOMAINS=$(yq eval '.domains[].domain' "$CONFIG_FILE" 2>/dev/null | grep -v '^nul # Fallback if no domains found if [ -z "$DOMAINS" ]; then echo "⚠️ Warning: Could not extract domains from $CONFIG_FILE" - echo "⚠️ Please ensure opengovmail.yaml has domains configured" + echo "⚠️ Please ensure pingmailer.yaml has domains configured" DOMAINS="example.org" fi diff --git a/mail-infra/images/opengovmail-smtp-rootless/Dockerfile b/mail-infra/images/pingmailer-smtp-rootless/Dockerfile similarity index 97% rename from mail-infra/images/opengovmail-smtp-rootless/Dockerfile rename to mail-infra/images/pingmailer-smtp-rootless/Dockerfile index 3748e80..14b92f7 100644 --- a/mail-infra/images/opengovmail-smtp-rootless/Dockerfile +++ b/mail-infra/images/pingmailer-smtp-rootless/Dockerfile @@ -1,5 +1,5 @@ # ============================================================================= -# opengovmail-smtp (rootless / patched Postfix) for OpenShift restricted-v2. +# pingmailer-smtp (rootless / patched Postfix) for OpenShift restricted-v2. # # WHY: OpenShift policy here forbids running as root, but stock Postfix's # `postfix`, `master`, and `postsuper` binaries hard-abort unless getuid()==0 @@ -64,7 +64,7 @@ RUN set -eux; \ dpkg-buildpackage -us -uc -b # ---------------------------------------------------------------------------- -# Stage 2 — slim runtime, mirrors the stock opengovmail-smtp image +# Stage 2 — slim runtime, mirrors the stock pingmailer-smtp image # ---------------------------------------------------------------------------- FROM debian:bookworm-slim ENV DEBIAN_FRONTEND=noninteractive diff --git a/mail-infra/images/opengovmail-smtp-rootless/entrypoint.sh b/mail-infra/images/pingmailer-smtp-rootless/entrypoint.sh similarity index 95% rename from mail-infra/images/opengovmail-smtp-rootless/entrypoint.sh rename to mail-infra/images/pingmailer-smtp-rootless/entrypoint.sh index 663161c..a67fa17 100755 --- a/mail-infra/images/opengovmail-smtp-rootless/entrypoint.sh +++ b/mail-infra/images/pingmailer-smtp-rootless/entrypoint.sh @@ -1,9 +1,9 @@ #!/bin/bash set -e -CONFIG_FILE="/etc/postfix/opengovmail.yaml" +CONFIG_FILE="/etc/postfix/pingmailer.yaml" -# --- domain from opengovmail.yaml ------------------------------------------------- +# --- domain from pingmailer.yaml ------------------------------------------------- MAIL_DOMAIN=$(awk '/^[[:space:]]*-[[:space:]]*domain:/ {sub(/^[[:space:]]*-[[:space:]]*domain:[[:space:]]*/, ""); print; exit}' "$CONFIG_FILE") if [ -z "$MAIL_DOMAIN" ] || [ "$MAIL_DOMAIN" = "null" ]; then echo "⚠️ Could not extract domain from $CONFIG_FILE; using example.org" diff --git a/mail-infra/scripts/cert-manager-bootstrap.sh b/mail-infra/scripts/cert-manager-bootstrap.sh index 409d90c..65c458c 100755 --- a/mail-infra/scripts/cert-manager-bootstrap.sh +++ b/mail-infra/scripts/cert-manager-bootstrap.sh @@ -17,7 +17,7 @@ set -euo pipefail # - A Cloudflare API token scoped to Zone:Read + DNS:Edit on your zone # - kubectl + helm on PATH # -# Adapted from https://github.com/OpenGovMail/opengovmail/pull/325 +# Adapted from https://github.com/OpenGovMail/pingmailer/pull/325 # ------------------------------------------------------------------------------ RED='\033[0;31m' diff --git a/mail-infra/scripts/service/cleanup-docker.sh b/mail-infra/scripts/service/cleanup-docker.sh index 1958db2..16ec48a 100755 --- a/mail-infra/scripts/service/cleanup-docker.sh +++ b/mail-infra/scripts/service/cleanup-docker.sh @@ -34,12 +34,12 @@ fi # Step 1: Stop all containers using docker compose echo -e "\n${YELLOW}Step 1/3: Stopping Docker containers${NC}" -echo " - Stopping OpenGovMail services and API Endpoint..." +echo " - Stopping PingMailer services and API Endpoint..." (cd "${ROOT_DIR}" && docker compose down) if [ $? -eq 0 ]; then - echo -e "${GREEN} ✓ OpenGovMail services stopped successfully${NC}" + echo -e "${GREEN} ✓ PingMailer services stopped successfully${NC}" else - echo -e "${RED} ✗ Failed to stop OpenGovMail services${NC}" + echo -e "${RED} ✗ Failed to stop PingMailer services${NC}" fi # Step 2: Remove all volumes diff --git a/mail-infra/scripts/service/start-opengovmail.sh b/mail-infra/scripts/service/start-pingmailer.sh similarity index 93% rename from mail-infra/scripts/service/start-opengovmail.sh rename to mail-infra/scripts/service/start-pingmailer.sh index c192701..7c9a269 100755 --- a/mail-infra/scripts/service/start-opengovmail.sh +++ b/mail-infra/scripts/service/start-pingmailer.sh @@ -1,7 +1,7 @@ #!/bin/bash # ============================================ -# OpenGovMail Setup Wizard +# PingMailer Setup Wizard # ============================================ # Colors @@ -17,7 +17,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(cd "${SCRIPT_DIR}/../../../" && pwd)" # Conf directory contains config files CONF_DIR="$(cd "${SCRIPT_DIR}/../../conf" && pwd)" -CONFIG_FILE="${CONF_DIR}/opengovmail.yaml" +CONFIG_FILE="${CONF_DIR}/pingmailer.yaml" # ASCII Banner echo -e "${CYAN}" @@ -45,7 +45,7 @@ EOF echo -e "${NC}" echo "" -echo -e " 🚀 ${GREEN}Welcome to OpenGovMail Setup${NC}" +echo -e " 🚀 ${GREEN}Welcome to PingMailer Setup${NC}" echo "---------------------------------------------" MAIL_DOMAIN="" @@ -55,7 +55,7 @@ MAIL_DOMAIN="" # ================================ echo -e "\n${YELLOW}Step 1/4: Configure domain name${NC}" -# Extract primary (first) domain from the domains list in opengovmail.yaml +# Extract primary (first) domain from the domains list in pingmailer.yaml MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "$CONFIG_FILE" | sed 's/.*domain:\s*//' | xargs) # Validate if MAIL_DOMAIN is empty @@ -92,14 +92,14 @@ fi # ================================ echo -e "\n${YELLOW}Step 3/4: Starting Docker services${NC}" -# Start main OpenGovMail services -echo " - Starting OpenGovMail services and API Endpoint..." +# Start main PingMailer services +echo " - Starting PingMailer services and API Endpoint..." (cd "${ROOT_DIR}" && docker compose up -d) if [ $? -ne 0 ]; then echo -e "${RED}✗ Docker compose failed. Please check the logs.${NC}" exit 1 fi -echo -e "${GREEN} ✓ OpenGovMail services started${NC}" +echo -e "${GREEN} ✓ PingMailer services started${NC}" sleep 3 # Wait for services to initialize diff --git a/mail-infra/scripts/service/stop-opengovmail.sh b/mail-infra/scripts/service/stop-pingmailer.sh similarity index 83% rename from mail-infra/scripts/service/stop-opengovmail.sh rename to mail-infra/scripts/service/stop-pingmailer.sh index e141814..8f6d6ed 100644 --- a/mail-infra/scripts/service/stop-opengovmail.sh +++ b/mail-infra/scripts/service/stop-pingmailer.sh @@ -6,5 +6,5 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(cd "${SCRIPT_DIR}/../../../" && pwd)" # Navigate to root directory and stop docker services -echo "Stopping OpenGovMail services and API Endpoint..." +echo "Stopping PingMailer services and API Endpoint..." (cd "${ROOT_DIR}" && docker compose down) \ No newline at end of file diff --git a/mail-infra/scripts/setup/setup.sh b/mail-infra/scripts/setup/setup.sh index 99a5aa4..40eba13 100644 --- a/mail-infra/scripts/setup/setup.sh +++ b/mail-infra/scripts/setup/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash # ============================================ -# OpenGovMail Setup Script - This script is responsible for generating all the configs for our services. +# PingMailer Setup Script - This script is responsible for generating all the configs for our services. # ============================================ # Colors @@ -17,9 +17,9 @@ readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly SERVICES_DIR="$(cd "${SCRIPT_DIR}/../../services" && pwd)" # Conf directory contains config files readonly CONF_DIR="$(cd "${SCRIPT_DIR}/../../conf" && pwd)" -readonly CONFIG_FILE="${CONF_DIR}/opengovmail.yaml" -# Read opengovmail-config from the configuration file -readonly OPENGOVMAIL_CONFIG=$(grep -m 1 '^config-url:' "${CONFIG_FILE}" | sed 's/config-url: //' | xargs) +readonly CONFIG_FILE="${CONF_DIR}/pingmailer.yaml" +# Read pingmailer-config from the configuration file +readonly PINGMAILER_CONFIG=$(grep -m 1 '^config-url:' "${CONFIG_FILE}" | sed 's/config-url: //' | xargs) # ASCII Banner echo -e "${CYAN}" @@ -47,7 +47,7 @@ EOF echo -e "${NC}" echo -echo -e " 🚀 ${GREEN}Welcome to the OpenGovMail Setup${NC}" +echo -e " 🚀 ${GREEN}Welcome to the PingMailer Setup${NC}" echo "---------------------------------------------" MAIL_DOMAIN="" @@ -57,7 +57,7 @@ MAIL_DOMAIN="" # ================================ echo -e "\n${YELLOW}Step 1/2: Configure domain name${NC}" -# Extract primary (first) domain from the domains list in opengovmail.yaml +# Extract primary (first) domain from the domains list in pingmailer.yaml readonly MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "${CONFIG_FILE}" | sed 's/.*domain:\s*//' | xargs) # Validate if MAIL_DOMAIN is empty diff --git a/mail-infra/scripts/utils/get-dkim.sh b/mail-infra/scripts/utils/get-dkim.sh index d154a8e..66cfea4 100755 --- a/mail-infra/scripts/utils/get-dkim.sh +++ b/mail-infra/scripts/utils/get-dkim.sh @@ -9,7 +9,7 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Conf directory contains config files CONF_DIR="$(cd "${SCRIPT_DIR}/../../conf" && pwd)" -CONFIG_FILE="${CONF_DIR}/opengovmail.yaml" +CONFIG_FILE="${CONF_DIR}/pingmailer.yaml" CONTAINER_NAME="opendkim-server" diff --git a/mail-infra/services/config-scripts/gen-certbot-certs.sh b/mail-infra/services/config-scripts/gen-certbot-certs.sh index c16125b..1fb9309 100644 --- a/mail-infra/services/config-scripts/gen-certbot-certs.sh +++ b/mail-infra/services/config-scripts/gen-certbot-certs.sh @@ -1,7 +1,7 @@ #!/bin/bash # # This script initializes certbot certificates with wildcard support -# for ALL domains defined in opengovmail.yaml +# for ALL domains defined in pingmailer.yaml # set -euo pipefail @@ -9,14 +9,14 @@ set -euo pipefail # --- Paths --- readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly ROOT_DIR="$(dirname "$SCRIPT_DIR")" -readonly OPENGOVMAIL_YAML_FILE="${ROOT_DIR}/../conf/opengovmail.yaml" -readonly LETSENCRYPT_PATH="${ROOT_DIR}/opengovmail-config/certbot/keys" +readonly PINGMAILER_YAML_FILE="${ROOT_DIR}/../conf/pingmailer.yaml" +readonly LETSENCRYPT_PATH="${ROOT_DIR}/pingmailer-config/certbot/keys" -# Extract domains from opengovmail.yaml -DOMAINS=$(grep '^\s*-\s*domain:' "${OPENGOVMAIL_YAML_FILE}" | sed 's/.*domain:\s*//' | xargs) +# Extract domains from pingmailer.yaml +DOMAINS=$(grep '^\s*-\s*domain:' "${PINGMAILER_YAML_FILE}" | sed 's/.*domain:\s*//' | xargs) if [ -z "$DOMAINS" ]; then - echo "❌ Error: No domains found in ${OPENGOVMAIL_YAML_FILE}" + echo "❌ Error: No domains found in ${PINGMAILER_YAML_FILE}" exit 1 fi diff --git a/mail-infra/services/config-scripts/gen-opendkim-conf.sh b/mail-infra/services/config-scripts/gen-opendkim-conf.sh index bbffe04..f00831a 100644 --- a/mail-infra/services/config-scripts/gen-opendkim-conf.sh +++ b/mail-infra/services/config-scripts/gen-opendkim-conf.sh @@ -8,10 +8,10 @@ set -euo pipefail # --- Paths --- readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly ROOT_DIR="$(dirname "$SCRIPT_DIR")" -readonly OPENGOVMAIL_YAML_FILE="${ROOT_DIR}/../conf/opengovmail.yaml" -readonly CONFIGS_PATH="${ROOT_DIR}/opengovmail-config/opendkim" +readonly PINGMAILER_YAML_FILE="${ROOT_DIR}/../conf/pingmailer.yaml" +readonly CONFIGS_PATH="${ROOT_DIR}/pingmailer-config/opendkim" -# --- Helper: Extract domain configs from opengovmail.yaml --- +# --- Helper: Extract domain configs from pingmailer.yaml --- extract_domain_configs() { awk ' /^[[:space:]]*-[[:space:]]*domain:/ { @@ -46,7 +46,7 @@ extract_domain_configs() { } if (domain != "" && domain != "null") { print domain "," selector "," keysize } } - ' "$OPENGOVMAIL_YAML_FILE" + ' "$PINGMAILER_YAML_FILE" } # --- Main --- @@ -54,7 +54,7 @@ echo "=== Generating OpenDKIM configuration files for all domains and subdomains DOMAIN_CONFIGS=$(extract_domain_configs) if [ -z "$DOMAIN_CONFIGS" ]; then - echo "Error: No domains found in ${OPENGOVMAIL_YAML_FILE}" + echo "Error: No domains found in ${PINGMAILER_YAML_FILE}" exit 1 fi diff --git a/mail-infra/services/config-scripts/gen-postfix-conf.sh b/mail-infra/services/config-scripts/gen-postfix-conf.sh index 5beb92a..0f3c748 100644 --- a/mail-infra/services/config-scripts/gen-postfix-conf.sh +++ b/mail-infra/services/config-scripts/gen-postfix-conf.sh @@ -8,14 +8,14 @@ set -euo pipefail # Define constant paths readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly ROOT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")" -readonly OPENGOVMAIL_YAML_FILE="${ROOT_DIR}/conf/opengovmail.yaml" -readonly CONFIGS_PATH="${ROOT_DIR}/services/opengovmail-config/postfix" +readonly PINGMAILER_YAML_FILE="${ROOT_DIR}/conf/pingmailer.yaml" +readonly CONFIGS_PATH="${ROOT_DIR}/services/pingmailer-config/postfix" readonly DKIM_SELECTOR=mail # --- Main Logic --- -# Extract primary (first) domain from the domains list in opengovmail.yaml -readonly MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "${OPENGOVMAIL_YAML_FILE}" | sed 's/.*domain:\s*//' | xargs) -#export RELAYHOST=$(yq -e '.relayhost' "$OPENGOVMAIL_YAML_FILE" || echo "") +# Extract primary (first) domain from the domains list in pingmailer.yaml +readonly MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "${PINGMAILER_YAML_FILE}" | sed 's/.*domain:\s*//' | xargs) +#export RELAYHOST=$(yq -e '.relayhost' "$PINGMAILER_YAML_FILE" || echo "") # --- Derived variables --- MAIL_HOSTNAME=${MAIL_HOSTNAME:-mail.$MAIL_DOMAIN} diff --git a/mail-infra/services/config-scripts/gen-raven-conf.sh b/mail-infra/services/config-scripts/gen-raven-conf.sh index 556ac00..90c5f8e 100644 --- a/mail-infra/services/config-scripts/gen-raven-conf.sh +++ b/mail-infra/services/config-scripts/gen-raven-conf.sh @@ -8,20 +8,20 @@ set -euo pipefail # Exit on error, undefined vars, or failed pipe # --- Paths --- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ROOT_DIR="$(dirname "$SCRIPT_DIR")" # /root/opengovmail/services -GEN_DIR="${ROOT_DIR}/opengovmail-config/raven" # Base path +ROOT_DIR="$(dirname "$SCRIPT_DIR")" # /root/pingmailer/services +GEN_DIR="${ROOT_DIR}/pingmailer-config/raven" # Base path -CONFIG_FILE="${ROOT_DIR}/../conf/opengovmail.yaml" +CONFIG_FILE="${ROOT_DIR}/../conf/pingmailer.yaml" OUTPUT_FILE="${GEN_DIR}/conf/raven.yaml" -# --- Extract primary (first) domain from opengovmail.yaml --- +# --- Extract primary (first) domain from pingmailer.yaml --- # Look for the first domain entry under the domains list MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "$CONFIG_FILE" | sed 's/.*domain:\s*//' | xargs) MAIL_DOMAIN=${MAIL_DOMAIN:-example.local} # --- Certificate paths --- -LETSENCRYPT_PATH="${ROOT_DIR}/opengovmail-config/certbot/keys/etc/live/${MAIL_DOMAIN}" -RAVEN_CERT_PATH="${ROOT_DIR}/opengovmail-config/raven/certs" +LETSENCRYPT_PATH="${ROOT_DIR}/pingmailer-config/certbot/keys/etc/live/${MAIL_DOMAIN}" +RAVEN_CERT_PATH="${ROOT_DIR}/pingmailer-config/raven/certs" # --- Create necessary directories --- mkdir -p "$(dirname "$OUTPUT_FILE")" diff --git a/mail-infra/services/config-scripts/gen-thunder.sh b/mail-infra/services/config-scripts/gen-thunder.sh index 49ac3fa..7cb1eb2 100644 --- a/mail-infra/services/config-scripts/gen-thunder.sh +++ b/mail-infra/services/config-scripts/gen-thunder.sh @@ -6,13 +6,13 @@ set -euo pipefail # Define constant paths readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly ROOT_DIR="$(dirname "$SCRIPT_DIR")" -# Extract primary (first) domain from the domains list in opengovmail.yaml -readonly MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "${ROOT_DIR}/../conf/opengovmail.yaml" | sed 's/.*domain:\s*//' | xargs) -readonly LETSENCRYPT_PATH="${ROOT_DIR}/opengovmail-config/certbot/keys/etc/live/${MAIL_DOMAIN}" -readonly THUNDER_CERTS_PATH="${ROOT_DIR}/opengovmail-config/thunder/certs" -readonly THUNDER_DEPLOYMENT_FILE="${ROOT_DIR}/opengovmail-config/thunder/deployment.yaml" -readonly THUNDER_CONSOLE_CONFIG="${ROOT_DIR}/opengovmail-config/thunder/console-config.js" -readonly THUNDER_GATE_CONFIG="${ROOT_DIR}/opengovmail-config/thunder/gate-config.js" +# Extract primary (first) domain from the domains list in pingmailer.yaml +readonly MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "${ROOT_DIR}/../conf/pingmailer.yaml" | sed 's/.*domain:\s*//' | xargs) +readonly LETSENCRYPT_PATH="${ROOT_DIR}/pingmailer-config/certbot/keys/etc/live/${MAIL_DOMAIN}" +readonly THUNDER_CERTS_PATH="${ROOT_DIR}/pingmailer-config/thunder/certs" +readonly THUNDER_DEPLOYMENT_FILE="${ROOT_DIR}/pingmailer-config/thunder/deployment.yaml" +readonly THUNDER_CONSOLE_CONFIG="${ROOT_DIR}/pingmailer-config/thunder/console-config.js" +readonly THUNDER_GATE_CONFIG="${ROOT_DIR}/pingmailer-config/thunder/gate-config.js" readonly THUNDER_PORT="8090" mkdir -p "${THUNDER_CERTS_PATH}" diff --git a/mail-infra/services/opengovmail-config/opendkim/opendkim.conf b/mail-infra/services/pingmailer-config/opendkim/opendkim.conf similarity index 100% rename from mail-infra/services/opengovmail-config/opendkim/opendkim.conf rename to mail-infra/services/pingmailer-config/opendkim/opendkim.conf diff --git a/mail-infra/services/opengovmail-config/postfix/master.cf b/mail-infra/services/pingmailer-config/postfix/master.cf similarity index 100% rename from mail-infra/services/opengovmail-config/postfix/master.cf rename to mail-infra/services/pingmailer-config/postfix/master.cf diff --git a/mail-infra/services/opengovmail-config/thunder/console-config.js b/mail-infra/services/pingmailer-config/thunder/console-config.js similarity index 100% rename from mail-infra/services/opengovmail-config/thunder/console-config.js rename to mail-infra/services/pingmailer-config/thunder/console-config.js diff --git a/mail-infra/services/opengovmail-config/thunder/deployment.yaml b/mail-infra/services/pingmailer-config/thunder/deployment.yaml similarity index 100% rename from mail-infra/services/opengovmail-config/thunder/deployment.yaml rename to mail-infra/services/pingmailer-config/thunder/deployment.yaml diff --git a/mail-infra/services/opengovmail-config/thunder/gate-config.js b/mail-infra/services/pingmailer-config/thunder/gate-config.js similarity index 100% rename from mail-infra/services/opengovmail-config/thunder/gate-config.js rename to mail-infra/services/pingmailer-config/thunder/gate-config.js