mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
4dea2de343
we only have a "storage" limit. for total disk usage. we don't have a limit on messages (count) or mailboxes (count). also not on total annotation size, but we don't have support annotations at all at the moment. we don't implement setquota. with rfc 9208 that's allowed. with the previous quota rfc 2087 it wasn't. the status command can now return "DELETED-STORAGE". which should be the disk space that can be reclaimed by removing messages with the \Deleted flags. however, it's not very likely clients set the \Deleted flag without expunging the message immediately. we don't want to go through all messages to calculate the sum of message sizes with the deleted flag. we also don't currently track that in MailboxCount. so we just respond with "0". not compliant, but let's wait until someone complains. when returning quota information, it is not possible to give the current usage when no limit is configured. clients implementing rfc 9208 should probably conclude from the presence of QUOTA=RES-* capabilities (only in rfc 9208, not in 2087) and the absence of those limits in quota responses (or the absence of an untagged quota response at all) that a resource type doesn't have a limit. thunderbird will claim there is no quota information when no limit was configured, so we can probably conclude that it implements rfc 2087, but not rfc 9208. we now also show the usage & limit on the account page. for issue #115 by pmarini
316 lines
6.4 KiB
JSON
316 lines
6.4 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: full name, the default domain,\nand the destinations (keys are email addresses, or localparts to the default\ndomain). todo: replace with a function that returns the whole account, when\nsherpadoc understands unnamed struct fields.\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": "fullName",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "defaultDomain",
|
|
"Typewords": [
|
|
"Domain"
|
|
]
|
|
},
|
|
{
|
|
"Name": "destinations",
|
|
"Typewords": [
|
|
"{}",
|
|
"Destination"
|
|
]
|
|
},
|
|
{
|
|
"Name": "storageUsed",
|
|
"Typewords": [
|
|
"int64"
|
|
]
|
|
},
|
|
{
|
|
"Name": "storageLimit",
|
|
"Typewords": [
|
|
"int64"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"Name": "AccountSaveFullName",
|
|
"Docs": "",
|
|
"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"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Sections": [],
|
|
"Structs": [
|
|
{
|
|
"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": "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": "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": "VerifiedDNSDomain",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"Domain"
|
|
]
|
|
},
|
|
{
|
|
"Name": "ListAllowDNSDomain",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"Domain"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Ints": [],
|
|
"Strings": [
|
|
{
|
|
"Name": "CSRFToken",
|
|
"Docs": "",
|
|
"Values": null
|
|
}
|
|
],
|
|
"SherpaVersion": 0,
|
|
"SherpadocVersion": 1
|
|
}
|