From 680bfac014f226298507356324cc71ad9211929b Mon Sep 17 00:00:00 2001 From: Andy Dixon Date: Tue, 22 Sep 2026 08:50:20 +0100 Subject: [PATCH] Send as webhook.me.uk, add favicon, share image and SEO tags Mail now comes from no-reply@webhook.me.uk (DKIM, SPF and DMARC are set up for it) and the Message-ID uses that domain instead of the container hostname. The landing page gets a favicon, an Open Graph image, canonical/OG/Twitter/JSON-LD tags, robots.txt that keeps crawlers off email URLs, and a sitemap. Footer links to dixon.cx. --- .dockerignore | 1 + Dockerfile | 3 ++- PARSER_PROMPT.md | 2 +- README.md | 2 +- docs.html | 30 +++++++++++++++++++++++++++--- mail.go | 5 +++-- main.go | 29 ++++++++++++++++++++++++++--- static/apple-touch-icon.png | Bin 0 -> 6062 bytes static/favicon.ico | Bin 0 -> 15086 bytes static/favicon.svg | 7 +++++++ static/og.png | Bin 0 -> 61253 bytes 11 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 static/apple-touch-icon.png create mode 100644 static/favicon.ico create mode 100644 static/favicon.svg create mode 100644 static/og.png diff --git a/.dockerignore b/.dockerignore index e32a375..5955d6b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,4 @@ !go.mod !*.go !docs.html +!static diff --git a/Dockerfile b/Dockerfile index 220890a..1216595 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,12 @@ FROM golang:1.26-alpine AS build WORKDIR /src COPY go.mod ./ COPY *.go docs.html ./ +COPY static ./static RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /webhooks . FROM gcr.io/distroless/static-debian12:nonroot COPY --from=build /webhooks /webhooks -ENV LISTEN=:8080 SMTP_ADDR=172.17.0.1:25 MAIL_FROM=no-reply@dixon.cx PUBLIC_HOST=webhook.me.uk +ENV LISTEN=:8080 SMTP_ADDR=172.17.0.1:25 MAIL_FROM=no-reply@webhook.me.uk PUBLIC_HOST=webhook.me.uk EXPOSE 8080 HEALTHCHECK --interval=30s --timeout=3s --start-period=5s CMD ["/webhooks", "-check"] ENTRYPOINT ["/webhooks"] diff --git a/PARSER_PROMPT.md b/PARSER_PROMPT.md index 66d4dd3..e737726 100644 --- a/PARSER_PROMPT.md +++ b/PARSER_PROMPT.md @@ -354,7 +354,7 @@ Real deliveries over HTTP/2 arrive with lowercase header names. `headers.Get` ha |----------|---------|---------| | `LISTEN` | `127.0.0.1:8080` | Address to listen on (`:8080` in the container) | | `SMTP_ADDR` | `127.0.0.1:25` | SMTP relay (`172.17.0.1:25` in the container, the host's postfix) | -| `MAIL_FROM` | `no-reply@dixon.cx` | Envelope and From address | +| `MAIL_FROM` | `no-reply@webhook.me.uk` | Envelope and From address | | `PUBLIC_HOST` | `webhook.me.uk` | Host shown in email footers | --- diff --git a/README.md b/README.md index 91990b0..4044042 100644 --- a/README.md +++ b/README.md @@ -324,7 +324,7 @@ The image is a static binary on `distroless`, runs as non-root, listens on `:808 |----------|---------|---------| | `LISTEN` | `127.0.0.1:8080` | Address to listen on (`:8080` in the container) | | `SMTP_ADDR` | `127.0.0.1:25` | SMTP relay, no auth or TLS (`172.17.0.1:25` in the container) | -| `MAIL_FROM` | `no-reply@dixon.cx` | Envelope and From address | +| `MAIL_FROM` | `no-reply@webhook.me.uk` | Envelope and From address | | `PUBLIC_HOST` | `webhook.me.uk` | Host shown in email footers | `/healthz` returns `ok`, and `webhooks -check` exits non-zero if a running instance is unhealthy (used by the image's `HEALTHCHECK`). diff --git a/docs.html b/docs.html index 6055526..a75b60c 100644 --- a/docs.html +++ b/docs.html @@ -1,10 +1,34 @@ - + -Webhook → Email | {{.Host}} +Webhook → Email: forward any webhook to your inbox | {{.Canonical}} + + + + + + + + + + + + + + + + + + + + + +