test / test (push) Waiting to run
The panel's signer is the only one. Gone: the opendkim package and its
configuration, the syslog-relay and opendkim programs, /dev/log and
/run/opendkim, the reload by USR1 through supervisord
(internal/supervisor/supervisor.go), internal/syslogrelay, the port of
OpenDKIM's From: parser (internal/milter/mailparse.go and its probe,
harness and test/upstream scripts), OPENDKIM_SOCKET and OPENDKIM_DIR.
Keys: internal/domain/keys.go (Keys, NewKeys, DKIM_DIR=/data/dkim) keeps
the keys and writes a selector table, /data/dkim/selectors ("<name>
<selector>"), which the signer reads in place of the KeyTable - it reads
no database, as the sender check reads none. The table is written before
the signer serves (EnsureServerSigned moved there from the notifier).
Keys and table 0600, directories 0700, the panel's. The entrypoint copies
/data/opendkim/keys once, as the panel user, into /data/dkim.new renamed
when whole, and stops the start if the copy fails; /data/opendkim is left
for a rollback to 2.7.x.
Sender check: one RFC 5322 address as a mail program reads it, held
against the bindings; the 256-byte refusal and the texts naming OpenDKIM
go. Allowed() folded the domain through strings.ToLower, which makes the
Kelvin sign a "k" - the comparison with OpenDKIM's reading had hidden it;
it folds ASCII only now.
Health: two dkim-signer rows (applications, notifications) in Milter
sockets, opendkim out of the liveness set; the card no longer takes any
row with a note for the spam filter. Texts as in the design commit.
KILL stays in deploy/docker-compose.yml: measured on the test server,
root without it cannot signal a process of another uid - supervisord
stopping the panel, Postfix's master its children. The plan's "only use
was the reload" was wrong; the comment now gives the real uses.
e2e: one signature, the panel's, verified by dkimpy; the /data/dkim modes;
the OpenDKIM log and process checks, testNeverSignedForAnother and the
cited opendkim, libopendkim11 and libmilter1.0.1 go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.7 KiB
Docker
33 lines
1.7 KiB
Docker
# SMTP sink-MX for the e2e stand (plan C.4): accepts any mail on 25 and dumps
|
|
# each transaction to its own file under /mail, so the test harness can read
|
|
# the raw received message (headers + body, including the DKIM-Signature
|
|
# the panel's signer added) straight off disk. smtp-sink ships in the postfix
|
|
# package itself. python3-dkim (dkimpy 1.1.8-2 in trixie, /usr/bin/dkimverify)
|
|
# is the independent DKIM verifier the suite holds the panel's signer to
|
|
# (docs/plans/panel-dkim-signing.md); it looks the keys up through the
|
|
# stand's CoreDNS (compose.override.yml, sink's dns).
|
|
FROM debian:trixie-slim
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN echo "postfix postfix/mailname string localhost" | debconf-set-selections \
|
|
&& echo "postfix postfix/main_mailer_type string Internet Site" | debconf-set-selections \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends postfix python3-dkim \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN mkdir -p /mail
|
|
WORKDIR /mail
|
|
|
|
# -d: one file per transaction (a pseudo-random suffix is appended
|
|
# automatically), so the harness just watches the directory for a new file
|
|
# instead of parsing a shared multi-message dump. Binding :25 needs root, and
|
|
# smtp-sink refuses to run as root without an explicit -u to switch to after
|
|
# binding — "-u root" satisfies that check while staying root throughout,
|
|
# which is fine here: throwaway container, isolated e2e network, never
|
|
# exposed. (Postfix 3.10.13, src/smtpstone/smtp-sink.c: -d "Dump each mail
|
|
# transaction to a single-message file" named by the template plus "a
|
|
# pseudo-random hexadecimal number"; main(): "-u option is required if running
|
|
# as root".)
|
|
ENTRYPOINT ["/usr/sbin/smtp-sink"]
|
|
CMD ["-u", "root", "-d", "/mail/%Y%m%d%H%M%S.", "0.0.0.0:25", "100"]
|