# `Letterbox.Config`
[🔗](https://github.com/hattoriai/letterbox/blob/v0.1.0-rc.0/lib/letterbox/config.ex#L1)

Letterbox's configuration, in the app's:

    config :letterbox,
      repo: MyApp.Repo,
      routing: MyApp.Mailboxes,
      ingresses: [
        resend: [secret: "whsec_…", api_key: "re_…"],
        relay: [token: "a long random token"]
      ]

  * `:repo` - the app's `Ecto.Repo`, where `letterbox_inbound` is
    (`Letterbox.Migrations`). Required.
  * `:routing` - the app's routes (`Letterbox.Routing`): which mailbox
    takes which message. Required.
  * `:ingresses` - how messages reach the app, each by its name in the
    webhook's route (`Letterbox.Plug`): `Letterbox.Ingress.Resend`,
    `Letterbox.Ingress.Relay`, or `{module, opts}` of the app's own
    (`Letterbox.Ingress`).
  * `:trusted_servers` - the `authserv-id`s whose `Authentication-Results`
    verify senders (`Letterbox.Email.parse/2`). None by default.
  * `:adapter` - the Storehouse store of the raw emails. The default is
    Storehouse's own (`Storehouse.adapter/0`).
  * `:prefix` - the start of the raw emails' keys in the store
    (`"letterbox"`): `letterbox/2026/10/<id>.eml`.
  * `:max_bytes` - the largest email kept, in bytes (50 MB). A larger one
    is bounced, not kept.
  * `:max_attempts` - how many times a mailbox is tried before its
    message is `"failed"` (5).
  * `:runner` - what runs the work out of the request (`Letterbox.Runner`):
    Oban when the app runs it, else a process of Letterbox's.
  * `:db_prefix` - the database schema of the table, in PostgreSQL.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
