sender
Sender-address policy: turn the on-behalf-of user’s email into an
outbound From, and (optionally) restrict which addresses may send.
The default From re-homes the local part (everything before @) of
the OBO email on the configured sending domain, so alice@databricks.com
through a domain of mail.example.com goes out as
alice@mail.example.com. Nothing has to be configured for that beyond the
domain: a fixed from is an OVERRIDE, not a requirement. The file/outbox
fallback (no domain) keeps the user’s address verbatim so test artifacts land
under a recognizable folder.
A send with NO user in scope is SYSTEM mail - a sign-in code, a password reset, an alert - and goes from the do-not-reply address instead (resolveSystemSenderAddress), because a recipient cannot usefully reply to a machine and a human’s address on machine mail invites them to try.
The resolved From is then constrained to the effective allow-list: a
pattern is either an exact address (user@domain.com), a domain wildcard
(*@domain.com or the bare domain.com, matching any local part on that
domain), or * (any). This module only matches patterns; which patterns
apply is decided by the configured sender policy in ./config, which
under the default "allowlist" mode fills an empty list in from the
sender source. listSenderOptions expands the effective list into
the concrete addresses a UI dropdown can offer for the current user.