mox/webaccount/api.json
Mechiel Lukkien 960a51242d
add aliases/lists: when sending to an alias, the message gets delivered to all members
the members must currently all be addresses of local accounts.

a message sent to an alias is accepted if at least one of the members accepts
it. if no members accepts it (e.g. due to bad reputation of sender), the
message is rejected.

if a message is submitted to both an alias addresses and to recipients that are
members of the alias in an smtp transaction, the message will be delivered to
such members only once.  the same applies if the address in the message
from-header is the address of a member: that member won't receive the message
(they sent it). this prevents duplicate messages.

aliases have three configuration options:
- PostPublic: whether anyone can send through the alias, or only members.
  members-only lists can be useful inside organizations for internal
  communication. public lists can be useful for support addresses.
- ListMembers: whether members can see the addresses of other members. this can
  be seen in the account web interface. in the future, we could export this in
  other ways, so clients can expand the list.
- AllowMsgFrom: whether messages can be sent through the alias with the alias
  address used in the message from-header. the webmail knows it can use that
  address, and will use it as from-address when replying to a message sent to
  that address.

ideas for the future:
- allow external addresses as members. still with some restrictions, such as
  requiring a valid dkim-signature so delivery has a chance to succeed. will
  also need configuration of an admin that can receive any bounces.
- allow specifying specific members who can sent through the list (instead of
  all members).

for github issue #57 by hmfaysal.
also relevant for #99 by naturalethic.
thanks to damir & marin from sartura for discussing requirements/features.
2024-04-24 19:15:30 +02:00

1562 lines
30 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": "RejectsSave",
"Docs": "RejectsSave saves the RejectsMailbox and KeepRejects settings.",
"Params": [
{
"Name": "mailbox",
"Typewords": [
"string"
]
},
{
"Name": "keep",
"Typewords": [
"bool"
]
}
],
"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"
]
}
]
}
],
"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
}