Configuration reference

A production release is configured through environment variables, read at start by config/runtime.exs. This page lists every variable it reads, then the settings that exist only in the configuration files, and finally the settings that are per mail server (in the database).

A required variable that is missing stops the release at start with an error that names it.

Core

VariableDefaultMeaning
DATABASE_URLrequiredPostgres URL, ecto://USER:PASS@HOST/DATABASE.
POOL_SIZE10Database connections per node.
ECTO_IPV6offtrue or 1 connects to Postgres over IPv6.
KARTA_DATABASE_POOLERunsetpgbouncer for pgbouncer in transaction mode: prepared statements become unnamed and Oban's notifier becomes Oban.Notifiers.PG (the nodes must be clustered).
SECRET_KEY_BASErequiredSigns and encrypts cookies. At least 64 bytes; mix phx.gen.secret.
KARTA_VAULT_KEYrequiredThe active vault key: base64 of exactly 32 bytes (openssl rand -base64 32). Encrypts secrets at rest and derives the keys of stored messages, tracking tokens, VERP tags and paging tokens.
KARTA_VAULT_KEY_IDv1The label stored with every value encrypted under the active key. Change it together with the key when you rotate.
KARTA_VAULT_RETIRED_KEYSunsetOld vault keys that still decrypt and verify: id:base64 pairs separated by commas. See key rotation.
PHX_HOSTexample.comPublic host name of the API and the admin pages, used in URLs Karta writes (scheme https, port 443) and in the identity provider's redirect URI.
KARTA_TRUSTED_PROXIESunsetComma-separated CIDR ranges of the reverse proxies in front of the HTTP endpoints. X-Forwarded-For and X-Forwarded-Proto are believed only from them. See Installation.
PORT4000Port of the main HTTP endpoint (APIs, /livez, /readyz, /health).
PHX_SERVERunsetWhen set, the HTTP endpoints serve requests. bin/server (the image's command) sets it.
KARTA_CLUSTERfalsetrue lets replicas find each other through the database and form an Erlang cluster (faster live updates, a shared share of the per-destination throttle). Nothing needs it for correctness. See Running several replicas.
KARTA_CLUSTER_DATABASE_URLthe main DATABASE_URLThe direct Postgres connection discovery listens on (LISTEN does not pass a transaction pooler). Required when KARTA_DATABASE_POOLER is set; without it clustering stays off.
KARTA_NODE_HOST, KARTA_DIST_PORTthe pod's address (hostname -i), 9100The address the other replicas reach this one on, and the fixed Erlang distribution port. Open it, and 4369, between the replicas only.
RELEASE_COOKIEunsetThe secret the replicas of a cluster share. Required with KARTA_CLUSTER: bin/server refuses to start a clustering replica without it.
RELEASE_DISTRIBUTION, RELEASE_NODEset by the release when KARTA_CLUSTER=trueOverride only to name nodes yourself.
KARTA_LOG_FORMATtextjson writes each log line as one JSON object (time, level, message, request_id) for a log collector.

Metrics and errors

VariableDefaultMeaning
METRICS_PORT9568Port of the Prometheus listener (GET /metrics only). Keep it internal.
SENTRY_DSNunsetA Sentry-protocol DSN (Sentry, Bugsink, GlitchTip, ...). Without it nothing is sent. Errors and error-level log messages are reported, with the environment name prod.

Message storage

Without KARTA_S3_BUCKET no blob store is configured and no message can be stored: SMTP clients get 451 4.3.0 and the APIs a temporary failure.

VariableDefaultMeaning
KARTA_S3_BUCKETunsetThe bucket for message bodies. Setting it requires the next three.
KARTA_S3_ENDPOINTrequired with a bucketThe S3 endpoint, e.g. https://s3.example.com. Path-style URLs (<endpoint>/<bucket>/<key>) are used.
KARTA_S3_ACCESS_KEY_IDrequired with a bucketAccess key.
KARTA_S3_SECRET_ACCESS_KEYrequired with a bucketSecret key.
KARTA_S3_REGIONus-east-1Region for request signing (Garage uses its configured s3_region).

Outbound delivery

VariableDefaultMeaning
KARTA_OUTBOUND_HOSTNAMEKARTA_SMTP_HOSTNAME, else the system host nameKarta's name in EHLO, in Message-IDs it makes, in its Received: fields of API messages and in delivery status notifications. Use the PTR name of the sending address.
KARTA_RETURN_PATH_DOMAINunsetTurns on VERP return paths in this domain: every delivery gets the envelope sender b<id><tag>@<domain>. Its MX must lead back to Karta, which reads the bounces that arrive there. See Delivery.
KARTA_BOUNCE_MAX_AGE_DAYS30How long a VERP return path is believed: an older one is refused with 550 5.2.1, so a stale bounce changes nothing. Any value other than a whole number from 1 to 3650 stops the release at start.
KARTA_OUTBOUND_PORTunset (port 25)For tests only. The port every delivery connects to instead of 25, so that a release can deliver to a test destination: set it with KARTA_NET_GUARD_ALLOWED_NETWORKS naming the destination's private or loopback address, which Karta otherwise never connects to. Real mail servers listen on 25: with this set nothing reaches them. Karta logs a warning at start when it is set. Not a port number from 1 to 65535 stops the release at start.
KARTA_OUTBOUND_IP_FAMILYprefer_ipv4prefer_ipv4, prefer_ipv6, ipv4_only or ipv6_only. Any other value stops the release at start.
KARTA_OUTBOUND_CONCURRENCY10Delivery jobs run at once per node: in the Oban queue outbound, and in each IP pool's queue the node runs (unless the pool has its own concurrency).
KARTA_OUTBOUND_DESTINATION_LIMITSunset (no limits)Connections at once and recipients per minute by MX host, e.g. *.mx.example.com connections=5 per_minute=300, * connections=20. See Delivery. Text it cannot read stops the release at start.

Batches

VariableDefaultMeaning
KARTA_BATCH_MAX_MESSAGES100The most messages one batch request may make, in every API: recipients of a Karta API batch or of Mailgun's recipient-variables, SendGrid's personalizations, the messages of Postmark's /email/batch. A whole number from 1 to 1000; any other value stops the release at start. A request over it is refused, in the API's own form, before any message is made.

Memory. A batch request builds all its messages before it stores any (so that they are accepted all or none), and they are in memory together until then. One request therefore takes about N × the size of one built message, plus its body: a built message is its text, HTML and attachments, with about a third more for the base64 encoding of attachments and the MIME structure. Measured on one node, a Mailgun batch of a 400 KiB attachment and 20 KB of text per message (about 570 KB built) took about 12 MB at N = 10, 35 MB at N = 50 and 69 MB at N = 100: about 0.7 MB, or 1.6 times the content, per message. Independently of N, the messages of one request may have at most 50 MiB of content together (counted as they are made: the subject, text, HTML, attachments and inline parts of every message), so one batch request stays below about 100 MB. To size the limit, multiply what one request may take by the requests a node may serve at once: with the default of 100, a request of 100 messages of 100 KB each takes about 16 MB; with 1000 messages of the same size it would reach the 50 MiB cap at about 520 messages and be refused.

Outbound connections and webhooks

VariableDefaultMeaning
KARTA_NET_GUARD_ALLOWED_NETWORKSunset (none)CIDR ranges, comma-separated (e.g. 10.1.0.0/16,fd00:1::/48), that Karta may connect to although Karta.NetGuard refuses them: delivery to recipients' mail servers, webhook requests, MTA-STS fetches and checks. For receivers or mail servers on the instance's own network; nothing else should need it. An invalid range stops the release at start.
KARTA_WEBHOOKS_ALLOW_HTTPfalsetrue lets webhooks use http:// URLs; otherwise only https://.
KARTA_WEBHOOKS_CONCURRENCY10Webhook requests sent at once per node (the Oban queue webhooks). At most four go to one webhook at a time, across all nodes.

Webhooks need outbound HTTPS (or HTTP) to the URLs their owners set.

Receiving mail

VariableDefaultMeaning
KARTA_REPORTS_FROMunsetThe address DMARC and TLS reports are sent from. It must be at a verified domain of the organisation of KARTA_REPORTS_SERVER; the reports are signed with that domain's DKIM keys. With this and KARTA_REPORTS_SERVER unset, no report is sent. See Reports.
KARTA_REPORTS_SERVERunsetThe id of the mail server that sends the reports (its page shows the id).
KARTA_REPORTS_DMARCtruefalse stops sending DMARC aggregate reports.
KARTA_REPORTS_TLS_RPTtruefalse stops sending TLS reports.
KARTA_REPORTS_DMARC_EXCLUDEnoneDomains, separated by commas, that no DMARC report is sent about; their subdomains are excluded too.
KARTA_REPORTS_MAX_PER_DESTINATION100The most reports one address receives in 24 hours; more are not sent.
KARTA_SRS_DOMAINKARTA_RETURN_PATH_DOMAINThe domain of the SRS addresses that forwarded mail is sent from. Its MX records must lead to Karta and its SPF record must name Karta's sending addresses. Without either, forwards fail. See Receiving mail.
KARTA_INBOUND_ALLOW_HTTPfalsetrue lets HTTP endpoints use http:// URLs; otherwise only https://.
KARTA_ARC_TRUSTED_SEALERSnoneDomains, separated by commas, whose ARC seals Karta trusts: mail failing DMARC is not refused when its ARC chain passes, the newest set is sealed by one of them and its results say DMARC passed for the author's domain. Name only forwarders and lists you trust. See Checking the sender.
KARTA_AUTHSERV_IDKARTA_SMTP_HOSTNAMEThe authserv-id of the Authentication-Results: field on received mail: the name applications trust those fields by. Use the same one on every node; arriving fields that claim it are removed. See Checking the sender.
KARTA_INBOUND_CONCURRENCY10Deliveries of received mail to endpoints at once per node (the Oban queue inbound). A delivery to an HTTP endpoint holds the message and its encoding (base64 in JSON or form data) in memory, about 3 to 4 times the message, which may be 25 MiB: size a node for about 1 GB at peak with the default of 10, or lower it.
KARTA_RSPAMD_URLnoneThe HTTP API of rspamd, for example http://127.0.0.1:11333: it turns spam scanning of received mail on. Only this address is contacted (it is the operator's, not user input). See Spam and virus scanning.
KARTA_RSPAMD_PASSWORDnoneSent as the Password header of the scan request; printable ASCII. Karta only calls the scanning worker (/checkv2, port 11333), which needs no password: leave it unset unless rspamd is configured to ask for one there. It is not the web interface's (controller's) password.
KARTA_CLAMAV_HOST, KARTA_CLAMAV_PORT, KARTA_CLAMAV_SOCKETnone, 3310, noneclamd's address: a host name or address and a port, or a Unix socket (not both). Setting either turns virus scanning of received mail on. The message is streamed to it, never held in memory.
KARTA_SCAN_TIMEOUT5000The budget of one message's scan, in milliseconds (500 to 30000). A scanner that has not answered when it ends is stopped and counts as failed. rspamd's blocklist and SPF lookups can take several seconds when a name does not answer: 10000 to 15000 is a safer value than the default for production.
KARTA_SCAN_MAX_SIZE26214400A message larger than this many bytes is not scanned. The default is the largest message the listeners take, so no accepted message is skipped for its size.

