mirror of
https://github.com/hanzoai/mail.git
synced 2026-09-23 23:53:02 +00:00
Fork of github.com/mjl-/mox at 5656ca6d1b
(upstream v0.0.15 plus 55 commits).
Rename the module path in go.mod and the import paths in 268 Go files. Also
update the five scripts that "go install" the module (genwebsite.sh,
docker-release.sh, apidiff.sh, test-upgrade.sh, Dockerfile.release), which
would otherwise build upstream rather than this fork.
Add NOTICE recording the upstream project, author, license, and fork point,
and stating which license covers which files: MIT for the mox source and our
changes, MPL-2.0 for publicsuffix/public_suffix_list.txt alone, and the
vendored dependencies' own licenses under licenses/. Embed NOTICE so
"mail licenses" prints the lineage from the running binary. LICENSE.MIT,
LICENSE.MPLv2.0 and the licenses/ tree are preserved verbatim; no code is
relicensed.
The mox command name, config keys, data directory layout and website content
are unchanged. LLM.md records the fork point, the rename, what was left alone,
and the steps to stand the server up.
Co-authored-by: Hanzo Dev <[email protected]>
34 lines
1.1 KiB
Docker
34 lines
1.1 KiB
Docker
FROM --platform=linux/amd64 docker.io/golang:1-alpine AS build
|
|
# note: cannot use $TARGETOS or $TARGETARCH because apparently the --platform in
|
|
# the FROM above overrides the actual target os/arch from the command-line.
|
|
ARG goos
|
|
ARG goarch
|
|
WORKDIR /
|
|
ARG moxversion
|
|
RUN CGO_ENABLED=0 GOOS=$goos GOARCH=$goarch go install -mod mod -trimpath github.com/hanzoai/mail@$moxversion
|
|
RUN test -f /go/bin/mox && cp /go/bin/mox /bin/mox || cp /go/bin/${goos}_${goarch}/mox /bin/mox
|
|
|
|
# Using latest may break at some point, but will hopefully be convenient most of the time.
|
|
FROM --platform=$TARGETPLATFORM docker.io/alpine:latest
|
|
WORKDIR /mox
|
|
COPY --from=build /bin/mox /bin/mox
|
|
|
|
# SMTP for incoming message delivery.
|
|
EXPOSE 25/tcp
|
|
# SMTP/submission with TLS.
|
|
EXPOSE 465/tcp
|
|
# SMTP/submission without initial TLS.
|
|
EXPOSE 587/tcp
|
|
# HTTP for internal account and admin pages.
|
|
EXPOSE 80/tcp
|
|
# HTTPS for ACME (Let's Encrypt), MTA-STS and autoconfig.
|
|
EXPOSE 443/tcp
|
|
# IMAP with TLS.
|
|
EXPOSE 993/tcp
|
|
# IMAP without initial TLS.
|
|
EXPOSE 143/tcp
|
|
# Prometheus metrics.
|
|
EXPOSE 8010/tcp
|
|
|
|
CMD ["/bin/mox", "serve"]
|