skip to content

Your outbound DKIM signer sets x= one hour after t= and puts each sender's full address in i=; what do those tags assert, and what can go wrong?

level: seniorimportance: nice to knowfreq 12%

answer

  1. two timestamps, one identity
  2. absolute time, not a delta
  3. queued mail ages past expiry
  4. i= domain must sit under d=

basics

~20 s

DKIM's t= is the signing time, x= an absolute expiry above t=, and i= the user d= signs for, within d= or a subdomain. A one-hour x= can expire legitimate mail delayed in retry queues.

solid answer

~40 s

`t=` is the signing time and `x=` the expiry, both in seconds since the Unix epoch, UTC; RFC 6376 marks both RECOMMENDED and requires `x=` to be greater than `t=`. Verifiers MAY treat a signature as invalid once it has expired, judged against the time the message first reached their domain where they know it, so a one-hour window risks failing legitimate mail that sat in a retry queue or reached the verifier late. `i=` is the Agent or User Identifier: optional, defaulting to `@` plus the `d=` domain, and its domain MUST be `d=` or a subdomain of it, or the verifier ignores the signature. A full user address there is allowed but is not checked against `From`, and RFC 6376 warns that reliance on it should be strictly limited.

go deeper

for a junior

Recall that t= is when the signature was made, x= when it expires, and i= an optional identity that must sit within the d= domain.

for a middle

Explain the constraints: absolute times, x= greater than t=, i= equal to or under d=, and what a verifier does when the i= domain falls outside d=.

for a senior

Diagnose intermittent failures from too short an x= window on deferred mail, and explain why a per-user i= is not an author check.

for a principal

Decide whether the organisation's signers set x= and i= at all, weighing a short expiry and per-user identifiers against delivery delays and disclosure.

## The three tags at a glance | Tag | RFC 6376 status | Default when absent | Value | |---|---|---|---| | `t=` | RECOMMENDED | unknown creation time | Signing time, seconds since 1970-01-01 00:00:00 UTC | | `x=` | RECOMMENDED | no expiration | Absolute expiry time in the same format | | `i=` | OPTIONAL | empty local part, `@`, and the `d=` domain | The Agent or User Identifier (AUID) | All three sit inside the signed `DKIM-Signature` field, so none can be altered without breaking `b=`. ## t= and x=: what the signer is promising `t=` says when the signature was made. RFC 6376 allows values up to at least 10^12 seconds and lets verifiers ignore signatures with a timestamp in the future, so a signer with a badly wrong clock can lose verification. `x=` says when the signer stops standing behind the signature. The rules: - It is an **absolute** time, not a number of seconds after `t=`. - When both are present, `x=` **MUST be greater than** `t=`. - Verifiers **MAY** treat a signature as invalid after that time, returning PERMFAIL (signature expired); they are not required to. - The verification time should be when the message first arrived at the verifier's administrative domain, if that is reliably known, otherwise the current time. - Because clocks drift, RFC 6376 lets receivers add a fudge factor. RFC 6376 also notes that `x=` is not intended as an anti-replay defence; replay and what limits it are covered with DKIM verification. ## Why a one-hour window is risky Mail is not delivered instantly on every path. A message can sit in the sender's own queue while the receiving server defers it, and RFC 5321 says the give-up time for retries generally needs to be at least 4-5 days. A message can also be verified after it has been stored, or only when it reaches a later hop. With `x=` one hour after `t=`: 1. The receiving server defers the first attempt. 2. The sender retries after the window has closed. 3. A verifier that enforces `x=` treats the signature as expired, and the message arrives effectively unsigned. The failure is intermittent and correlates with delivery delays, which makes it hard to diagnose. A safer choice is an expiry that comfortably exceeds the longest retry period, or no `x=` at all; there is no RFC-mandated value, so the window is a local decision. ## i=: the identity the signer names The AUID says on whose behalf the signing domain is taking responsibility. RFC 6376 constrains it in a few ways: - The domain part **MUST be the same as, or a subdomain of**, `d=`. A verifier that finds otherwise MUST ignore the signature and should return PERMFAIL (domain mismatch). - The local part MAY be omitted, as in `[email protected]` or `[email protected]`. - It has the syntax of an address but need not be a mailbox, and its domain need not even resolve. - The RFC does not require it to match any header field, and calls reliance on it something that should be strictly limited. The key record can narrow this further: a `t=s` flag on it requires the `i=` domain to equal `d=` exactly. That flag is covered with DKIM key records. ## Filling i= with each user's address Putting `[email protected]` on Alice's mail is legal. What it does and does not buy: - It gives receivers a stable identifier finer than the domain, if the signer uses it consistently, which RFC 6376 says a signer SHOULD do for mail meant to be judged together. - It is **not** an author check: receivers are not told to compare it with `From`, and the domain-level identity that DMARC compares with `From` is `d=`. - It publishes an internal identifier in every message, which some organisations prefer not to do. Most signers leave `i=` out, or set it to `@` and the signing domain, and rely on `d=`. ## What to configure - Set `t=` from a synchronised clock. - Set `x=` well beyond your retry period, or omit it. - Leave `i=` absent or domain-only unless a receiver-side use for per-user identifiers has been agreed.

  • A DKIM signature has d=example.com and [email protected]. Is that valid?
    Yes, as long as the key record does not carry the `t=s` flag. RFC 6376 requires the `i=` domain to be the same as or a subdomain of `d=`, and `mail.example.com` is a subdomain. With `t=s` on the key record, the `i=` domain would have to equal `d=` exactly.
  • Must a verifier reject a signature whose x= has passed?
    No. RFC 6376 says verifiers MAY consider it invalid and return PERMFAIL (signature expired). It is a permission, not an obligation, and receivers may allow for clock drift. A signer therefore cannot rely on `x=` to make a signature stop working everywhere.

  • x= is a number of seconds counted from the t= timestamp.
  • i= must equal the address in the From header field.
  • t= and x= are required tags on every DKIM signature.
  • An i= domain outside d= is fine if the selector exists.
  • Every verifier must reject a signature once x= has passed.