Recipient domains' MTA-STS policies are read and followed with no setting (Delivery); outbound HTTPS to the policy hosts (port 443) must be allowed. config :karta, Karta.Outbound, mta_sts: false in a configuration file turns it off. DANE needs no setting either: it relies on the resolver's DNSSEC validation (DNS resolver); without a trusted validating resolver TLSA records are never used.

DNS

VariableDefaultMeaning
KARTA_DNS_SERVER127.0.0.1IP address of the validating resolver. Must be an IP address.
KARTA_DNS_PORT53Its port.
KARTA_DNS_TRUST_ADunsettrue believes the resolver's DNSSEC AD bit although it is not on a loopback address. Only for a private path to the resolver. See DNS resolver.

Public Suffix List

VariableDefaultMeaning
KARTA_PUBLIC_SUFFIX_URLhttps://publicsuffix.org/list/public_suffix_list.datWhere Karta fetches the Public Suffix List every night (04:29 UTC), for the organisational domain of the DMARC health check of sending domains, and so that no public suffix counts as an organisational domain when received mail is checked. An https URL, or off to keep the list Karta was built with; anything else stops the release at start.

The list is fetched with the tag of the copy Karta has (an unchanged list is not downloaded again), never through a redirect, at most 4 MB, and used only when it looks like the list (both sections, at least 5,000 rules, rules every copy has had for years). It is kept in the database; every node loads it at start and every hour. A failure is logged and kept with the list (public_suffix_lists); the copy before it stays in use. Point the URL at a mirror of your own when Karta's nodes may not reach the internet.

