Karta. Inbound. Seal
(Karta v1.0.0)
The ARC seal on a forward (RFC 8617): Karta adds an ARC set to a message
it received when it forwards it (Karta.Inbound.Dispatcher), so that
the next receiver learns what Karta found when the message arrived (the
original sender's SPF, DKIM, DMARC and ARC results), although the
forward itself fails SPF and may fail DKIM.
A forward is sealed only when all of these hold:
- the message is one Karta received (
direction: :incoming) and checked for ARC: its stored results (auth_results) have an ARC result and the authserv-id they were recorded under. The set's results are the message's ownAuthentication-Results:field under that id (Karta.Auth.ARC.Sealer), itscv=the ARC result recorded then; mail that came in with such a field from elsewhere had it removed on arrival; - the domain of the address the message was received at is a verified
domain of the server's organisation with an active RSA key
(
Karta.Domains.signing_keys/2). The seal'sd=is that domain and itss=that key's selector: the domain's own DKIM key, kept encrypted in the database, rotated and published with it. A domain with only an Ed25519 key is not sealed for: few ARC verifiers know Ed25519.
Otherwise, or when the sealer refuses (a chain an earlier sealer marked failed, 50 sets already), the forward goes unsealed, and the reason is logged without message data.
Summary
Functions
raw (the forward, as it will be stored) with an ARC set in front, as
iodata ([set, raw]: the forward is not copied again), or raw
unchanged. address is the address the message was received at.
Options: :now (Unix seconds).
Functions
@spec seal(binary(), Karta.Messages.Message.t(), String.t(), keyword()) :: iodata()
raw (the forward, as it will be stored) with an ARC set in front, as
iodata ([set, raw]: the forward is not copied again), or raw
unchanged. address is the address the message was received at.
Options: :now (Unix seconds).