/mail/self/password
0.1.0Unchanged since publicationChange a mailbox's password using its current credentials
noneSupply the mailbox's email address in address, its current mail login password in password, and the new password in new_password. The operation requires no API token. UrbeStack verifies the current password against the same stored hash Dovecot uses. Roundcube calls this operation from its password form.
A malformed or unknown email address, a malformed or incorrect current password, or a refusal under the login policy returns 401 with the same error message. UrbeStack reports login policy refusals and failed password checks, including checks for unknown email addresses, to the rules that ban IP addresses. A malformed email address or current password only triggers a log warning. After successful authentication, the operation returns 403 if mailbox logins are suspended or the mailbox's owner account is inactive.
A successful change immediately closes all open IMAP and POP3 sessions and revokes the mailbox's webmail sign-in tickets. The response returns the normalized email address in address and sets changed and sessions_ended to true. Roundcube signs in again with the new password on its next request.
As a command
Run as root on the serveraddressstring, up to 320 charactersRequirednew_passwordstring, up to 128 charactersRequiredpasswordstring, up to 128 charactersRequiredExample
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/mail/self/password" \
-H "Content-Type: application/json" \
-d '{
"address": "info@example.com",
"new_password": "text",
"password": "Sup3r-Secret-Passphrase"
}'200 OK{
"address": "info@example.com",
"changed": true
}Errors
20 errors, each a status and a sentence400--address is required400<what> must be text without control characters, 1 to <max> characters400Domain name required400Domain name too long400Invalid IPv4 address400Invalid IPv6 address400Invalid boolean400Invalid domain name400Invalid mail address400Invalid mail address: local part over 64 characters400Invalid mail address: no local part400Invalid mail address: the local part may hold letters, digits, dots, _ + and -400Invalid password: 8 to 128 printable characters400Invalid port400Invalid setting key400Nothing to change401Invalid credentials403Logins are suspended for this account404No such mail account: <address>404Setting '<key>' not foundurbestack.com/docs/api/post-mail-self-password/