SMTP listeners

Nothing in this table applies unless KARTA_SMTP_ENABLED=true, except the two minimum prefix lengths: credentials are checked against them whether or not a listener runs.

VariableDefaultMeaning
KARTA_SMTP_ENABLEDunsettrue starts the SMTP listeners.
KARTA_SMTP_HOSTNAMErequired when enabledThe name in the greeting, in EHLO replies and in Received: fields. Must match the certificate.
KARTA_SPOOL_DIRrequired when enabledDirectory for message data being received. Disk-backed, writable, private to Karta.
KARTA_SMTP_CERTFILEunsetPEM certificate (chain) for the listeners. Without it only the mx listener runs, without TLS. With it the mx listener offers STARTTLS, and the submission listeners run unless KARTA_SMTP_LISTENERS leaves them out.
KARTA_SMTP_DSNtruefalse stops the submission listeners offering DSN (SMTP listeners).
KARTA_DKIM_ROTATE_AFTER_DAYSunsetRotates an active DKIM key that has signed this many days (30 to 3650), in the domains whose zone Karta publishes. Unset: Karta rotates no key by itself. See Rotating keys.
KARTA_SMTP_LISTENERSall three with a certificate, mx withoutWhich listeners run: a comma-separated list of mx, submission, submissions. mx alone with a certificate receives mail with STARTTLS and opens no submission port.
KARTA_SMTP_KEYFILErequired with a certificatePEM private key (RSA or EC) of the certificate.
KARTA_SMTP_MX_PORT25Port of the mx listener.
KARTA_SMTP_SUBMISSION_PORT587Port of the submission listener (STARTTLS); only with a certificate.
KARTA_SMTP_SUBMISSIONS_PORT465Port of the implicit-TLS submission listener; only with a certificate.
KARTA_SMTP_REQUIRETLStruefalse stops the submission listeners offering REQUIRETLS (RFC 8689). The mx listener never offers it.
KARTA_SMTP_TRUSTED_PROXIESunsetComma-separated CIDR ranges. When set, every listener requires a PROXY protocol v2 header, and accepts connections only from these ranges.
KARTA_SMTP_SUBMISSION_TRUSTED_PROXIESthe value of KARTA_SMTP_TRUSTED_PROXIESThe same for the submission listeners (587, 465) alone. Set it to an empty value when a balancer fronts the mx listener only and the applications of the same host connect to the submission port directly: those listeners then take plain connections from anywhere they are published to.
KARTA_SMTP_IP_MIN_PREFIX_V416The narrowest prefix an IPv4 range credential may have; a wider range (/15 and up) is refused at creation. 0.0.0.0/0 is never accepted.
KARTA_SMTP_IP_MIN_PREFIX_V648The same for IPv6; ::/0 is never accepted.
KARTA_SMTP_MX_IP_RELAYfalsetrue lets the mx listener accept relayed mail from an IP range credential; without it port 25 takes no relayed mail.

