diff --git a/.env.example b/.env.example index a5e502a..bb891ca 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ DOMAIN=yourdomain.com # Path to certbot certificates directory -CERT_PATH=../mail-infra/services/silver-config/certbot/keys/etc +CERT_PATH=../mail-infra/services/opengovmail-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 e533362..aeeec87 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] -- PingMailer version: [e.g. v1.2.0 or commit hash] +- OpenGovMail 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 d15208f..49fb82a 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -8,7 +8,7 @@ name: Publish container images # ...then publish a GitHub Release for that tag (or use workflow_dispatch). # # raven-sasl is deliberately absent: it is built in a different repository -# (ghcr.io/lsflk/raven-sasl) and is only consumed here. +# (ghcr.io/opengovmail/raven-sasl) and is only consumed here. on: release: @@ -40,18 +40,18 @@ jobs: fail-fast: false matrix: include: - - name: pingmailer-api-server + - name: opengovmail-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: silver-dkim - context: ./mail-infra/images/silver-dkim - dockerfile: ./mail-infra/images/silver-dkim/Dockerfile + - name: opengovmail-dkim + context: ./mail-infra/images/opengovmail-dkim + dockerfile: ./mail-infra/images/opengovmail-dkim/Dockerfile platforms: linux/amd64,linux/arm64 - - name: silver-smtp - context: ./mail-infra/images/silver-smtp-rootless - dockerfile: ./mail-infra/images/silver-smtp-rootless/Dockerfile + - name: opengovmail-smtp + context: ./mail-infra/images/opengovmail-smtp-rootless + dockerfile: ./mail-infra/images/opengovmail-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 82bc27f..3908334 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -1,6 +1,6 @@ name: Publish Helm chart -# Packages the pingmailer umbrella chart and pushes it to GHCR as an OCI +# Packages the opengovmail 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 pingmailer ./helm -f helm/values.example.yaml > /tmp/rendered.yaml + helm template opengovmail ./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 pingmailer ./helm >/dev/null 2>&1; then + if helm template opengovmail ./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/pingmailer-${{ steps.v.outputs.version }}.tgz" \ + helm push "dist/opengovmail-${{ 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 \`pingmailer\` $v" + echo "### Helm chart \`opengovmail\` $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/pingmailer\`" + echo "Published to \`oci://${{ env.REGISTRY }}/${owner}/charts/opengovmail\`" echo echo '```bash' - echo "helm install pingmailer \\" - echo " oci://${{ env.REGISTRY }}/${owner}/charts/pingmailer \\" + echo "helm install opengovmail \\" + echo " oci://${{ env.REGISTRY }}/${owner}/charts/opengovmail \\" 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 → pingmailer → Package settings, or" + echo "> public under Packages → opengovmail → Package settings, or" echo "> consumers must \`helm registry login ghcr.io\` first." fi } >> "$GITHUB_STEP_SUMMARY" - uses: actions/upload-artifact@v4 with: - name: pingmailer-chart-${{ steps.v.outputs.version }} + name: opengovmail-chart-${{ steps.v.outputs.version }} path: dist/*.tgz diff --git a/README.md b/README.md index 87916c1..dcdfe90 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# PingMailer +# OpenGovMail **_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/Silver-Mail-Platform/pingmailer) +![Last Commit](https://img.shields.io/github/last-commit/OpenGovMail/opengovmail) -**PingMailer** is a lightweight service for sending transactional emails. It provides a simple REST API for email delivery using SMTP, powered by [Silver](https://github.com/LSFLK/silver) mail infrastructure. +**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.

