mox/webaccount/api.json
Mechiel Lukkien 8804d6b60e
implement tls client certificate authentication
the imap & smtp servers now allow logging in with tls client authentication and
the "external" sasl authentication mechanism. email clients like thunderbird,
fairemail, k9, macos mail implement it. this seems to be the most secure among
the authentication mechanism commonly implemented by clients. a useful property
is that an account can have a separate tls public key for each device/email
client.  with tls client cert auth, authentication is also bound to the tls
connection. a mitm cannot pass the credentials on to another tls connection,
similar to scram-*-plus. though part of scram-*-plus is that clients verify
that the server knows the client credentials.

for tls client auth with imap, we send a "preauth" untagged message by default.
that puts the connection in authenticated state. given the imap connection
state machine, further authentication commands are not allowed. some clients
don't recognize the preauth message, and try to authenticate anyway, which
fails. a tls public key has a config option to disable preauth, keeping new
connections in unauthenticated state, to work with such email clients.

for smtp (submission), we don't require an explicit auth command.

both for imap and smtp, we allow a client to authenticate with another
mechanism than "external". in that case, credentials are verified, and have to
be for the same account as the tls client auth, but the adress can be another
one than the login address configured with the tls public key.

only the public key is used to identify the account that is authenticating. we
ignore the rest of the certificate. expiration dates, names, constraints, etc
are not verified. no certificate authorities are involved.

users can upload their own (minimal) certificate. the account web interface
shows openssl commands you can run to generate a private key, minimal cert, and
a p12 file (the format that email clients seem to like...) containing both
private key and certificate.

the imapclient & smtpclient packages can now also use tls client auth. and so
does "mox sendmail", either with a pem file with private key and certificate,
or with just an ed25519 private key.

there are new subcommands "mox config tlspubkey ..." for
adding/removing/listing tls public keys from the cli, by the admin.
2024-12-06 10:08:17 +01:00

1717 lines
32 KiB
JSON