Certificate files are read again every 60 seconds; a changed, valid pair is used for new handshakes without a restart. See SMTP listeners.

Sign-in

VariableDefaultMeaning
KARTA_OIDC_ISSUERunsetThe OpenID Connect provider's issuer URL; turns sign-in through it on.
KARTA_OIDC_CLIENT_ID, KARTA_OIDC_CLIENT_SECRETrequired with the issuerKarta's client at the provider.
KARTA_OIDC_NAMEsingle sign-onThe name on the sign-in button.
KARTA_OIDC_ADMIN_GROUPSunsetGroups whose members are instance administrators, comma-separated.
KARTA_OIDC_GROUP_ROLESunsetgroup:organisation-slug:role entries, comma-separated. A malformed entry stops the release at start.
KARTA_OIDC_GROUPS_CLAIMgroupsThe claim with the user's groups.
KARTA_OIDC_AUTO_CREATEtruefalse lets only users Karta already knows sign in.
KARTA_OIDC_LINK_BY_EMAILfalsetrue links a Karta user who has never signed in through the provider to the provider's account with the same verified address. Off, an operator links them with Karta.Release.link_oidc/2.
KARTA_OIDC_CACERTFILEunsetA CA bundle for the provider's certificate.
KARTA_LOCAL_LOGINofftrue turns on local login (password and TOTP).