• 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 Silver instance +- **SMTP Integration** – Works with any SMTP server or OpenGovMail 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 Silver instance) +- SMTP server credentials (or a running OpenGovMail instance) ### Quick Start 1. **Clone the repository** ```bash - git clone https://github.com/Silver-Mail-Platform/pingmailer.git - cd pingmailer + git clone https://github.com/OpenGovMail/opengovmail.git + cd opengovmail ``` 2. **Set up the mail infrastructure** @@ -40,9 +40,9 @@ bash mail-infra/scripts/setup/setup.sh ``` -3. **Start the Silver mail server** +3. **Start the OpenGovMail mail server** ```bash - bash mail-infra/scripts/service/start-silver.sh + bash mail-infra/scripts/service/start-opengovmail.sh ``` 4. **Configure the API server** @@ -81,10 +81,10 @@ ## Architecture -PingMailer consists of two main components: +OpenGovMail consists of two main components: - **`api-server/`** - Go-based REST API server for sending templated emails -- **`mail-infra/`** - Silver SMTP components for outgoing mail delivery +- **`mail-infra/`** - OpenGovMail 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 95cea13..b1dc014 100644 --- a/api-server/Makefile +++ b/api-server/Makefile @@ -4,28 +4,28 @@ run: go run . -port 8000 build: - go build -o bin/pingmailer-api . + go build -o bin/opengovmail-api . clean: rm -rf bin # Docker commands docker-build: - docker build -t pingmailer-api . + docker build -t opengovmail-api . docker-run: docker run -d \ -p 8000:8000 \ -e PORT=8000 \ - --name pingmailer-api \ - pingmailer-api + --name opengovmail-api \ + opengovmail-api docker-stop: - docker stop pingmailer-api || true - docker rm pingmailer-api || true + docker stop opengovmail-api || true + docker rm opengovmail-api || true docker-clean: docker-stop - docker rmi pingmailer-api || true + docker rmi opengovmail-api || true docker-compose-up: docker-compose up -d @@ -34,7 +34,7 @@ docker-compose-down: docker-compose down docker-logs: - docker logs -f pingmailer-api + docker logs -f opengovmail-api gci: golangci-lint run diff --git a/api-server/README.md b/api-server/README.md index 1321049..e50762d 100644 --- a/api-server/README.md +++ b/api-server/README.md @@ -1,6 +1,6 @@ -# PingMailer API Server +# OpenGovMail API Server -A simple REST API service for sending emails via SMTP. Part of the Silver Mail Platform. +A simple REST API service for sending emails via SMTP. Part of the OpenGovMail platform. ## Quick Start @@ -14,7 +14,7 @@ cp .env.example .env docker compose up -d # View logs -docker logs pingmailer-api -f +docker logs opengovmail-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 9a8fb44..39f858a 100644 --- a/api-server/go.mod +++ b/api-server/go.mod @@ -1,4 +1,4 @@ -module github.com/Silver-Mail-Platform/pingmailer +module github.com/OpenGovMail/opengovmail go 1.23 diff --git a/api-server/internal/api/handlers.go b/api-server/internal/api/handlers.go index a04bfff..6c224b5 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/Silver-Mail-Platform/pingmailer/internal/emailer" + "github.com/OpenGovMail/opengovmail/internal/emailer" ) // handleHealth provides a simple health check endpoint diff --git a/api-server/main.go b/api-server/main.go index 6f4af0e..7474972 100644 --- a/api-server/main.go +++ b/api-server/main.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/Silver-Mail-Platform/pingmailer/internal/api" + "github.com/OpenGovMail/opengovmail/internal/api" ) func main() { diff --git a/docker-compose.yml b/docker-compose.yml index fb5d4e0..8800a70 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,16 @@ services: smtp-server: - image: ghcr.io/lsflk/silver-smtp:main + image: ghcr.io/opengovmail/opengovmail-smtp:main container_name: smtp-server-container ports: - "25:25" - "587:587" volumes: - - ./mail-infra/services/silver-config/postfix/main.cf:/etc/postfix/main.cf:ro - - ./mail-infra/services/silver-config/postfix/master.cf:/etc/postfix/master.cf:ro - - ./mail-infra/services/silver-config/postfix/recipient_access:/etc/postfix/recipient_access:ro - - ./mail-infra/conf/silver.yaml:/etc/postfix/silver.yaml - - ./mail-infra/services/silver-config/certbot/keys/etc:/etc/letsencrypt:ro + - ./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 - postfix-spool:/var/spool/postfix - postfix-logs:/var/log networks: @@ -21,13 +21,13 @@ services: - raven-sasl-server raven-sasl-server: - image: ghcr.io/lsflk/raven-sasl:latest + image: ghcr.io/opengovmail/raven-sasl:latest container_name: raven-sasl ports: - "12345:12345" volumes: - - ./mail-infra/services/silver-config/raven/conf:/etc/raven:rw - - ./mail-infra/services/silver-config/raven/certs:/certs:ro + - ./mail-infra/services/opengovmail-config/raven/conf:/etc/raven:rw + - ./mail-infra/services/opengovmail-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/lsflk/silver-dkim:main + image: ghcr.io/opengovmail/opengovmail-dkim:main container_name: opendkim-server volumes: - - ./mail-infra/conf/silver.yaml:/etc/opendkim/silver.yaml - - ./mail-infra/services/silver-config/opendkim/opendkim.conf:/etc/opendkim/opendkim.conf:ro - - ./mail-infra/services/silver-config/opendkim/KeyTable:/etc/opendkim/KeyTable:ro - - ./mail-infra/services/silver-config/opendkim/SigningTable:/etc/opendkim/SigningTable:ro - - ./mail-infra/services/silver-config/opendkim/TrustedHosts:/etc/opendkim/TrustedHosts:ro + - ./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 - 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/silver-config/thunder/deployment.yaml:/opt/thunder/repository/conf/deployment.yaml:ro + - ./mail-infra/services/opengovmail-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/silver-config/thunder/certs/server.cert:/opt/thunder/repository/resources/security/server.cert:ro - - ./mail-infra/services/silver-config/thunder/certs/server.key:/opt/thunder/repository/resources/security/server.key:ro - - ./mail-infra/services/silver-config/thunder/deployment.yaml:/opt/thunder/repository/conf/deployment.yaml:ro - - ./mail-infra/services/silver-config/thunder/console-config.js:/opt/thunder/apps/console/config.js:ro - - ./mail-infra/services/silver-config/thunder/gate-config.js:/opt/thunder/apps/gate/config.js:ro + - ./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 networks: - mail-network restart: unless-stopped certbot-server: - image: ghcr.io/lsflk/silver-certbot:main + image: ghcr.io/opengovmail/opengovmail-certbot:main container_name: certbot-server volumes: - - ./mail-infra/services/silver-config/certbot/keys/etc:/etc/letsencrypt - - ./mail-infra/services/silver-config/certbot/keys/log:/var/log/letsencrypt - - ./mail-infra/services/silver-config/certbot/keys/lib:/var/lib/letsencrypt + - ./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 ports: - "80:80" - "443:443" @@ -112,7 +112,7 @@ services: build: context: ./api-server dockerfile: Dockerfile - container_name: pingmailer-api-server + container_name: opengovmail-api-server restart: unless-stopped ports: - "8443:8443" diff --git a/helm/Chart.yaml b/helm/Chart.yaml index f795ad2..bb2f594 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 -name: pingmailer +name: opengovmail description: | - Umbrella Helm chart for the Pingmailer / Silver Mail stack. Installs the + Umbrella Helm chart for the OpenGovMail stack. Installs the four services that make up a working outbound mail platform as a single release: @@ -22,8 +22,7 @@ type: application version: 0.1.0 appVersion: "0.1.0" keywords: - - pingmailer - - silver + - opengovmail - mail - smtp - postfix @@ -32,10 +31,10 @@ keywords: - kubernetes - openshift maintainers: - - name: LSFLK - url: https://github.com/lsflk + - name: OpenGovMail + url: https://github.com/OpenGovMail sources: - - https://github.com/LSFLK/silver + - https://github.com/OpenGovMail/opengovmail dependencies: - name: api-server version: 0.1.0 diff --git a/helm/README.md b/helm/README.md index 3f4c417..5f58f4d 100644 --- a/helm/README.md +++ b/helm/README.md @@ -1,4 +1,4 @@ -# Pingmailer — Helm deployment guide +# OpenGovMail — 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/silver-mail-platform/charts/pingmailer --version > my-values.yaml +helm show values oci://ghcr.io/opengovmail/charts/opengovmail --version > my-values.yaml # edit my-values.yaml, then: -helm install pingmailer oci://ghcr.io/silver-mail-platform/charts/pingmailer \ +helm install opengovmail oci://ghcr.io/opengovmail/charts/opengovmail \ --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/silver-mail-platform/charts/pingmailer --version +helm show chart oci://ghcr.io/opengovmail/charts/opengovmail --version ``` If the package is private, authenticate first with a token that has @@ -80,7 +80,7 @@ to pull. Everything below applies equally to a registry install and a local | A namespace you can deploy into | any namespace you can create workloads in | | A TLS Secret for the mail domain | keys `tls.crt` + `tls.key`. Deploy `mail-infra/helm/certbot-server` first, or use cert-manager. Required by `smtp-server` while submission/587 is enabled. | | Thunder auth server reachable in-cluster | `raven-sasl-server.config.authServerUrl` defaults to `https://thunder-server:8090/...`. Not deployed by this chart. | -| A registry the cluster can pull from | images default to `ghcr.io/silver-mail-platform/*` and `ghcr.io/lsflk/*`. Add `imagePullSecrets` per subchart for a private registry. | +| A registry the cluster can pull from | images default to `ghcr.io/opengovmail/*`. Add `imagePullSecrets` per subchart for a private registry. | | Two RWO PersistentVolumes | 256Mi for DKIM keys, 1Gi for the Postfix mail queue. | TLS certificates are deliberately **not** part of this chart — certificate @@ -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 pingmailer ./helm -n -f my-values.yaml | less +helm template opengovmail ./helm -n -f my-values.yaml | less ``` ### 3. Install ```bash -helm upgrade --install pingmailer ./helm \ +helm upgrade --install opengovmail ./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=pingmailer +kubectl -n get pods,svc,pvc -l app.kubernetes.io/instance=opengovmail 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 pingmailer ./helm \ +helm upgrade --install opengovmail ./helm \ --namespace \ -f my-values.yaml ``` @@ -237,7 +237,7 @@ Confirm before installing — the rendered pod `securityContext` should carry no UID: ```bash -helm template pingmailer ./helm -f my-values.yaml \ +helm template opengovmail ./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=pingmailer +oc -n get pods,svc,route,pvc -l app.kubernetes.io/instance=opengovmail 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"] = "Pingmailer smoke test" +m["Subject"] = "OpenGovMail 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 pingmailer ./helm -n -f my-values.yaml \ +helm upgrade --install opengovmail ./helm -n -f my-values.yaml \ --set smtp-server.enabled=false --set api-server.enabled=false # then the rest -helm upgrade --install pingmailer ./helm -n -f my-values.yaml +helm upgrade --install opengovmail ./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 pingmailer ./helm -n -f my-values.yaml -helm history pingmailer -n -helm rollback pingmailer -n +helm upgrade opengovmail ./helm -n -f my-values.yaml +helm history opengovmail -n +helm rollback opengovmail -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 pingmailer -n +helm uninstall opengovmail -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 af8a568..5d64c3d 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 Pingmailer api-server (Go service that accepts + Portable Helm chart for the OpenGovMail 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,12 +14,12 @@ keywords: - api - smtp - mail - - pingmailer + - opengovmail - kubernetes - openshift - portable maintainers: - - name: LSFLK - url: https://github.com/lsflk + - name: OpenGovMail + url: https://github.com/OpenGovMail sources: - - https://github.com/LSFLK/silver + - https://github.com/OpenGovMail/opengovmail diff --git a/helm/charts/api-server/README.md b/helm/charts/api-server/README.md index cd9447d..031a271 100644 --- a/helm/charts/api-server/README.md +++ b/helm/charts/api-server/README.md @@ -1,7 +1,7 @@ -# silver-api-server Helm chart +# opengovmail-api-server Helm chart -Helm chart for the Pingmailer **api-server** — the public HTTP entry point -for sending mail through the Silver stack. The Kubernetes counterpart of +Helm chart for the OpenGovMail **api-server** — the public HTTP entry point +for sending mail through the OpenGovMail 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//pingmailer-api-server:0.1.0 . +docker build -t ghcr.io//opengovmail-api-server:0.1.0 . echo $GITHUB_TOKEN | docker login ghcr.io -u --password-stdin -docker push ghcr.io//pingmailer-api-server:0.1.0 +docker push ghcr.io//opengovmail-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 pingmailer-api-server:dev ./api-server +docker build -t opengovmail-api-server:dev ./api-server eval $(minikube docker-env -u) # Then in your values overlay: # image: -# repository: pingmailer-api-server +# repository: opengovmail-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//pingmailer-api-server" + repository: "ghcr.io//opengovmail-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 pingmailer --create-namespace \ + --namespace opengovmail --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//pingmailer-api-server" + repository: "ghcr.io//opengovmail-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 pingmailer --create-namespace \ + --namespace opengovmail --create-namespace \ -f my-api-values-openshift.yaml ``` @@ -132,11 +132,11 @@ Once deployed, verify the ingress or route: ```bash # Kubernetes -kubectl -n pingmailer get ingress +kubectl -n opengovmail get ingress # Update DNS A-record to point at the ingress controller's IP # OpenShift -oc -n pingmailer get route api-server +oc -n opengovmail 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/silver-mail-platform/pingmailer-api-server` | +| `image.repository` | `""` (**required**) | Your registry path, e.g. `ghcr.io/opengovmail/opengovmail-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 pingmailer +helm uninstall api-server -n opengovmail ``` 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 31879b8..5ab8315 100644 --- a/helm/charts/api-server/templates/NOTES.txt +++ b/helm/charts/api-server/templates/NOTES.txt @@ -1,26 +1,26 @@ -silver-api-server has been installed. +opengovmail-api-server has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} Image: {{ .Values.image.repository }}:{{ .Values.image.tag }} -Service: {{ include "silver-api-server.fullname" . }}:{{ .Values.service.port }} (ClusterIP, HTTP) +Service: {{ include "opengovmail-api-server.fullname" . }}:{{ .Values.service.port }} (ClusterIP, HTTP) ----- 1. Watch the pods ----- - kubectl -n {{ .Release.Namespace }} get pod -l app.kubernetes.io/name=silver-api-server -w - kubectl -n {{ .Release.Namespace }} logs deploy/{{ include "silver-api-server.fullname" . }} -f + 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 ----- 2. Reach the API ----- In-cluster (HTTP): - http://{{ include "silver-api-server.fullname" . }}:{{ .Values.service.port }}/healthcheck + http://{{ include "opengovmail-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 "silver-api-server.fullname" . }} \ + kubectl -n {{ .Release.Namespace }} get ingress {{ include "opengovmail-api-server.fullname" . }} \ -o jsonpath='{.spec.rules[0].host}{"\n"}' Then: https:///healthcheck @@ -31,7 +31,7 @@ Service: {{ include "silver-api-server.fullname" . }}:{{ .Values.service.port External (TLS terminated at the OpenShift Route): - oc -n {{ .Release.Namespace }} get route {{ include "silver-api-server.fullname" . }} \ + oc -n {{ .Release.Namespace }} get route {{ include "opengovmail-api-server.fullname" . }} \ -o jsonpath='{.spec.host}{"\n"}' Then: https:///healthcheck @@ -43,7 +43,7 @@ Service: {{ include "silver-api-server.fullname" . }}:{{ .Values.service.port For local testing, port-forward to the service: - kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "silver-api-server.fullname" . }} 8000:{{ .Values.service.port }} & + kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "opengovmail-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 f68fe8a..9442d30 100644 --- a/helm/charts/api-server/templates/_helpers.tpl +++ b/helm/charts/api-server/templates/_helpers.tpl @@ -1,8 +1,8 @@ -{{- define "silver-api-server.name" -}} +{{- define "opengovmail-api-server.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} -{{- define "silver-api-server.fullname" -}} +{{- define "opengovmail-api-server.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -15,13 +15,13 @@ {{- end }} {{- end }} -{{- define "silver-api-server.chart" -}} +{{- define "opengovmail-api-server.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} -{{- define "silver-api-server.labels" -}} -helm.sh/chart: {{ include "silver-api-server.chart" . }} -{{ include "silver-api-server.selectorLabels" . }} +{{- define "opengovmail-api-server.labels" -}} +helm.sh/chart: {{ include "opengovmail-api-server.chart" . }} +{{ include "opengovmail-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 "silver-api-server.selectorLabels" -}} -app.kubernetes.io/name: {{ include "silver-api-server.name" . }} +{{- define "opengovmail-api-server.selectorLabels" -}} +app.kubernetes.io/name: {{ include "opengovmail-api-server.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- define "silver-api-server.serviceAccountName" -}} +{{- define "opengovmail-api-server.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "silver-api-server.fullname" .) .Values.serviceAccount.name }} +{{- default (include "opengovmail-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 520c30c..32414a3 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/silver-mail-platform/pingmailer-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/opengovmail-api-server)." }} {{- end }} apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "silver-api-server.fullname" . }} + name: {{ include "opengovmail-api-server.fullname" . }} labels: - {{- include "silver-api-server.labels" . | nindent 4 }} + {{- include "opengovmail-api-server.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "silver-api-server.selectorLabels" . | nindent 6 }} + {{- include "opengovmail-api-server.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "silver-api-server.selectorLabels" . | nindent 8 }} + {{- include "opengovmail-api-server.selectorLabels" . | nindent 8 }} {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "silver-api-server.serviceAccountName" . }} + serviceAccountName: {{ include "opengovmail-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 4aec765..b1e6c8e 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 "silver-api-server.fullname" . }} + name: {{ include "opengovmail-api-server.fullname" . }} labels: - {{- include "silver-api-server.labels" . | nindent 4 }} + {{- include "opengovmail-api-server.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -33,7 +33,7 @@ spec: pathType: {{ .pathType }} backend: service: - name: {{ include "silver-api-server.fullname" $ }} + name: {{ include "opengovmail-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 e56185b..64b5c81 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 "silver-api-server.fullname" . }} + name: {{ include "opengovmail-api-server.fullname" . }} labels: - {{- include "silver-api-server.labels" . | nindent 4 }} + {{- include "opengovmail-api-server.labels" . | nindent 4 }} spec: minAvailable: {{ .Values.pdb.minAvailable }} selector: matchLabels: - {{- include "silver-api-server.selectorLabels" . | nindent 6 }} + {{- include "opengovmail-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 abc6041..796349a 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 "silver-api-server.fullname" . }} + name: {{ include "opengovmail-api-server.fullname" . }} labels: - {{- include "silver-api-server.labels" . | nindent 4 }} + {{- include "opengovmail-api-server.labels" . | nindent 4 }} {{- with .Values.route.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ spec: {{- end }} to: kind: Service - name: {{ include "silver-api-server.fullname" . }} + name: {{ include "opengovmail-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 c0c4e81..e1570f6 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 "silver-api-server.fullname" . }} + name: {{ include "opengovmail-api-server.fullname" . }} labels: - {{- include "silver-api-server.labels" . | nindent 4 }} + {{- include "opengovmail-api-server.labels" . | nindent 4 }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -16,4 +16,4 @@ spec: protocol: TCP name: http selector: - {{- include "silver-api-server.selectorLabels" . | nindent 4 }} + {{- include "opengovmail-api-server.selectorLabels" . | nindent 4 }} diff --git a/helm/charts/api-server/templates/serviceaccount.yaml b/helm/charts/api-server/templates/serviceaccount.yaml index 820fa36..8ccc8b4 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 "silver-api-server.serviceAccountName" . }} + name: {{ include "opengovmail-api-server.serviceAccountName" . }} labels: - {{- include "silver-api-server.labels" . | nindent 4 }} + {{- include "opengovmail-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 10373c1..4613d64 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 silver-api-server chart. +# Minimal overrides for the opengovmail-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 pingmailer --create-namespace \ +# --namespace opengovmail --create-namespace \ # -f my-api-values.yaml # ============================================================================ @@ -10,7 +10,7 @@ # cluster can reach. See README for build/push commands. # ============================================================================ image: - repository: "ghcr.io//pingmailer-api-server" + repository: "ghcr.io//opengovmail-api-server" tag: "0.1.0" # ============================================================================ diff --git a/helm/charts/api-server/values.yaml b/helm/charts/api-server/values.yaml index ba166b6..7e800d1 100644 --- a/helm/charts/api-server/values.yaml +++ b/helm/charts/api-server/values.yaml @@ -1,5 +1,5 @@ # --------------------------------------------------------------------------- -# silver-api-server values +# opengovmail-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/silver-mail-platform/pingmailer-api-server + repository: ghcr.io/opengovmail/opengovmail-api-server tag: "" pullPolicy: Always diff --git a/helm/charts/opendkim-server/Chart.yaml b/helm/charts/opendkim-server/Chart.yaml index 351e059..9a2b571 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/lsflk/silver-dkim) used by the - Pingmailer / Silver Mail stack. Generates per-domain DKIM signing keys on + Helm chart for the OpenDKIM milter (ghcr.io/opengovmail/opengovmail-dkim) used by the + OpenGovMail 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 - - pingmailer + - opengovmail maintainers: - - name: LSFLK - url: https://github.com/lsflk + - name: OpenGovMail + url: https://github.com/OpenGovMail sources: - - https://github.com/LSFLK/silver + - https://github.com/OpenGovMail/opengovmail diff --git a/helm/charts/opendkim-server/README.md b/helm/charts/opendkim-server/README.md index 8116eee..fa57da0 100644 --- a/helm/charts/opendkim-server/README.md +++ b/helm/charts/opendkim-server/README.md @@ -1,15 +1,15 @@ -# silver-opendkim Helm chart +# opengovmail-opendkim Helm chart -Helm chart for the OpenDKIM milter (`ghcr.io/lsflk/silver-dkim`) — the +Helm chart for the OpenDKIM milter (`ghcr.io/opengovmail/opengovmail-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 - `silver.yaml` deterministically from your `domains` list and packs them + `opengovmail.yaml` deterministically from your `domains` list and packs them into a `ConfigMap`. -2. Runs the `silver-dkim` image, which inspects `silver.yaml` on startup and +2. Runs the `opengovmail-dkim` image, which inspects `opengovmail.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 `silver-dkim` image is **designed for the PVC pattern** — its entrypoint +The `opengovmail-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 pingmailer --create-namespace \ + --namespace opengovmail --create-namespace \ -f my-domains.yaml ``` @@ -58,7 +58,7 @@ Or inline: ```bash helm upgrade --install opendkim-server ./helm/charts/opendkim-server \ - --namespace pingmailer --create-namespace \ + --namespace opengovmail --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 pingmailer exec deploy/opendkim-server -- \ +kubectl -n opengovmail 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/lsflk/silver-dkim` | | +| `image.repository` | `ghcr.io/opengovmail/opengovmail-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 pingmailer +helm uninstall opendkim-server -n opengovmail ``` 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 efc894f..6c9b167 100644 --- a/helm/charts/opendkim-server/templates/NOTES.txt +++ b/helm/charts/opendkim-server/templates/NOTES.txt @@ -1,8 +1,8 @@ -silver-opendkim has been installed. +opengovmail-opendkim has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} -Service: {{ include "silver-opendkim.fullname" . }}:{{ .Values.service.port }} (Milter) +Service: {{ include "opengovmail-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 "silver-opendkim.fullname" . }} + kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "opengovmail-opendkim.fullname" . }} The pod prints DKIM DNS TXT records on first start. Capture them with: - kubectl -n {{ .Release.Namespace }} exec deploy/{{ include "silver-opendkim.fullname" . }} \ + kubectl -n {{ .Release.Namespace }} exec deploy/{{ include "opengovmail-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 "silver-opendkim.fullname" . }}:{{ .Values.service.port }} - non_smtpd_milters = inet:{{ include "silver-opendkim.fullname" . }}:{{ .Values.service.port }} + smtpd_milters = inet:{{ include "opengovmail-opendkim.fullname" . }}:{{ .Values.service.port }} + non_smtpd_milters = inet:{{ include "opengovmail-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 "silver-opendkim.claimName" . }}` +DKIM private keys live on the PVC `{{ include "opengovmail-opendkim.claimName" . }}` ({{ .Values.persistence.size }}). The PVC survives `helm uninstall` — delete it explicitly to force key regeneration: - kubectl -n {{ .Release.Namespace }} delete pvc {{ include "silver-opendkim.claimName" . }} + kubectl -n {{ .Release.Namespace }} delete pvc {{ include "opengovmail-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 013bc63..4590d65 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 "silver-opendkim.name" -}} +{{- define "opengovmail-opendkim.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Fully qualified app name. */}} -{{- define "silver-opendkim.fullname" -}} +{{- define "opengovmail-opendkim.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -24,16 +24,16 @@ Fully qualified app name. {{/* Chart label. */}} -{{- define "silver-opendkim.chart" -}} +{{- define "opengovmail-opendkim.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels. */}} -{{- define "silver-opendkim.labels" -}} -helm.sh/chart: {{ include "silver-opendkim.chart" . }} -{{ include "silver-opendkim.selectorLabels" . }} +{{- define "opengovmail-opendkim.labels" -}} +helm.sh/chart: {{ include "opengovmail-opendkim.chart" . }} +{{ include "opengovmail-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 "silver-opendkim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "silver-opendkim.name" . }} +{{- define "opengovmail-opendkim.selectorLabels" -}} +app.kubernetes.io/name: {{ include "opengovmail-opendkim.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Service account name. */}} -{{- define "silver-opendkim.serviceAccountName" -}} +{{- define "opengovmail-opendkim.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "silver-opendkim.fullname" .) .Values.serviceAccount.name }} +{{- default (include "opengovmail-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 "silver-opendkim.claimName" -}} +{{- define "opengovmail-opendkim.claimName" -}} {{- if .Values.persistence.existingClaim }} {{- .Values.persistence.existingClaim }} {{- else }} -{{- printf "%s-keys" (include "silver-opendkim.fullname" .) }} +{{- printf "%s-keys" (include "opengovmail-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 "silver-opendkim.domain" -}} +{{- define "opengovmail-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 4d3ced9..95af6cc 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 "silver-opendkim.fullname" . }}-conf + name: {{ include "opengovmail-opendkim.fullname" . }}-conf labels: - {{- include "silver-opendkim.labels" . | nindent 4 }} + {{- include "opengovmail-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 }} - silver.yaml: | + opengovmail.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 6afe198..fa94600 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 "silver-opendkim.fullname" . }} + name: {{ include "opengovmail-opendkim.fullname" . }} labels: - {{- include "silver-opendkim.labels" . | nindent 4 }} + {{- include "opengovmail-opendkim.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: type: Recreate # PVC is RWO and DKIM is singleton — avoid rolling. selector: matchLabels: - {{- include "silver-opendkim.selectorLabels" . | nindent 6 }} + {{- include "opengovmail-opendkim.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "silver-opendkim.selectorLabels" . | nindent 8 }} + {{- include "opengovmail-opendkim.selectorLabels" . | nindent 8 }} annotations: # Roll the pod when the ConfigMap (and therefore opendkim.conf / - # KeyTable / SigningTable / TrustedHosts / silver.yaml) changes. + # KeyTable / SigningTable / TrustedHosts / opengovmail.yaml) changes. checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "silver-opendkim.serviceAccountName" . }} + serviceAccountName: {{ include "opengovmail-opendkim.serviceAccountName" . }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -62,8 +62,8 @@ spec: subPath: TrustedHosts readOnly: true - name: config - mountPath: /etc/opendkim/silver.yaml - subPath: silver.yaml + mountPath: /etc/opendkim/opengovmail.yaml + subPath: opengovmail.yaml readOnly: true - name: keys mountPath: /etc/dkimkeys @@ -88,11 +88,11 @@ spec: volumes: - name: config configMap: - name: {{ include "silver-opendkim.fullname" . }}-conf + name: {{ include "opengovmail-opendkim.fullname" . }}-conf - name: keys {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ include "silver-opendkim.claimName" . }} + claimName: {{ include "opengovmail-opendkim.claimName" . }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm/charts/opendkim-server/templates/pvc.yaml b/helm/charts/opendkim-server/templates/pvc.yaml index 16f1052..35d7cec 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 "silver-opendkim.claimName" . }} + name: {{ include "opengovmail-opendkim.claimName" . }} labels: - {{- include "silver-opendkim.labels" . | nindent 4 }} + {{- include "opengovmail-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 c451fff..a8354a5 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 "silver-opendkim.fullname" . }} + name: {{ include "opengovmail-opendkim.fullname" . }} labels: - {{- include "silver-opendkim.labels" . | nindent 4 }} + {{- include "opengovmail-opendkim.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -12,4 +12,4 @@ spec: protocol: TCP name: milter selector: - {{- include "silver-opendkim.selectorLabels" . | nindent 4 }} + {{- include "opengovmail-opendkim.selectorLabels" . | nindent 4 }} diff --git a/helm/charts/opendkim-server/templates/serviceaccount.yaml b/helm/charts/opendkim-server/templates/serviceaccount.yaml index 9d829f3..f99665f 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 "silver-opendkim.serviceAccountName" . }} + name: {{ include "opengovmail-opendkim.serviceAccountName" . }} labels: - {{- include "silver-opendkim.labels" . | nindent 4 }} + {{- include "opengovmail-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 1f350ce..794bdb3 100644 --- a/helm/charts/opendkim-server/values.yaml +++ b/helm/charts/opendkim-server/values.yaml @@ -1,11 +1,11 @@ # --------------------------------------------------------------------------- -# silver-opendkim values +# opengovmail-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 pingmailer --create-namespace \ +# --namespace opengovmail --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/silver-dkim. - repository: ghcr.io/silver-mail-platform/silver-dkim + # Built from mail-infra/images/opengovmail-dkim. + repository: ghcr.io/opengovmail/opengovmail-dkim tag: latest pullPolicy: Always @@ -81,7 +81,7 @@ service: port: 8891 # --------------------------------------------------------------------------- -# Persistent storage for /etc/dkimkeys. silver-dkim generates per-domain +# Persistent storage for /etc/dkimkeys. opengovmail-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 600742e..2a794d5 100644 --- a/helm/charts/raven-sasl-server/Chart.yaml +++ b/helm/charts/raven-sasl-server/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: raven-sasl-server description: | - Helm chart for the raven-sasl service (ghcr.io/lsflk/raven-sasl) used by - the Pingmailer / Silver Mail stack. Provides a Dovecot-compatible SASL + Helm chart for the raven-sasl service (ghcr.io/opengovmail/raven-sasl) used by + the OpenGovMail 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 - - pingmailer + - opengovmail maintainers: - - name: LSFLK - url: https://github.com/lsflk + - name: OpenGovMail + url: https://github.com/OpenGovMail sources: - - https://github.com/LSFLK/silver + - https://github.com/OpenGovMail/opengovmail diff --git a/helm/charts/raven-sasl-server/README.md b/helm/charts/raven-sasl-server/README.md index 3ed890b..bbb4e2f 100644 --- a/helm/charts/raven-sasl-server/README.md +++ b/helm/charts/raven-sasl-server/README.md @@ -1,6 +1,6 @@ -# silver-raven-sasl Helm chart +# opengovmail-raven-sasl Helm chart -Helm chart for the `raven-sasl` service (`ghcr.io/lsflk/raven-sasl`) — the +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 [docker-compose.yml](../../../docker-compose.yml). @@ -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 [silver-certificates chart](../certbot-server/) — + (compatible with the [opengovmail-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 silver-certificates chart +# Optional — TLS Secret produced by the opengovmail-certificates chart tlsSecret: name: mail-example-com-tls ``` ```bash helm upgrade --install raven-sasl ./helm/charts/raven-sasl-server \ - --namespace pingmailer --create-namespace \ + --namespace opengovmail --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 pingmailer +helm uninstall raven-sasl -n opengovmail ``` 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 687407b..0b8faf5 100644 --- a/helm/charts/raven-sasl-server/templates/NOTES.txt +++ b/helm/charts/raven-sasl-server/templates/NOTES.txt @@ -1,8 +1,8 @@ -silver-raven-sasl has been installed. +opengovmail-raven-sasl has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} -Service: {{ include "silver-raven-sasl.fullname" . }}:{{ .Values.service.port }} (Dovecot SASL) +Service: {{ include "opengovmail-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 "silver-raven-sasl.fullname" . }}:{{ .Values.service.port }} + smtpd_sasl_path = inet:{{ include "opengovmail-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 "silver-raven-sasl.fullname" . }} + kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "opengovmail-raven-sasl.fullname" . }} # TCP smoke test kubectl -n {{ .Release.Namespace }} run -it --rm tmp-busybox --image=busybox --restart=Never -- \ - sh -c 'nc -zv {{ include "silver-raven-sasl.fullname" . }} {{ .Values.service.port }}' + sh -c 'nc -zv {{ include "opengovmail-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 silver-certificates chart. +`-tls` from the opengovmail-certificates chart. {{- end }} diff --git a/helm/charts/raven-sasl-server/templates/_helpers.tpl b/helm/charts/raven-sasl-server/templates/_helpers.tpl index 549c96e..f6f7d65 100644 --- a/helm/charts/raven-sasl-server/templates/_helpers.tpl +++ b/helm/charts/raven-sasl-server/templates/_helpers.tpl @@ -1,8 +1,8 @@ -{{- define "silver-raven-sasl.name" -}} +{{- define "opengovmail-raven-sasl.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} -{{- define "silver-raven-sasl.fullname" -}} +{{- define "opengovmail-raven-sasl.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -15,13 +15,13 @@ {{- end }} {{- end }} -{{- define "silver-raven-sasl.chart" -}} +{{- define "opengovmail-raven-sasl.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} -{{- define "silver-raven-sasl.labels" -}} -helm.sh/chart: {{ include "silver-raven-sasl.chart" . }} -{{ include "silver-raven-sasl.selectorLabels" . }} +{{- define "opengovmail-raven-sasl.labels" -}} +helm.sh/chart: {{ include "opengovmail-raven-sasl.chart" . }} +{{ include "opengovmail-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 "silver-raven-sasl.selectorLabels" -}} -app.kubernetes.io/name: {{ include "silver-raven-sasl.name" . }} +{{- define "opengovmail-raven-sasl.selectorLabels" -}} +app.kubernetes.io/name: {{ include "opengovmail-raven-sasl.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- define "silver-raven-sasl.serviceAccountName" -}} +{{- define "opengovmail-raven-sasl.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "silver-raven-sasl.fullname" .) .Values.serviceAccount.name }} +{{- default (include "opengovmail-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 "silver-raven-sasl.issuerUrl" -}} +{{- define "opengovmail-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 "silver-raven-sasl.jwksUrl" -}} +{{- define "opengovmail-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 c47d852..beceba7 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 "silver-raven-sasl.fullname" . }}-conf + name: {{ include "opengovmail-raven-sasl.fullname" . }}-conf labels: - {{- include "silver-raven-sasl.labels" . | nindent 4 }} + {{- include "opengovmail-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 "silver-raven-sasl.issuerUrl" . | quote }} - oauth_jwks_url: {{ include "silver-raven-sasl.jwksUrl" . | quote }} + oauth_issuer_url: {{ include "opengovmail-raven-sasl.issuerUrl" . | quote }} + oauth_jwks_url: {{ include "opengovmail-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 df71a16..78346bf 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 "silver-raven-sasl.fullname" . }} + name: {{ include "opengovmail-raven-sasl.fullname" . }} labels: - {{- include "silver-raven-sasl.labels" . | nindent 4 }} + {{- include "opengovmail-raven-sasl.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "silver-raven-sasl.selectorLabels" . | nindent 6 }} + {{- include "opengovmail-raven-sasl.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "silver-raven-sasl.selectorLabels" . | nindent 8 }} + {{- include "opengovmail-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 "silver-raven-sasl.serviceAccountName" . }} + serviceAccountName: {{ include "opengovmail-raven-sasl.serviceAccountName" . }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -71,7 +71,7 @@ spec: volumes: - name: config configMap: - name: {{ include "silver-raven-sasl.fullname" . }}-conf + name: {{ include "opengovmail-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 dbbca3b..62c5f90 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 "silver-raven-sasl.fullname" . }} + name: {{ include "opengovmail-raven-sasl.fullname" . }} labels: - {{- include "silver-raven-sasl.labels" . | nindent 4 }} + {{- include "opengovmail-raven-sasl.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -12,4 +12,4 @@ spec: protocol: TCP name: sasl selector: - {{- include "silver-raven-sasl.selectorLabels" . | nindent 4 }} + {{- include "opengovmail-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 9ac5c4c..7833b3e 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 "silver-raven-sasl.serviceAccountName" . }} + name: {{ include "opengovmail-raven-sasl.serviceAccountName" . }} labels: - {{- include "silver-raven-sasl.labels" . | nindent 4 }} + {{- include "opengovmail-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 5151c57..051c0ab 100644 --- a/helm/charts/raven-sasl-server/values.yaml +++ b/helm/charts/raven-sasl-server/values.yaml @@ -1,11 +1,11 @@ # --------------------------------------------------------------------------- -# silver-raven-sasl values +# opengovmail-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 pingmailer --create-namespace \ +# --namespace opengovmail --create-namespace \ # -f my-raven-values.yaml # # Where my-raven-values.yaml contains the secrets (DO NOT commit). @@ -20,7 +20,7 @@ fullnameOverride: "raven-sasl" replicaCount: 1 image: - repository: ghcr.io/lsflk/raven-sasl + repository: ghcr.io/opengovmail/raven-sasl tag: latest pullPolicy: IfNotPresent @@ -73,7 +73,7 @@ oauthEmailAuthorization: {} # - noreply@example.com # --------------------------------------------------------------------------- -# TLS certs mounted at /certs (compatible with the silver-certificates chart, +# TLS certs mounted at /certs (compatible with the opengovmail-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 494aaa6..c71920f 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/lsflk/silver-smtp) - used by the Pingmailer / Silver Mail stack. Renders main.cf / master.cf / + Helm chart for the Postfix-based SMTP server (ghcr.io/opengovmail/opengovmail-smtp) + used by the OpenGovMail 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 - - pingmailer + - opengovmail maintainers: - - name: LSFLK - url: https://github.com/lsflk + - name: OpenGovMail + url: https://github.com/OpenGovMail sources: - - https://github.com/LSFLK/silver + - https://github.com/OpenGovMail/opengovmail diff --git a/helm/charts/smtp-server/README.md b/helm/charts/smtp-server/README.md index af8f37a..b89198b 100644 --- a/helm/charts/smtp-server/README.md +++ b/helm/charts/smtp-server/README.md @@ -1,19 +1,19 @@ -# silver-smtp Helm chart +# opengovmail-smtp Helm chart -Helm chart for the Postfix-based SMTP server (`ghcr.io/lsflk/silver-smtp`) — +Helm chart for the Postfix-based SMTP server (`ghcr.io/opengovmail/opengovmail-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 Pingmailer mail-plane charts. Install order: +This is the third of four OpenGovMail mail-plane charts. Install order: -1. [silver-certificates](../certbot-server/) — issues TLS certs via cert-manager. -2. [silver-opendkim](../opendkim-server/) — DKIM milter on `:8891`. -3. [silver-raven-sasl](../raven-sasl-server/) — SASL auth daemon on `:12345`. -4. **silver-smtp** (this chart) — Postfix on `:25` (+ optional submission `:587`). +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`). ## What this chart deploys -- A `ConfigMap` that templates `main.cf`, `master.cf`, `silver.yaml`, and +- A `ConfigMap` that templates `main.cf`, `master.cf`, `opengovmail.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 silver-certificates chart + name: mail-example-com-tls # produced by the opengovmail-certificates chart ``` ```bash helm upgrade --install smtp-server ./helm/charts/smtp-server \ - --namespace pingmailer --create-namespace \ + --namespace opengovmail --create-namespace \ -f my-smtp-values.yaml ``` @@ -148,7 +148,7 @@ support case to unblock 25. ## Uninstall ```bash -helm uninstall smtp-server -n pingmailer +helm uninstall smtp-server -n opengovmail ``` 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 d1ea5e5..785f998 100644 --- a/helm/charts/smtp-server/templates/NOTES.txt +++ b/helm/charts/smtp-server/templates/NOTES.txt @@ -1,11 +1,11 @@ -silver-smtp has been installed. +opengovmail-smtp has been installed. Release: {{ .Release.Name }} Namespace: {{ .Release.Namespace }} -Hostname: {{ include "silver-smtp.hostname" . }} +Hostname: {{ include "opengovmail-smtp.hostname" . }} Domain: {{ .Values.domain }} -Service: {{ include "silver-smtp.fullname" . }} +Service: {{ include "opengovmail-smtp.fullname" . }} SMTP: :{{ .Values.service.smtpPort }} {{- if .Values.postfix.submission.enabled }} Submission: :{{ .Values.service.submissionPort }} @@ -13,7 +13,7 @@ Service: {{ include "silver-smtp.fullname" . }} ----- 1. Check the pod is up ----- - kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "silver-smtp.fullname" . }} + kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "opengovmail-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 "silver-smtp.fullname" . }} -w + kubectl -n {{ .Release.Namespace }} get svc {{ include "opengovmail-smtp.fullname" . }} -w Then publish DNS: - MX {{ .Values.domain }}. 10 {{ include "silver-smtp.hostname" . }}. - A {{ include "silver-smtp.hostname" . }}. + MX {{ .Values.domain }}. 10 {{ include "opengovmail-smtp.hostname" . }}. + A {{ include "opengovmail-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 "silver-smtp.fullname" . }} \ + kubectl -n {{ .Release.Namespace }} get svc {{ include "opengovmail-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) ----- - silver-opendkim (Service: opendkim-server:8891) - silver-raven-sasl (Service: raven-sasl:12345) - silver-certificates (TLS Secret: {{ .Values.tlsSecret.name | default "(not set)" }}) + opengovmail-opendkim (Service: opendkim-server:8891) + opengovmail-raven-sasl (Service: raven-sasl:12345) + opengovmail-certificates (TLS Secret: {{ .Values.tlsSecret.name | default "(not set)" }}) ----- 4. Mail queue ----- -The Postfix mail queue lives on the PVC `{{ include "silver-smtp.spoolClaim" . }}` +The Postfix mail queue lives on the PVC `{{ include "opengovmail-smtp.spoolClaim" . }}` ({{ .Values.persistence.spool.size }}). Survives `helm uninstall`; delete explicitly to discard in-flight mail: - kubectl -n {{ .Release.Namespace }} delete pvc {{ include "silver-smtp.spoolClaim" . }} + kubectl -n {{ .Release.Namespace }} delete pvc {{ include "opengovmail-smtp.spoolClaim" . }} ----- 5. Smoke-test SMTP ----- kubectl -n {{ .Release.Namespace }} run -it --rm tmp --image=busybox --restart=Never -- \ - sh -c 'nc -v {{ include "silver-smtp.fullname" . }} {{ .Values.service.smtpPort }} <`. */}} -{{- define "silver-smtp.hostname" -}} +{{- define "opengovmail-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 "silver-smtp.spoolClaim" -}} +{{- define "opengovmail-smtp.spoolClaim" -}} {{- if .Values.persistence.spool.existingClaim }} {{- .Values.persistence.spool.existingClaim }} {{- else }} -{{- printf "%s-spool" (include "silver-smtp.fullname" .) }} +{{- printf "%s-spool" (include "opengovmail-smtp.fullname" .) }} {{- end }} {{- end }} diff --git a/helm/charts/smtp-server/templates/configmap.yaml b/helm/charts/smtp-server/templates/configmap.yaml index ce9c640..2dc7154 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 silver-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 opengovmail-certificates chart." }} {{- end }} --- apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "silver-smtp.fullname" . }}-conf + name: {{ include "opengovmail-smtp.fullname" . }}-conf labels: - {{- include "silver-smtp.labels" . | nindent 4 }} + {{- include "opengovmail-smtp.labels" . | nindent 4 }} data: - silver.yaml: | + opengovmail.yaml: | domains: - domain: {{ .Values.domain }} main.cf: | # =========================================================== - # main.cf — rendered by the silver-smtp Helm chart + # main.cf — rendered by the opengovmail-smtp Helm chart # =========================================================== # --- Identity --- - myhostname = {{ include "silver-smtp.hostname" . }} + myhostname = {{ include "opengovmail-smtp.hostname" . }} mydomain = {{ .Values.domain }} myorigin = $mydomain mydestination = localhost.localdomain, localhost @@ -84,7 +84,7 @@ data: master.cf: | # =========================================================== - # master.cf — rendered by the silver-smtp Helm chart + # master.cf — rendered by the opengovmail-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 ae84be9..ed80695 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 "silver-smtp.fullname" . }} + name: {{ include "opengovmail-smtp.fullname" . }} labels: - {{- include "silver-smtp.labels" . | nindent 4 }} + {{- include "opengovmail-smtp.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: type: Recreate # Postfix queue PVC is RWO — avoid rolling. selector: matchLabels: - {{- include "silver-smtp.selectorLabels" . | nindent 6 }} + {{- include "opengovmail-smtp.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "silver-smtp.selectorLabels" . | nindent 8 }} + {{- include "opengovmail-smtp.selectorLabels" . | nindent 8 }} annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "silver-smtp.serviceAccountName" . }} + serviceAccountName: {{ include "opengovmail-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/silver.yaml /shared-postfix/silver.yaml + cp /configs/opengovmail.yaml /shared-postfix/opengovmail.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 "silver-smtp.fullname" . }}-conf + name: {{ include "opengovmail-smtp.fullname" . }}-conf - name: postfix-etc emptyDir: {} - name: spool {{- if .Values.persistence.spool.enabled }} persistentVolumeClaim: - claimName: {{ include "silver-smtp.spoolClaim" . }} + claimName: {{ include "opengovmail-smtp.spoolClaim" . }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm/charts/smtp-server/templates/pvc.yaml b/helm/charts/smtp-server/templates/pvc.yaml index f58e16f..825930b 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 "silver-smtp.spoolClaim" . }} + name: {{ include "opengovmail-smtp.spoolClaim" . }} labels: - {{- include "silver-smtp.labels" . | nindent 4 }} + {{- include "opengovmail-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 453aa68..dba5336 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 "silver-smtp.fullname" . }} + name: {{ include "opengovmail-smtp.fullname" . }} labels: - {{- include "silver-smtp.labels" . | nindent 4 }} + {{- include "opengovmail-smtp.labels" . | nindent 4 }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -38,4 +38,4 @@ spec: {{- end }} {{- end }} selector: - {{- include "silver-smtp.selectorLabels" . | nindent 4 }} + {{- include "opengovmail-smtp.selectorLabels" . | nindent 4 }} diff --git a/helm/charts/smtp-server/templates/serviceaccount.yaml b/helm/charts/smtp-server/templates/serviceaccount.yaml index 5973533..9efb8c6 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 "silver-smtp.serviceAccountName" . }} + name: {{ include "opengovmail-smtp.serviceAccountName" . }} labels: - {{- include "silver-smtp.labels" . | nindent 4 }} + {{- include "opengovmail-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 bc10759..fbcdec2 100644 --- a/helm/charts/smtp-server/values.yaml +++ b/helm/charts/smtp-server/values.yaml @@ -1,11 +1,11 @@ # --------------------------------------------------------------------------- -# silver-smtp values +# opengovmail-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 pingmailer --create-namespace \ +# --namespace opengovmail --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/silver-smtp-rootless. + # Patched-Postfix (rootless) image built from mail-infra/images/opengovmail-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/silver-mail-platform/silver-smtp + repository: ghcr.io/opengovmail/opengovmail-smtp tag: rootless pullPolicy: Always @@ -68,7 +68,7 @@ postfix: milterProtocol: 6 milterDefaultAction: accept - # SASL — points at silver-raven-sasl. + # SASL — points at opengovmail-raven-sasl. sasl: type: dovecot path: "inet:raven-sasl:12345" @@ -103,7 +103,7 @@ postfix: # - "myorigin = $mydomain" # --------------------------------------------------------------------------- -# TLS certificate Secret (typically produced by the silver-certificates +# TLS certificate Secret (typically produced by the opengovmail-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 9e081c2..19bec3a 100644 --- a/helm/templates/NOTES.txt +++ b/helm/templates/NOTES.txt @@ -1,4 +1,4 @@ -pingmailer {{ .Chart.Version }} installed as release "{{ .Release.Name }}" in namespace "{{ .Release.Namespace }}". +opengovmail {{ .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 400c6a0..6c7a176 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 pingmailer ./helm -n pingmailer -f my-values.yaml +# helm upgrade --install opengovmail ./helm -n opengovmail -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/silver-mail-platform/pingmailer-api-server + repository: ghcr.io/opengovmail/opengovmail-api-server tag: "0.1.0" ingress: enabled: true diff --git a/helm/values.yaml b/helm/values.yaml index 8bd925d..a86037f 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,5 +1,5 @@ # =========================================================================== -# pingmailer — umbrella chart values +# opengovmail — 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 pingmailer ./helm -n -f my-values.yaml +# helm upgrade --install opengovmail ./helm -n -f my-values.yaml # =========================================================================== # --------------------------------------------------------------------------- @@ -37,7 +37,7 @@ api-server: replicaCount: 2 image: - repository: ghcr.io/silver-mail-platform/pingmailer-api-server + repository: ghcr.io/opengovmail/opengovmail-api-server tag: "" pullPolicy: Always @@ -69,7 +69,7 @@ opendkim-server: enabled: true image: - repository: ghcr.io/silver-mail-platform/silver-dkim + repository: ghcr.io/opengovmail/opengovmail-dkim tag: latest # REQUIRED. One entry per signing domain. @@ -91,7 +91,7 @@ raven-sasl-server: enabled: true image: - repository: ghcr.io/lsflk/raven-sasl + repository: ghcr.io/opengovmail/raven-sasl tag: latest config: @@ -134,7 +134,7 @@ smtp-server: enabled: true image: - repository: ghcr.io/silver-mail-platform/silver-smtp + repository: ghcr.io/opengovmail/opengovmail-smtp tag: rootless domain: "" ### MAIL DOMAIN — REQUIRED diff --git a/mail-infra/conf/silver.yaml b/mail-infra/conf/opengovmail.yaml similarity index 91% rename from mail-infra/conf/silver.yaml rename to mail-infra/conf/opengovmail.yaml index b3ba600..b13995b 100644 --- a/mail-infra/conf/silver.yaml +++ b/mail-infra/conf/opengovmail.yaml @@ -1,5 +1,5 @@ # =============================================================== -# Silver Mail Server Configuration (`silver.yaml`) +# OpenGovMail Server Configuration (`opengovmail.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 badfa80..30f35d1 100644 --- a/mail-infra/helm/certbot-server/Chart.yaml +++ b/mail-infra/helm/certbot-server/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -name: silver-certificates +name: opengovmail-certificates description: | - Helm chart that renders cert-manager Certificate resources for the Pingmailer - / Silver Mail stack. Each configured domain gets a Certificate (covering + Helm chart that renders cert-manager Certificate resources for the OpenGovMail + / OpenGovMail 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 - - pingmailer + - opengovmail maintainers: - - name: LSFLK - url: https://github.com/lsflk + - name: OpenGovMail + url: https://github.com/OpenGovMail sources: - - https://github.com/LSFLK/silver/pull/325 + - https://github.com/OpenGovMail/opengovmail/pull/325 diff --git a/mail-infra/helm/certbot-server/README.md b/mail-infra/helm/certbot-server/README.md index c8f3b16..a2625e9 100644 --- a/mail-infra/helm/certbot-server/README.md +++ b/mail-infra/helm/certbot-server/README.md @@ -1,7 +1,7 @@ -# silver-certificates Helm chart +# opengovmail-certificates Helm chart Renders [cert-manager](https://cert-manager.io) `Certificate` CRDs for the -Pingmailer / Silver Mail stack. Each configured domain gets a certificate +OpenGovMail 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 [LSFLK/silver#325](https://github.com/LSFLK/silver/pull/325). +Modeled after [OpenGovMail/opengovmail#325](https://github.com/OpenGovMail/opengovmail/pull/325). ## Architecture ``` ┌─────────────────────────┐ creates ┌──────────────────────────┐ - │ silver-certificates │ ───────────▶ │ Certificate (per domain) │ + │ opengovmail-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 silver-certificates ./mail-infra/helm/certbot-server \ - --namespace pingmailer --create-namespace \ +helm upgrade --install opengovmail-certificates ./mail-infra/helm/certbot-server \ + --namespace opengovmail --create-namespace \ --set tls.issuer=le-staging \ --set 'tls.domains={mail.example.com,example.com}' ``` @@ -83,16 +83,16 @@ helm upgrade --install silver-certificates ./mail-infra/helm/certbot-server \ When the staging certificate reports `READY=True`, flip to prod: ```bash -helm upgrade --install silver-certificates ./mail-infra/helm/certbot-server \ - --namespace pingmailer --reuse-values \ +helm upgrade --install opengovmail-certificates ./mail-infra/helm/certbot-server \ + --namespace opengovmail --reuse-values \ --set tls.issuer=le-prod ``` Track issuance: ```bash -kubectl -n pingmailer get certificate -kubectl -n pingmailer describe certificate mail-example-com-tls +kubectl -n opengovmail get certificate +kubectl -n opengovmail describe certificate mail-example-com-tls ``` ## Values @@ -127,7 +127,7 @@ volumes: ## Uninstall ```bash -helm uninstall silver-certificates -n pingmailer +helm uninstall opengovmail-certificates -n opengovmail ``` 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 3df0950..79ac2ac 100644 --- a/mail-infra/helm/certbot-server/templates/NOTES.txt +++ b/mail-infra/helm/certbot-server/templates/NOTES.txt @@ -1,4 +1,4 @@ -silver-certificates has been installed. +opengovmail-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 f9309a4..abd2786 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 "silver-certificates.name" -}} +{{- define "opengovmail-certificates.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Create a default fully qualified app name. */}} -{{- define "silver-certificates.fullname" -}} +{{- define "opengovmail-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 "silver-certificates.chart" -}} +{{- define "opengovmail-certificates.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels. */}} -{{- define "silver-certificates.labels" -}} -helm.sh/chart: {{ include "silver-certificates.chart" . }} -{{ include "silver-certificates.selectorLabels" . }} +{{- define "opengovmail-certificates.labels" -}} +helm.sh/chart: {{ include "opengovmail-certificates.chart" . }} +{{ include "opengovmail-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 "silver-certificates.selectorLabels" -}} -app.kubernetes.io/name: {{ include "silver-certificates.name" . }} +{{- define "opengovmail-certificates.selectorLabels" -}} +app.kubernetes.io/name: {{ include "opengovmail-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 056a76a..dddab35 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 "silver-certificates.labels" $ | nindent 4 }} + {{- include "opengovmail-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 34c0912..11fffe1 100644 --- a/mail-infra/helm/certbot-server/values.yaml +++ b/mail-infra/helm/certbot-server/values.yaml @@ -1,11 +1,11 @@ # --------------------------------------------------------------------------- -# silver-certificates values +# opengovmail-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 silver-certificates ./mail-infra/helm/certbot-server \ -# --namespace pingmailer --create-namespace \ +# helm upgrade --install opengovmail-certificates ./mail-infra/helm/certbot-server \ +# --namespace opengovmail --create-namespace \ # --set tls.issuer=le-staging \ # --set 'tls.domains={mail.example.com,example.com}' # diff --git a/mail-infra/images/silver-dkim/Dockerfile b/mail-infra/images/opengovmail-dkim/Dockerfile similarity index 100% rename from mail-infra/images/silver-dkim/Dockerfile rename to mail-infra/images/opengovmail-dkim/Dockerfile diff --git a/mail-infra/images/silver-dkim/entrypoint.sh b/mail-infra/images/opengovmail-dkim/entrypoint.sh similarity index 96% rename from mail-infra/images/silver-dkim/entrypoint.sh rename to mail-infra/images/opengovmail-dkim/entrypoint.sh index ab24d5c..425c14a 100755 --- a/mail-infra/images/silver-dkim/entrypoint.sh +++ b/mail-infra/images/opengovmail-dkim/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -CONFIG_FILE="/etc/opendkim/silver.yaml" +CONFIG_FILE="/etc/opendkim/opengovmail.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 silver.yaml has domains configured" + echo "⚠️ Please ensure opengovmail.yaml has domains configured" DOMAINS="example.org" fi diff --git a/mail-infra/images/silver-smtp-rootless/Dockerfile b/mail-infra/images/opengovmail-smtp-rootless/Dockerfile similarity index 97% rename from mail-infra/images/silver-smtp-rootless/Dockerfile rename to mail-infra/images/opengovmail-smtp-rootless/Dockerfile index 5e7648e..3748e80 100644 --- a/mail-infra/images/silver-smtp-rootless/Dockerfile +++ b/mail-infra/images/opengovmail-smtp-rootless/Dockerfile @@ -1,5 +1,5 @@ # ============================================================================= -# silver-smtp (rootless / patched Postfix) for OpenShift restricted-v2. +# opengovmail-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 silver-smtp image +# Stage 2 — slim runtime, mirrors the stock opengovmail-smtp image # ---------------------------------------------------------------------------- FROM debian:bookworm-slim ENV DEBIAN_FRONTEND=noninteractive diff --git a/mail-infra/images/silver-smtp-rootless/entrypoint.sh b/mail-infra/images/opengovmail-smtp-rootless/entrypoint.sh similarity index 95% rename from mail-infra/images/silver-smtp-rootless/entrypoint.sh rename to mail-infra/images/opengovmail-smtp-rootless/entrypoint.sh index eab63cc..663161c 100755 --- a/mail-infra/images/silver-smtp-rootless/entrypoint.sh +++ b/mail-infra/images/opengovmail-smtp-rootless/entrypoint.sh @@ -1,9 +1,9 @@ #!/bin/bash set -e -CONFIG_FILE="/etc/postfix/silver.yaml" +CONFIG_FILE="/etc/postfix/opengovmail.yaml" -# --- domain from silver.yaml ------------------------------------------------- +# --- domain from opengovmail.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 328e9dd..409d90c 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/LSFLK/silver/pull/325 +# Adapted from https://github.com/OpenGovMail/opengovmail/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 917f6a3..1958db2 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 Silver mail services and API Endpoint..." +echo " - Stopping OpenGovMail services and API Endpoint..." (cd "${ROOT_DIR}" && docker compose down) if [ $? -eq 0 ]; then - echo -e "${GREEN} ✓ Silver services stopped successfully${NC}" + echo -e "${GREEN} ✓ OpenGovMail services stopped successfully${NC}" else - echo -e "${RED} ✗ Failed to stop Silver services${NC}" + echo -e "${RED} ✗ Failed to stop OpenGovMail services${NC}" fi # Step 2: Remove all volumes diff --git a/mail-infra/scripts/service/start-silver.sh b/mail-infra/scripts/service/start-opengovmail.sh similarity index 93% rename from mail-infra/scripts/service/start-silver.sh rename to mail-infra/scripts/service/start-opengovmail.sh index 1de372b..c192701 100755 --- a/mail-infra/scripts/service/start-silver.sh +++ b/mail-infra/scripts/service/start-opengovmail.sh @@ -1,7 +1,7 @@ #!/bin/bash # ============================================ -# Silver Mail Setup Wizard +# OpenGovMail 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}/silver.yaml" +CONFIG_FILE="${CONF_DIR}/opengovmail.yaml" # ASCII Banner echo -e "${CYAN}" @@ -45,7 +45,7 @@ EOF echo -e "${NC}" echo "" -echo -e " 🚀 ${GREEN}Welcome to Silver Mail System Setup${NC}" +echo -e " 🚀 ${GREEN}Welcome to OpenGovMail 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 silver.yaml +# Extract primary (first) domain from the domains list in opengovmail.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 Silver mail services -echo " - Starting Silver mail services and API Endpoint..." +# Start main OpenGovMail services +echo " - Starting OpenGovMail 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} ✓ Silver mail services started${NC}" +echo -e "${GREEN} ✓ OpenGovMail services started${NC}" sleep 3 # Wait for services to initialize diff --git a/mail-infra/scripts/service/stop-silver.sh b/mail-infra/scripts/service/stop-opengovmail.sh similarity index 83% rename from mail-infra/scripts/service/stop-silver.sh rename to mail-infra/scripts/service/stop-opengovmail.sh index d848b2e..e141814 100644 --- a/mail-infra/scripts/service/stop-silver.sh +++ b/mail-infra/scripts/service/stop-opengovmail.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 Silver mail services and API Endpoint..." +echo "Stopping OpenGovMail 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 23ecbdc..99a5aa4 100644 --- a/mail-infra/scripts/setup/setup.sh +++ b/mail-infra/scripts/setup/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash # ============================================ -# Silver Mail Setup Script - This script is responsible for generating all the configs for our services. +# OpenGovMail 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}/silver.yaml" -# Read silver-config from the configuration file -readonly SILVER_CONFIG=$(grep -m 1 '^config-url:' "${CONFIG_FILE}" | sed 's/config-url: //' | xargs) +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) # ASCII Banner echo -e "${CYAN}" @@ -47,7 +47,7 @@ EOF echo -e "${NC}" echo -echo -e " 🚀 ${GREEN}Welcome to the Silver Mail System Setup${NC}" +echo -e " 🚀 ${GREEN}Welcome to the OpenGovMail 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 silver.yaml +# Extract primary (first) domain from the domains list in opengovmail.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 b74650a..d154a8e 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}/silver.yaml" +CONFIG_FILE="${CONF_DIR}/opengovmail.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 0ad9d86..c16125b 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 silver.yaml +# for ALL domains defined in opengovmail.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 SILVER_YAML_FILE="${ROOT_DIR}/../conf/silver.yaml" -readonly LETSENCRYPT_PATH="${ROOT_DIR}/silver-config/certbot/keys" +readonly OPENGOVMAIL_YAML_FILE="${ROOT_DIR}/../conf/opengovmail.yaml" +readonly LETSENCRYPT_PATH="${ROOT_DIR}/opengovmail-config/certbot/keys" -# Extract domains from silver.yaml -DOMAINS=$(grep '^\s*-\s*domain:' "${SILVER_YAML_FILE}" | sed 's/.*domain:\s*//' | xargs) +# Extract domains from opengovmail.yaml +DOMAINS=$(grep '^\s*-\s*domain:' "${OPENGOVMAIL_YAML_FILE}" | sed 's/.*domain:\s*//' | xargs) if [ -z "$DOMAINS" ]; then - echo "❌ Error: No domains found in ${SILVER_YAML_FILE}" + echo "❌ Error: No domains found in ${OPENGOVMAIL_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 dd072c0..bbffe04 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 SILVER_YAML_FILE="${ROOT_DIR}/../conf/silver.yaml" -readonly CONFIGS_PATH="${ROOT_DIR}/silver-config/opendkim" +readonly OPENGOVMAIL_YAML_FILE="${ROOT_DIR}/../conf/opengovmail.yaml" +readonly CONFIGS_PATH="${ROOT_DIR}/opengovmail-config/opendkim" -# --- Helper: Extract domain configs from silver.yaml --- +# --- Helper: Extract domain configs from opengovmail.yaml --- extract_domain_configs() { awk ' /^[[:space:]]*-[[:space:]]*domain:/ { @@ -46,7 +46,7 @@ extract_domain_configs() { } if (domain != "" && domain != "null") { print domain "," selector "," keysize } } - ' "$SILVER_YAML_FILE" + ' "$OPENGOVMAIL_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 ${SILVER_YAML_FILE}" + echo "Error: No domains found in ${OPENGOVMAIL_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 285e314..5beb92a 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 SILVER_YAML_FILE="${ROOT_DIR}/conf/silver.yaml" -readonly CONFIGS_PATH="${ROOT_DIR}/services/silver-config/postfix" +readonly OPENGOVMAIL_YAML_FILE="${ROOT_DIR}/conf/opengovmail.yaml" +readonly CONFIGS_PATH="${ROOT_DIR}/services/opengovmail-config/postfix" readonly DKIM_SELECTOR=mail # --- Main Logic --- -# Extract primary (first) domain from the domains list in silver.yaml -readonly MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "${SILVER_YAML_FILE}" | sed 's/.*domain:\s*//' | xargs) -#export RELAYHOST=$(yq -e '.relayhost' "$SILVER_YAML_FILE" || echo "") +# 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 "") # --- 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 d1f427f..556ac00 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/silver/services -GEN_DIR="${ROOT_DIR}/silver-config/raven" # Base path +ROOT_DIR="$(dirname "$SCRIPT_DIR")" # /root/opengovmail/services +GEN_DIR="${ROOT_DIR}/opengovmail-config/raven" # Base path -CONFIG_FILE="${ROOT_DIR}/../conf/silver.yaml" +CONFIG_FILE="${ROOT_DIR}/../conf/opengovmail.yaml" OUTPUT_FILE="${GEN_DIR}/conf/raven.yaml" -# --- Extract primary (first) domain from silver.yaml --- +# --- Extract primary (first) domain from opengovmail.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}/silver-config/certbot/keys/etc/live/${MAIL_DOMAIN}" -RAVEN_CERT_PATH="${ROOT_DIR}/silver-config/raven/certs" +LETSENCRYPT_PATH="${ROOT_DIR}/opengovmail-config/certbot/keys/etc/live/${MAIL_DOMAIN}" +RAVEN_CERT_PATH="${ROOT_DIR}/opengovmail-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 c1f53cb..49ac3fa 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 silver.yaml -readonly MAIL_DOMAIN=$(grep -m 1 '^\s*-\s*domain:' "${ROOT_DIR}/../conf/silver.yaml" | sed 's/.*domain:\s*//' | xargs) -readonly LETSENCRYPT_PATH="${ROOT_DIR}/silver-config/certbot/keys/etc/live/${MAIL_DOMAIN}" -readonly THUNDER_CERTS_PATH="${ROOT_DIR}/silver-config/thunder/certs" -readonly THUNDER_DEPLOYMENT_FILE="${ROOT_DIR}/silver-config/thunder/deployment.yaml" -readonly THUNDER_CONSOLE_CONFIG="${ROOT_DIR}/silver-config/thunder/console-config.js" -readonly THUNDER_GATE_CONFIG="${ROOT_DIR}/silver-config/thunder/gate-config.js" +# 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" readonly THUNDER_PORT="8090" mkdir -p "${THUNDER_CERTS_PATH}" diff --git a/mail-infra/services/silver-config/opendkim/opendkim.conf b/mail-infra/services/opengovmail-config/opendkim/opendkim.conf similarity index 100% rename from mail-infra/services/silver-config/opendkim/opendkim.conf rename to mail-infra/services/opengovmail-config/opendkim/opendkim.conf diff --git a/mail-infra/services/silver-config/postfix/master.cf b/mail-infra/services/opengovmail-config/postfix/master.cf similarity index 100% rename from mail-infra/services/silver-config/postfix/master.cf rename to mail-infra/services/opengovmail-config/postfix/master.cf diff --git a/mail-infra/services/silver-config/thunder/console-config.js b/mail-infra/services/opengovmail-config/thunder/console-config.js similarity index 100% rename from mail-infra/services/silver-config/thunder/console-config.js rename to mail-infra/services/opengovmail-config/thunder/console-config.js diff --git a/mail-infra/services/silver-config/thunder/deployment.yaml b/mail-infra/services/opengovmail-config/thunder/deployment.yaml similarity index 100% rename from mail-infra/services/silver-config/thunder/deployment.yaml rename to mail-infra/services/opengovmail-config/thunder/deployment.yaml diff --git a/mail-infra/services/silver-config/thunder/gate-config.js b/mail-infra/services/opengovmail-config/thunder/gate-config.js similarity index 100% rename from mail-infra/services/silver-config/thunder/gate-config.js rename to mail-infra/services/opengovmail-config/thunder/gate-config.js