{
"Name": "Account",
"Docs": "Account exports web API functions for the account web interface. All its\nmethods are exported under api/. Function calls require valid HTTP\nAuthentication credentials of a user.",
"Functions": [
{
"Name": "LoginPrep",
"Docs": "LoginPrep returns a login token, and also sets it as cookie. Both must be\npresent in the call to Login.",
"Params": [],
"Returns": [
{
"Name": "r0",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Login",
"Docs": "Login returns a session token for the credentials, or fails with error code\n\"user:badLogin\". Call LoginPrep to get a loginToken.",
"Params": [
{
"Name": "loginToken",
"Typewords": [
"string"
]
},
{
"Name": "username",
"Typewords": [
"string"
]
},
{
"Name": "password",
"Typewords": [
"string"
]
}
],
"Returns": [
{
"Name": "r0",
"Typewords": [
"CSRFToken"
]
}
]
},
{
"Name": "Logout",
"Docs": "Logout invalidates the session token.",
"Params": [],
"Returns": []
},
{
"Name": "SetPassword",
"Docs": "SetPassword saves a new password for the account, invalidating the previous password.\nSessions are not interrupted, and will keep working. New login attempts must use the new password.\nPassword must be at least 8 characters.",
"Params": [
{
"Name": "password",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "Account",
"Docs": "Account returns information about the account.\nStorageUsed is the sum of the sizes of all messages, in bytes.\nStorageLimit is the maximum storage that can be used, or 0 if there is no limit.",
"Params": [],
"Returns": [
{
"Name": "account",
"Typewords": [
"Account"
]
},
{
"Name": "storageUsed",
"Typewords": [
"int64"
]
},
{
"Name": "storageLimit",
"Typewords": [
"int64"
]
},
{
"Name": "suppressions",
"Typewords": [
"[]",
"Suppression"
]
}
]
},
{
"Name": "AccountSaveFullName",
"Docs": "AccountSaveFullName saves the full name (used as display name in email messages)\nfor the account.",
"Params": [
{
"Name": "fullName",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "DestinationSave",
"Docs": "DestinationSave updates a destination.\nOldDest is compared against the current destination. If it does not match, an\nerror is returned. Otherwise newDest is saved and the configuration reloaded.",
"Params": [
{
"Name": "destName",
"Typewords": [
"string"
]
},
{
"Name": "oldDest",
"Typewords": [
"Destination"
]
},
{
"Name": "newDest",
"Typewords": [
"Destination"
]
}
],
"Returns": []
},
{
"Name": "ImportAbort",
"Docs": "ImportAbort aborts an import that is in progress. If the import exists and isn't\nfinished, no changes will have been made by the import.",
"Params": [
{
"Name": "importToken",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "Types",
"Docs": "Types exposes types not used in API method signatures, such as the import form upload.",
"Params": [],
"Returns": [
{
"Name": "importProgress",
"Typewords": [
"ImportProgress"
]
}
]
},
{
"Name": "SuppressionList",
"Docs": "SuppressionList lists the addresses on the suppression list of this account.",
"Params": [],
"Returns": [
{
"Name": "suppressions",
"Typewords": [
"[]",
"Suppression"
]
}
]
},
{
"Name": "SuppressionAdd",
"Docs": "SuppressionAdd adds an email address to the suppression list.",
"Params": [
{
"Name": "address",
"Typewords": [
"string"
]
},
{
"Name": "manual",
"Typewords": [
"bool"
]
},
{
"Name": "reason",
"Typewords": [
"string"
]
}
],
"Returns": [
{
"Name": "suppression",
"Typewords": [
"Suppression"
]
}
]
},
{
"Name": "SuppressionRemove",
"Docs": "SuppressionRemove removes the email address from the suppression list.",
"Params": [
{
"Name": "address",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "OutgoingWebhookSave",
"Docs": "OutgoingWebhookSave saves a new webhook url for outgoing deliveries. If url\nis empty, the webhook is disabled. If authorization is non-empty it is used for\nthe Authorization header in HTTP requests. Events specifies the outgoing events\nto be delivered, or all if empty/nil.",
"Params": [
{
"Name": "url",
"Typewords": [
"string"
]
},
{
"Name": "authorization",
"Typewords": [
"string"
]
},
{
"Name": "events",
"Typewords": [
"[]",
"string"
]
}
],
"Returns": []
},
{
"Name": "OutgoingWebhookTest",
"Docs": "OutgoingWebhookTest makes a test webhook call to urlStr, with optional\nauthorization. If the HTTP request is made this call will succeed also for\nnon-2xx HTTP status codes.",
"Params": [
{
"Name": "urlStr",
"Typewords": [
"string"
]
},
{
"Name": "authorization",
"Typewords": [
"string"
]
},
{
"Name": "data",
"Typewords": [
"Outgoing"
]
}
],
"Returns": [
{
"Name": "code",
"Typewords": [
"int32"
]
},
{
"Name": "response",
"Typewords": [
"string"
]
},
{
"Name": "errmsg",
"Typewords": [
"string"
]
}
]
},
{
"Name": "IncomingWebhookSave",
"Docs": "IncomingWebhookSave saves a new webhook url for incoming deliveries. If url is\nempty, the webhook is disabled. If authorization is not empty, it is used in\nthe Authorization header in requests.",
"Params": [
{
"Name": "url",
"Typewords": [
"string"
]
},
{
"Name": "authorization",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "IncomingWebhookTest",
"Docs": "IncomingWebhookTest makes a test webhook HTTP delivery request to urlStr,\nwith optional authorization header. If the HTTP call is made, this function\nreturns non-error regardless of HTTP status code.",
"Params": [
{
"Name": "urlStr",
"Typewords": [
"string"
]
},
{
"Name": "authorization",
"Typewords": [
"string"
]
},
{
"Name": "data",
"Typewords": [
"Incoming"
]
}
],
"Returns": [
{
"Name": "code",
"Typewords": [
"int32"
]
},
{
"Name": "response",
"Typewords": [
"string"
]
},
{
"Name": "errmsg",
"Typewords": [
"string"
]
}
]
},
{
"Name": "FromIDLoginAddressesSave",
"Docs": "FromIDLoginAddressesSave saves new login addresses to enable unique SMTP\nMAIL FROM addresses (\"fromid\") for deliveries from the queue.",
"Params": [
{
"Name": "loginAddresses",
"Typewords": [
"[]",
"string"
]
}
],
"Returns": []
},
{
"Name": "KeepRetiredPeriodsSave",
"Docs": "KeepRetiredPeriodsSave saves periods to save retired messages and webhooks.",
"Params": [
{
"Name": "keepRetiredMessagePeriod",
"Typewords": [
"int64"
]
},
{
"Name": "keepRetiredWebhookPeriod",
"Typewords": [
"int64"
]
}
],
"Returns": []
},
{
"Name": "AutomaticJunkFlagsSave",
"Docs": "AutomaticJunkFlagsSave saves settings for automatically marking messages as\njunk/nonjunk when moved to mailboxes matching certain regular expressions.",
"Params": [
{
"Name": "enabled",
"Typewords": [
"bool"
]
},
{
"Name": "junkRegexp",
"Typewords": [
"string"
]
},
{
"Name": "neutralRegexp",
"Typewords": [
"string"
]
},
{
"Name": "notJunkRegexp",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "JunkFilterSave",
"Docs": "JunkFilterSave saves junk filter settings. If junkFilter is nil, the junk filter\nis disabled. Otherwise all fields except Threegrams are stored.",
"Params": [
{
"Name": "junkFilter",
"Typewords": [
"nullable",
"JunkFilter"
]
}
],
"Returns": []
},
{
"Name": "RejectsSave",
"Docs": "RejectsSave saves the RejectsMailbox and KeepRejects settings.",
"Params": [
{
"Name": "mailbox",
"Typewords": [
"string"
]
},
{
"Name": "keep",
"Typewords": [
"bool"
]
}
],
"Returns": []
},
{
"Name": "TLSPublicKeys",
"Docs": "",
"Params": [],
"Returns": [
{
"Name": "r0",
"Typewords": [
"[]",
"TLSPublicKey"
]
}
]
},
{
"Name": "TLSPublicKeyAdd",
"Docs": "",
"Params": [
{
"Name": "loginAddress",
"Typewords": [
"string"
]
},
{
"Name": "name",
"Typewords": [
"string"
]
},
{
"Name": "noIMAPPreauth",
"Typewords": [
"bool"
]
},
{
"Name": "certPEM",
"Typewords": [
"string"
]
}
],
"Returns": [
{
"Name": "r0",
"Typewords": [
"TLSPublicKey"
]
}
]
},
{
"Name": "TLSPublicKeyRemove",
"Docs": "",
"Params": [
{
"Name": "fingerprint",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "TLSPublicKeyUpdate",
"Docs": "",
"Params": [
{
"Name": "pubKey",
"Typewords": [
"TLSPublicKey"
]
}
],
"Returns": []
}
],
"Sections": [],
"Structs": [
{
"Name": "Account",
"Docs": "",
"Fields": [
{
"Name": "OutgoingWebhook",
"Docs": "",
"Typewords": [
"nullable",
"OutgoingWebhook"
]
},
{
"Name": "IncomingWebhook",
"Docs": "",
"Typewords": [
"nullable",
"IncomingWebhook"
]
},
{
"Name": "FromIDLoginAddresses",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "KeepRetiredMessagePeriod",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "KeepRetiredWebhookPeriod",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "Domain",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Description",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "FullName",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Destinations",
"Docs": "",
"Typewords": [
"{}",
"Destination"
]
},
{
"Name": "SubjectPass",
"Docs": "",
"Typewords": [
"SubjectPass"
]
},
{
"Name": "QuotaMessageSize",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "RejectsMailbox",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "KeepRejects",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "AutomaticJunkFlags",
"Docs": "",
"Typewords": [
"AutomaticJunkFlags"
]
},
{
"Name": "JunkFilter",
"Docs": "todo: sane defaults for junkfilter",
"Typewords": [
"nullable",
"JunkFilter"
]
},
{
"Name": "MaxOutgoingMessagesPerDay",
"Docs": "",
"Typewords": [
"int32"
]
},
{
"Name": "MaxFirstTimeRecipientsPerDay",
"Docs": "",
"Typewords": [
"int32"
]
},
{
"Name": "NoFirstTimeSenderDelay",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Routes",
"Docs": "",
"Typewords": [
"[]",
"Route"
]
},
{
"Name": "DNSDomain",
"Docs": "Parsed form of Domain.",
"Typewords": [
"Domain"
]
},
{
"Name": "Aliases",
"Docs": "",
"Typewords": [
"[]",
"AddressAlias"
]
}
]
},
{
"Name": "OutgoingWebhook",
"Docs": "",
"Fields": [
{
"Name": "URL",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Authorization",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Events",
"Docs": "",
"Typewords": [
"[]",
"string"
]
}
]
},
{
"Name": "IncomingWebhook",
"Docs": "",
"Fields": [
{
"Name": "URL",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Authorization",
"Docs": "",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Destination",
"Docs": "",
"Fields": [
{
"Name": "Mailbox",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Rulesets",
"Docs": "",
"Typewords": [
"[]",
"Ruleset"
]
},
{
"Name": "FullName",
"Docs": "",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Ruleset",
"Docs": "",
"Fields": [
{
"Name": "SMTPMailFromRegexp",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "MsgFromRegexp",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "VerifiedDomain",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "HeadersRegexp",
"Docs": "",
"Typewords": [
"{}",
"string"
]
},
{
"Name": "IsForward",
"Docs": "todo: once we implement ARC, we can use dkim domains that we cannot verify but that the arc-verified forwarding mail server was able to verify.",
"Typewords": [
"bool"
]
},
{
"Name": "ListAllowDomain",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "AcceptRejectsToMailbox",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Mailbox",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Comment",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "VerifiedDNSDomain",
"Docs": "",
"Typewords": [
"Domain"
]
},
{
"Name": "ListAllowDNSDomain",
"Docs": "",
"Typewords": [
"Domain"
]
}
]
},
{
"Name": "Domain",
"Docs": "Domain is a domain name, with one or more labels, with at least an ASCII\nrepresentation, and for IDNA non-ASCII domains a unicode representation.\nThe ASCII string must be used for DNS lookups. The strings do not have a\ntrailing dot. When using with StrictResolver, add the trailing dot.",
"Fields": [
{
"Name": "ASCII",
"Docs": "A non-unicode domain, e.g. with A-labels (xn--...) or NR-LDH (non-reserved letters/digits/hyphens) labels. Always in lower case. No trailing dot.",
"Typewords": [
"string"
]
},
{
"Name": "Unicode",
"Docs": "Name as U-labels, in Unicode NFC. Empty if this is an ASCII-only domain. No trailing dot.",
"Typewords": [
"string"
]
}
]
},
{
"Name": "SubjectPass",
"Docs": "",
"Fields": [
{
"Name": "Period",
"Docs": "todo: have a reasonable default for this?",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "AutomaticJunkFlags",
"Docs": "",
"Fields": [
{
"Name": "Enabled",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "JunkMailboxRegexp",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "NeutralMailboxRegexp",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "NotJunkMailboxRegexp",
"Docs": "",
"Typewords": [
"string"
]
}
]
},
{
"Name": "JunkFilter",
"Docs": "",
"Fields": [
{
"Name": "Threshold",
"Docs": "",
"Typewords": [
"float64"
]
},
{
"Name": "Onegrams",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Twograms",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Threegrams",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "MaxPower",
"Docs": "",
"Typewords": [
"float64"
]
},
{
"Name": "TopWords",
"Docs": "",
"Typewords": [
"int32"
]
},
{
"Name": "IgnoreWords",
"Docs": "",
"Typewords": [
"float64"
]
},
{
"Name": "RareWords",
"Docs": "",
"Typewords": [
"int32"
]
}
]
},
{
"Name": "Route",
"Docs": "",
"Fields": [
{
"Name": "FromDomain",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "ToDomain",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "MinimumAttempts",
"Docs": "",
"Typewords": [
"int32"
]
},
{
"Name": "Transport",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "FromDomainASCII",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "ToDomainASCII",
"Docs": "",
"Typewords": [
"[]",
"string"
]
}
]
},
{
"Name": "AddressAlias",
"Docs": "",
"Fields": [
{
"Name": "SubscriptionAddress",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Alias",
"Docs": "Without members.",
"Typewords": [
"Alias"
]
},
{
"Name": "MemberAddresses",
"Docs": "Only if allowed to see.",
"Typewords": [
"[]",
"string"
]
}
]
},
{
"Name": "Alias",
"Docs": "",
"Fields": [
{
"Name": "Addresses",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "PostPublic",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "ListMembers",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "AllowMsgFrom",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "LocalpartStr",
"Docs": "In encoded form.",
"Typewords": [
"string"
]
},
{
"Name": "Domain",
"Docs": "",
"Typewords": [
"Domain"
]
},
{
"Name": "ParsedAddresses",
"Docs": "Matches addresses.",
"Typewords": [
"[]",
"AliasAddress"
]
}
]
},
{
"Name": "AliasAddress",
"Docs": "",
"Fields": [
{
"Name": "Address",
"Docs": "Parsed address.",
"Typewords": [
"Address"
]
},
{
"Name": "AccountName",
"Docs": "Looked up.",
"Typewords": [
"string"
]
},
{
"Name": "Destination",
"Docs": "Belonging to address.",
"Typewords": [
"Destination"
]
}
]
},
{
"Name": "Address",
"Docs": "Address is a parsed email address.",
"Fields": [
{
"Name": "Localpart",
"Docs": "",
"Typewords": [
"Localpart"
]
},
{
"Name": "Domain",
"Docs": "todo: shouldn't we accept an ip address here too? and merge this type into smtp.Path.",
"Typewords": [
"Domain"
]
}
]
},
{
"Name": "Suppression",
"Docs": "Suppression is an address to which messages will not be delivered. Attempts to\ndeliver or queue will result in an immediate permanent failure to deliver.",
"Fields": [
{
"Name": "ID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "Created",
"Docs": "",
"Typewords": [
"timestamp"
]
},
{
"Name": "Account",
"Docs": "Suppression applies to this account only.",
"Typewords": [
"string"
]
},
{
"Name": "BaseAddress",
"Docs": "Unicode. Address with fictional simplified localpart: lowercase, dots removed (gmail), first token before any \"-\" or \"+\" (typical catchall separator).",
"Typewords": [
"string"
]
},
{
"Name": "OriginalAddress",
"Docs": "Unicode. Address that caused this suppression.",
"Typewords": [
"string"
]
},
{
"Name": "Manual",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Reason",
"Docs": "",
"Typewords": [
"string"
]
}
]
},
{
"Name": "ImportProgress",
"Docs": "ImportProgress is returned after uploading a file to import.",
"Fields": [
{
"Name": "Token",
"Docs": "For fetching progress, or cancelling an import.",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Outgoing",
"Docs": "Outgoing is the payload sent to webhook URLs for events about outgoing deliveries.",
"Fields": [
{
"Name": "Version",
"Docs": "Format of hook, currently 0.",
"Typewords": [
"int32"
]
},
{
"Name": "Event",
"Docs": "Type of outgoing delivery event.",
"Typewords": [
"OutgoingEvent"
]
},
{
"Name": "DSN",
"Docs": "If this event was triggered by a delivery status notification message (DSN).",
"Typewords": [
"bool"
]
},
{
"Name": "Suppressing",
"Docs": "If true, this failure caused the address to be added to the suppression list.",
"Typewords": [
"bool"
]
},
{
"Name": "QueueMsgID",
"Docs": "ID of message in queue.",
"Typewords": [
"int64"
]
},
{
"Name": "FromID",
"Docs": "As used in MAIL FROM, can be empty, for incoming messages.",
"Typewords": [
"string"
]
},
{
"Name": "MessageID",
"Docs": "From Message-Id header, as set by submitter or us, with enclosing \u003c\u003e.",
"Typewords": [
"string"
]
},
{
"Name": "Subject",
"Docs": "Of original message.",
"Typewords": [
"string"
]
},
{
"Name": "WebhookQueued",
"Docs": "When webhook was first queued for delivery.",
"Typewords": [
"timestamp"
]
},
{
"Name": "SMTPCode",
"Docs": "Optional, for errors only, e.g. 451, 550. See package smtp for definitions.",
"Typewords": [
"int32"
]
},
{
"Name": "SMTPEnhancedCode",
"Docs": "Optional, for errors only, e.g. 5.1.1.",
"Typewords": [
"string"
]
},
{
"Name": "Error",
"Docs": "Error message while delivering, or from DSN from remote, if any.",
"Typewords": [
"string"
]
},
{
"Name": "Extra",
"Docs": "Extra fields set for message during submit, through webapi call or through X-Mox-Extra-* headers during SMTP submission.",
"Typewords": [
"{}",
"string"
]
}
]
},
{
"Name": "Incoming",
"Docs": "Incoming is the data sent to a webhook for incoming deliveries over SMTP.",
"Fields": [
{
"Name": "Version",
"Docs": "Format of hook, currently 0.",
"Typewords": [
"int32"
]
},
{
"Name": "From",
"Docs": "Message \"From\" header, typically has one address.",
"Typewords": [
"[]",
"NameAddress"
]
},
{
"Name": "To",
"Docs": "",
"Typewords": [
"[]",
"NameAddress"
]
},
{
"Name": "CC",
"Docs": "",
"Typewords": [
"[]",
"NameAddress"
]
},
{
"Name": "BCC",
"Docs": "Often empty, even if you were a BCC recipient.",
"Typewords": [
"[]",
"NameAddress"
]
},
{
"Name": "ReplyTo",
"Docs": "Optional Reply-To header, typically absent or with one address.",
"Typewords": [
"[]",
"NameAddress"
]
},
{
"Name": "Subject",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "MessageID",
"Docs": "Of Message-Id header, typically of the form \"\u003crandom@hostname\u003e\", includes \u003c\u003e.",
"Typewords": [
"string"
]
},
{
"Name": "InReplyTo",
"Docs": "Optional, the message-id this message is a reply to. Includes \u003c\u003e.",
"Typewords": [
"string"
]
},
{
"Name": "References",
"Docs": "Optional, zero or more message-ids this message is a reply/forward/related to. The last entry is the most recent/immediate message this is a reply to. Earlier entries are the parents in a thread. Values include \u003c\u003e.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Date",
"Docs": "Time in \"Date\" message header, can be different from time received.",
"Typewords": [
"nullable",
"timestamp"
]
},
{
"Name": "Text",
"Docs": "Contents of text/plain and/or text/html part (if any), with \"\\n\" line-endings, converted from \"\\r\\n\". Values are truncated to 1MB (1024*1024 bytes). Use webapi MessagePartGet to retrieve the full part data.",
"Typewords": [
"string"
]
},
{
"Name": "HTML",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Structure",
"Docs": "Parsed form of MIME message.",
"Typewords": [
"Structure"
]
},
{
"Name": "Meta",
"Docs": "Details about message in storage, and SMTP transaction details.",
"Typewords": [
"IncomingMeta"
]
}
]
},
{
"Name": "NameAddress",
"Docs": "",
"Fields": [
{
"Name": "Name",
"Docs": "Optional, human-readable \"display name\" of the addressee.",
"Typewords": [
"string"
]
},
{
"Name": "Address",
"Docs": "Required, email address.",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Structure",
"Docs": "",
"Fields": [
{
"Name": "ContentType",
"Docs": "Lower case, e.g. text/plain.",
"Typewords": [
"string"
]
},
{
"Name": "ContentTypeParams",
"Docs": "Lower case keys, original case values, e.g. {\"charset\": \"UTF-8\"}.",
"Typewords": [
"{}",
"string"
]
},
{
"Name": "ContentID",
"Docs": "Can be empty. Otherwise, should be a value wrapped in \u003c\u003e's. For use in HTML, referenced as URI `cid:...`.",
"Typewords": [
"string"
]
},
{
"Name": "DecodedSize",
"Docs": "Size of content after decoding content-transfer-encoding. For text and HTML parts, this can be larger than the data returned since this size includes \\r\\n line endings.",
"Typewords": [
"int64"
]
},
{
"Name": "Parts",
"Docs": "Subparts of a multipart message, possibly recursive.",
"Typewords": [
"[]",
"Structure"
]
}
]
},
{
"Name": "IncomingMeta",
"Docs": "",
"Fields": [
{
"Name": "MsgID",
"Docs": "ID of message in storage, and to use in webapi calls like MessageGet.",
"Typewords": [
"int64"
]
},
{
"Name": "MailFrom",
"Docs": "Address used during SMTP \"MAIL FROM\" command.",
"Typewords": [
"string"
]
},
{
"Name": "MailFromValidated",
"Docs": "Whether SMTP MAIL FROM address was SPF-validated.",
"Typewords": [
"bool"
]
},
{
"Name": "MsgFromValidated",
"Docs": "Whether address in message \"From\"-header was DMARC(-like) validated.",
"Typewords": [
"bool"
]
},
{
"Name": "RcptTo",
"Docs": "SMTP RCPT TO address used in SMTP.",
"Typewords": [
"string"
]
},
{
"Name": "DKIMVerifiedDomains",
"Docs": "Verified domains from DKIM-signature in message. Can be different domain than used in addresses.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "RemoteIP",
"Docs": "Where the message was delivered from.",
"Typewords": [
"string"
]
},
{
"Name": "Received",
"Docs": "When message was received, may be different from the Date header.",
"Typewords": [
"timestamp"
]
},
{
"Name": "MailboxName",
"Docs": "Mailbox where message was delivered to, based on configured rules. Defaults to \"Inbox\".",
"Typewords": [
"string"
]
},
{
"Name": "Automated",
"Docs": "Whether this message was automated and should not receive automated replies. E.g. out of office or mailing list messages.",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "TLSPublicKey",
"Docs": "TLSPublicKey is a public key for use with TLS client authentication based on the\npublic key of the certificate.",
"Fields": [
{
"Name": "Fingerprint",
"Docs": "Raw-url-base64-encoded Subject Public Key Info of certificate.",
"Typewords": [
"string"
]
},
{
"Name": "Created",
"Docs": "",
"Typewords": [
"timestamp"
]
},
{
"Name": "Type",
"Docs": "E.g. \"rsa-2048\", \"ecdsa-p256\", \"ed25519\"",
"Typewords": [
"string"
]
},
{
"Name": "Name",
"Docs": "Descriptive name to identify the key, e.g. the device where key is used.",
"Typewords": [
"string"
]
},
{
"Name": "NoIMAPPreauth",
"Docs": "If set, new immediate authenticated TLS connections are not moved to \"authenticated\" state. For clients that don't understand it, and will try an authenticate command anyway.",
"Typewords": [
"bool"
]
},
{
"Name": "CertDER",
"Docs": "",
"Typewords": [
"[]",
"uint8"
]
},
{
"Name": "Account",
"Docs": "Key authenticates this account.",
"Typewords": [
"string"
]
},
{
"Name": "LoginAddress",
"Docs": "Must belong to account.",
"Typewords": [
"string"
]
}
]
}
],
"Ints": [],
"Strings": [
{
"Name": "CSRFToken",
"Docs": "",
"Values": null
},
{
"Name": "Localpart",
"Docs": "Localpart is a decoded local part of an email address, before the \"@\".\nFor quoted strings, values do not hold the double quote or escaping backslashes.\nAn empty string can be a valid localpart.\nLocalparts are in Unicode NFC.",
"Values": null
},
{
"Name": "OutgoingEvent",
"Docs": "OutgoingEvent is an activity for an outgoing delivery. Either generated by the\nqueue, or through an incoming DSN (delivery status notification) message.",
"Values": [
{
"Name": "EventDelivered",
"Value": "delivered",
"Docs": "Message was accepted by a next-hop server. This does not necessarily mean the\nmessage has been delivered in the mailbox of the user."
},
{
"Name": "EventSuppressed",
"Value": "suppressed",
"Docs": "Outbound delivery was suppressed because the recipient address is on the\nsuppression list of the account, or a simplified/base variant of the address is."
},
{
"Name": "EventDelayed",
"Value": "delayed",
"Docs": "A delivery attempt failed but delivery will be retried again later."
},
{
"Name": "EventFailed",
"Value": "failed",
"Docs": "Delivery of the message failed and will not be tried again. Also see the\n\"Suppressing\" field of [Outgoing]."
},
{
"Name": "EventRelayed",
"Value": "relayed",
"Docs": "Message was relayed into a system that does not generate DSNs. Should only\nhappen when explicitly requested."
},
{
"Name": "EventExpanded",
"Value": "expanded",
"Docs": "Message was accepted and is being delivered to multiple recipients (e.g. the\naddress was an alias/list), which may generate more DSNs."
},
{
"Name": "EventCanceled",
"Value": "canceled",
"Docs": "Message was removed from the queue, e.g. canceled by admin/user."
},
{
"Name": "EventUnrecognized",
"Value": "unrecognized",
"Docs": "An incoming message was received that was either a DSN with an unknown event\ntype (\"action\"), or an incoming non-DSN-message was received for the unique\nper-outgoing-message address used for sending."
}
]
}
],
"SherpaVersion": 0,
"SherpadocVersion": 1
}