See Sign-in and access.

Tracking host

VariableDefaultMeaning
KARTA_TRACKING_URLunsetPublic URL of the tracking host, https://host or https://host:port, without a path. Any other form stops the release at start. Without it nothing is tracked and no List-Unsubscribe is added.
KARTA_TRACKING_PORT4001Port of the tracking endpoint, to which the reverse proxy sends the tracking host name.
KARTA_TRACKING_CNAMEthe host of KARTA_TRACKING_URLThe name that sending domains' tracking hosts and MTA-STS policy hosts point their CNAME records to (Tracking hosts of sending domains, Hosting an MTA-STS policy). A host name; anything else stops the release at start.
KARTA_TRACKING_TRAEFIK_DIRunsetA directory that Traefik's file provider watches: Karta writes a router there for each verified tracking host and each MTA-STS policy host in use (Certificates for tracking hosts).
KARTA_TRACKING_TRAEFIK_SERVICErequired with the directoryThe Traefik service that reaches the tracking endpoint, such as karta-tracking@docker.
KARTA_TRACKING_TRAEFIK_CERT_RESOLVERunsetThe routers' certificate resolver, such as letsencrypt. Without it they use the certificates Traefik already has.
KARTA_TRACKING_TRAEFIK_ENTRYPOINTSallThe routers' entry points, comma-separated, such as websecure.

The Traefik names (service, resolver, entry points) are letters, digits and @ . _ -; anything else stops the release at start.

Publishing DNS records

Karta can write its own records of verified sending domains (the ownership record, the DKIM keys' records, the tracking host's CNAME record, the records of the MTA-STS policy, the TLS reports' address and the BIMI logo set in Karta) through a DNS provider (Publishing records through a DNS provider). KARTA_DNS_PROVIDER picks it: PowerDNS (the default) or RFC 2136, or a module from a package compiled into the image (Writing a DNS provider). Off unless the selected provider's settings are set. A provider from a package reads its own variables; add the package at build time with KARTA_EXTRA_DEPS, below.

PowerDNS

VariableDefaultMeaning
KARTA_POWERDNS_URLunsetThe API's base URL, such as http://127.0.0.1:8081 (the server's webserver-address and webserver-port). An http or https URL; anything else stops the release at start.
KARTA_POWERDNS_API_KEYrequired with the URLThe server's api-key.
KARTA_POWERDNS_SERVER_IDlocalhostThe server id in the API's paths.
KARTA_POWERDNS_ZONESnoneThe zones Karta may write to, separated by commas, such as example.com,example.org. Karta writes in no other zone, and only for verified domains in these zones or under them.

The URL and the key are the operator's: no organisation can point Karta at another server. Give Karta a key of its own where the server allows it, keep the API off the public internet, and list only the zones whose domains' records Karta should keep. A zone needs SOA-EDIT-API set (DEFAULT for zones created through the API) when it has secondaries.

RFC 2136 dynamic update

Any authoritative server that accepts RFC 2136 updates signed with TSIG (BIND, Knot, PowerDNS and others) works the same way. The server must allow updates from Karta with this key in these zones; the key's name, secret and algorithm must match its configuration.

VariableDefaultMeaning
KARTA_DNS_RFC2136_SERVERrequiredThe server's host name or address.
KARTA_DNS_RFC2136_PORT53Its port.
KARTA_DNS_RFC2136_ZONESrequiredThe zones Karta may write to, separated by commas. The server cannot list its zones, so this list is also what list_zones returns.
KARTA_DNS_RFC2136_TSIG_KEY_NAMErequiredThe TSIG key's name.
KARTA_DNS_RFC2136_TSIG_SECRETrequiredThe key's secret, base64 (as named.conf writes it).
KARTA_DNS_RFC2136_TSIG_ALGORITHMhmac-sha256hmac-sha256 or hmac-sha512.
KARTA_DNS_RFC2136_TIMEOUT10000Milliseconds per exchange, 1000 to 60000.

