Karta. BIMI
(Karta v1.0.0)
BIMI logos of sending domains (Karta.BIMI.Logo): mailbox providers that
support BIMI show the logo next to the domain's mail when the domain
publishes a BIMI record (default._bimi.<domain>) and its DMARC policy
is quarantine or reject.
Uploading (upload/2): owners and admins of a verified domain upload
an SVG; it is stored only when it meets SVG Tiny PS (Karta.BIMI.SVG).
A new upload replaces the old logo.
Serving. Karta serves the logo on its tracking host
(KARTA_TRACKING_URL) at /bimi/<sha256>.svg (url/1, served/1) as
image/svg+xml, while its domain is verified. The name changes with the
logo, so a mailbox provider never shows an old logo from a cache under
the new record. Without a tracking URL there is no URL to publish.
The record (record/2): v=BIMI1; l=<url>; a=<certificate>;. The
mark certificate (VMC or CMC), which some providers require, is the
domain's own: Karta publishes its URL as given and does not check it.
Uploading, changing and removing a logo is announced on its domain's
topic (:bimi, Karta.Changes).
Summary
Functions
The domain's logo, or nil.
The BIMI record the domain publishes for its logo, %{type, name, value}, or nil without a URL to publish.
Removes the domain's logo.
The SVG served as file (<sha256>.svg), or nil when no logo of a
verified domain has that digest.
Sets or clears the URL of the domain's mark certificate (a=).
Stores svg as the domain's logo once it meets the profile:
{:error, {:invalid, problems}} otherwise (Karta.BIMI.SVG.check/1).
Only for a verified domain. The certificate URL stays.
The https URL Karta serves the logo at, or nil without a tracking URL.
Functions
@spec get(Karta.Domains.Domain.t()) :: Karta.BIMI.Logo.t() | nil
The domain's logo, or nil.
@spec record(Karta.Domains.Domain.t(), Karta.BIMI.Logo.t()) :: %{type: String.t(), name: String.t(), value: String.t()} | nil
The BIMI record the domain publishes for its logo, %{type, name, value}, or nil without a URL to publish.
@spec remove(Karta.BIMI.Logo.t()) :: {:ok, Karta.BIMI.Logo.t()} | {:error, Ecto.Changeset.t()}
Removes the domain's logo.
The SVG served as file (<sha256>.svg), or nil when no logo of a
verified domain has that digest.
@spec set_authority(Karta.BIMI.Logo.t(), map()) :: {:ok, Karta.BIMI.Logo.t()} | {:error, Ecto.Changeset.t()}
Sets or clears the URL of the domain's mark certificate (a=).
@spec upload(Karta.Domains.Domain.t(), binary()) :: {:ok, Karta.BIMI.Logo.t()} | {:error, :domain_not_verified | {:invalid, [String.t()]}}
Stores svg as the domain's logo once it meets the profile:
{:error, {:invalid, problems}} otherwise (Karta.BIMI.SVG.check/1).
Only for a verified domain. The certificate URL stays.
@spec url(Karta.BIMI.Logo.t()) :: String.t() | nil
The https URL Karta serves the logo at, or nil without a tracking URL.