remove mailbox routes and move it to users
This commit is contained in:
@@ -893,125 +893,6 @@ Response (204):
|
||||
{}
|
||||
```
|
||||
|
||||
## Mailboxes
|
||||
|
||||
Mailboxes allow users to receive mail using `IMAP`. Every user gets a mailbox with the same name as the username.
|
||||
Users can receive email using IMAP (TLS) at `my.customdomain.com` and send mail using SMTP (STARTTLS) at
|
||||
`my.customdomain.com`.
|
||||
|
||||
Apps can also receive email using the [recvmail addon](/references/addons.html#recvmail). App mailboxes are
|
||||
named as `<subdomain>.app`. For this reason, the `.app` suffix is reserved for apps.
|
||||
|
||||
### Create mailbox
|
||||
|
||||
POST `/api/v1/mailboxes` <scope>admin</scope>
|
||||
|
||||
Creates a new mailbox.
|
||||
|
||||
`name` specifies the address at which email can be received and does not include the domain name. `name` can contain
|
||||
only alphanumeric characters and a dot ('.') and must be lower case. The Cloudron mail server support '+' based subaddressing (i.e)name+tag@domain.com will be delivered to this mailbox.
|
||||
|
||||
mailboxes can only be accessed by users with the same username as the mailbox. A mailbox is automatically created
|
||||
for every user on the Cloudron.
|
||||
|
||||
Request:
|
||||
```
|
||||
{
|
||||
name: <string>
|
||||
}
|
||||
```
|
||||
|
||||
`name` must be atleast 2 characters and must be alphanumeric.
|
||||
|
||||
Response (200):
|
||||
```
|
||||
{
|
||||
id: <string>,
|
||||
name: <string>
|
||||
}
|
||||
```
|
||||
|
||||
### Get mailbox
|
||||
|
||||
GET `/api/v1/mailboxes/:mailboxName` <scope>admin</scope>
|
||||
|
||||
Gets an existing mailbox with name `mailboxName`.
|
||||
|
||||
Response (200):
|
||||
```
|
||||
{
|
||||
id: <string>,
|
||||
name: <string>,
|
||||
aliases: [ <string>, ...]
|
||||
}
|
||||
```
|
||||
|
||||
### List mailboxes
|
||||
|
||||
GET `/api/v1/mailboxes` <scope>admin</scope>
|
||||
|
||||
Lists all mailboxes.
|
||||
|
||||
Response (200):
|
||||
```
|
||||
{
|
||||
mailboxes: [
|
||||
{
|
||||
id: <string>,
|
||||
name: <string>
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Set mailbox aliases
|
||||
|
||||
PUT `/api/v1/mailboxes/:mailboxName/aliases` <scope>admin</scope>
|
||||
|
||||
Sets aliases of an existing mailbox.
|
||||
|
||||
An alias is an alternate email address for a mailbox. Mails received at the alternate address are stored
|
||||
in the mailbox. The email's `to` header should indicate the address that the original sent it to.
|
||||
|
||||
This also allows users to send emails with `From` address set to an alias.
|
||||
|
||||
Note that this call will replace the current aliases for this mailbox, it does **not** merge the provided ones with the current aliases.
|
||||
|
||||
Aliases have to be unique and cannot conflict with existing aliases or mailbox names. Any conflict with result in a 409.
|
||||
|
||||
Request:
|
||||
```
|
||||
{
|
||||
aliases: [ <string>, ... ]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Get mailbox aliases
|
||||
|
||||
GET `/api/v1/mailboxes/:mailboxName/aliases` <scope>admin</scope>
|
||||
|
||||
Gets aliases of an existing mailbox.
|
||||
|
||||
Response (200):
|
||||
```
|
||||
{
|
||||
aliases: [ <string>, ... ]
|
||||
}
|
||||
```
|
||||
|
||||
### Delete mailbox
|
||||
|
||||
DELETE `/api/v1/mailboxes/:mailboxName` <scope>admin</scope>
|
||||
|
||||
Deletes an existing with name `mailboxName`.
|
||||
|
||||
Response (204):
|
||||
```
|
||||
{}
|
||||
```
|
||||
|
||||
## Profile
|
||||
|
||||
### Get profile
|
||||
|
||||
Reference in New Issue
Block a user