Every message is signed and every answer's signature is checked. A UDP answer with the truncation bit is asked for again over TCP. The provider keeps Karta's records in an inventory TXT record at _karta-records.<zone>, so keep that name free; the server raises the zone's serial and notifies its secondaries itself.

Build-time extra dependencies

VariableDefaultMeaning
KARTA_EXTRA_DEPSconfig/extra_deps.exsA file that returns the dependencies mix.exs adds to the build, such as a provider's Hex package. Read at build time; its code is part of the image.

See Writing a DNS provider.

Development and test only

These are read only in the dev or test environments; a release ignores them.

VariableEnvironmentMeaning
KARTA_DEV_SMTPdev1 starts SMTP listeners on 127.0.0.1 ports 2525, 2587 and 2465 with the certificates from mix karta.gen.dev_ca.
DATABASE_HOST, DATABASE_PORTtestTest database host (default localhost) and port (default 55433).
MIX_TEST_PARTITIONtestAppended to the test database name (karta_test<partition>).
KARTA_TEST_*testOpt-in test suites; see Development.
KARTA_SCAN_IPtestAddress the TLS scan server (dev/tls_scan_server.exs) binds.

Settings in the configuration files

These settings have no environment variable. Change them in config/config.exs or config/runtime.exs (which means building your own image). Defaults are those of the code.

Outbound (config :karta, Karta.Outbound)

KeyDefaultMeaning
:tls:opportunisticTLS for every delivery: :opportunistic or :verified.
:tls_policies%{}Per recipient domain, e.g. %{"bank.example" => :verified, "partner.example" => :dane} (:dane requires DANE).
:cacertsthe operating system'sTrusted roots for verified TLS.
:port25Port delivered to.
:timeoutssee DeliverySMTP client timeouts, a map by stage.
:blocked_networksthe NetGuard's (Karta.NetGuard.default_blocked_networks/0)Karta.CIDR ranges never connected to, instead of the NetGuard's.
:max_hosts10MX hosts looked up per domain.
:max_targets5Addresses tried per delivery run.
:max_age432000 (5 days)Retry period in seconds.
:destination_limitsKARTA_OUTBOUND_DESTINATION_LIMITSLimits per destination, as Karta.Outbound.Throttle.parse!/1 reads them.
:signingKarta.Domains.KeySourceDKIM key source.

IP pools (config :karta, Karta.IPPools.Monitor)

KeyDefaultMeaning
:interval5000Milliseconds between checks of which pool addresses the node holds; nil starts no monitor (and no pool's queue runs on the node).
:limitKARTA_OUTBOUND_CONCURRENCYDelivery jobs at a time in the queue of each pool without its own concurrency.

SMTP (config :karta, Karta.SMTP)

:listeners (a list of listener options, see below), :certificates (a list of %{certfile: path, keyfile: path}; one RSA and one ECDSA pair is a good choice), :spool_dir and :certificate_reload_interval (milliseconds, default 60000). The environment variables above build one certificate pair and up to three listeners; more pairs need this setting.

Each listener (Karta.SMTP.Listener) takes:

OptionDefaultMeaning
name, kind, port, hostnamerequiredkind is :mx, :submission or :submissions.
ip:: (all, dual stack)Address to bind.
tls:starttls (:implicit for submissions):none is allowed only for mx.
max_connections1024Connections for the listener as a whole, shared out among its acceptors (at most this many; 1020 with the defaults).
num_acceptors10Acceptor processes.
max_per_ip10Simultaneous connections per client (an IPv4 address or an IPv6 /64).
rate, rate_window60, 60000 msNew connections per client per window.
exempt[]CIDR ranges counted but never limited.
stress_threshold3/4 of max_connectionsFrom this many connections, idle timeouts drop to stress_timeout.
command_timeout300000 msWaiting for a command.
data_timeout300000 msWaiting for more DATA or BDAT bytes.
stress_timeout10000 msBoth of the above under stress.
handshake_timeout30000 msTLS handshake.
proxy_timeout10000 msReading the PROXY header.
send_timeout30000 msA write that does not complete closes the connection.
max_session_time3600000 msHard limit per connection.
proxy_protocol, trusted_proxiesfalse, []PROXY protocol v2 from these ranges only.
read_buffer65536 bytesOne socket read.
max_heap_size2000000 wordsA connection process above this is killed.
limitssee below%Karta.SMTP.Limits{}.
dsnfalseAdvertise DSN. Leave off: see SMTP listeners.
requiretlsfalseAdvertise REQUIRETLS after STARTTLS. On for the submission listeners only: see SMTP listeners.

Karta.SMTP.Limits: max_line_length 2048, max_message_size 26214400 (25 MiB), max_recipients 100, max_errors 10, max_rejections 20, max_auth_failures 3.

Other

SettingDefaultMeaning
config :karta, :vault_retired_keys%{}%{"key id" => "base64 key"}: old vault keys that still decrypt and verify (KARTA_VAULT_RETIRED_KEYS). See key rotation.
config :karta, Karta.Accounts, session_hours:12How long a signed-in session lasts.
config :karta, Karta.Tracking, events_per_minute:60Opens and clicks recorded per recipient per minute.
config :karta, Karta.Sending.Options, batch_limit:100KARTA_BATCH_MAX_MESSAGES: messages per batch request.
config :karta, KartaWeb.APIAuth, verifications_per_minute:60Argon2id key verifications per client (IPv4 address or IPv6 /64) per minute, counted across all nodes; :infinity turns the limit off.
config :karta, Karta.Messages.Retentioninterval: 3600000, first_run: 60000, pending_grace: 7200000, batch_size: 500, max_batches: 100Retention runs; interval: nil turns them off.
config :karta, Karta.DNSUnbound at 127.0.0.1:53, Karta.DNS.CacheResolver options timeout (2000 ms), attempts (2), udp_size (1232).
config :karta, Obanqueues outbound: 10, webhooks: 10 and inbound: 10, prune after 7 days, rescue after 60 minutes, sweep every 15 minutesThe job queue.
config :karta, Karta.Webhooksallow_http: false, retention_days: 30KARTA_WEBHOOKS_ALLOW_HTTP; days webhook events, their deliveries and requests are kept.
config :karta, Karta.Webhooks.Sendertimeout: 15000, concurrency: 4, disable_after: 432000A webhook request's time limit (ms), requests at once per webhook, and the seconds of failure after which a webhook is switched off.
config :karta, Karta.NetGuard, allowed_networks:[]KARTA_NET_GUARD_ALLOWED_NETWORKS, as a list of strings.
config :karta, Karta.Inboundallow_http: false, srs_domain: nilKARTA_INBOUND_ALLOW_HTTP, KARTA_SRS_DOMAIN.
config :karta, Karta.Scantimeout: 5000, max_size: 26214400, rspamd: [], clamav: []KARTA_SCAN_TIMEOUT, KARTA_SCAN_MAX_SIZE, KARTA_RSPAMD_URL, KARTA_RSPAMD_PASSWORD, KARTA_CLAMAV_HOST, KARTA_CLAMAV_PORT, KARTA_CLAMAV_SOCKET; checked at boot.
config :karta, Karta.Bounces, max_age_days:30KARTA_BOUNCE_MAX_AGE_DAYS: how long a VERP return path is believed.
config :karta, Karta.Inbound.Dispatchertimeout: 30000, max_size: 26214400An HTTP endpoint's time limit (ms), and the largest message sent to one (bytes).

Per-server settings

Each mail server has settings of its own, changed on its page in the admin interface or with Karta.Servers.update_server/2 (see Managing organisations, servers and keys):

FieldDefaultMeaning
namerequiredDisplay name, at most 100 characters; the slug is made from it.
retention_days30Messages older than this are removed (1 to 365).
retention_size_mb2048The server's oldest messages beyond this many MiB of stored bodies are removed.
send_limit_per_minuteunsetDelivery attempts per minute for the whole server.
track_opens, track_clicks, list_unsubscribefalseSee Tracking and unsubscribe.
modeliveAlways live; not changed by input (development mode, which holds mail, is not built).