Skip to content

Commit

Permalink
Remove support for quota_set / SETQUOTA
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Jul 8, 2024
1 parent df678ef commit 1f4d96a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 65 deletions.
8 changes: 0 additions & 8 deletions data/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2690,14 +2690,6 @@ quota backend. It means you can have the quota in Maildir++ format (e.g.
\`10000000S\`).`
},

quota_set: {
plugin: 'quota',
values: setting_types.STRING,
seealso: [ '[[link,quota_admin]]' ],
text: `
A dictionary string where your quota limit exists and can be modified.`
},

quota_warning: {
plugin: 'quota',
values: setting_types.STRING,
Expand Down
57 changes: 0 additions & 57 deletions docs/core/plugins/imap_quota.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,60 +15,3 @@ It implements the IMAP commands defined in [[rfc,2087]]
## Settings

There are no `dovecot.conf` settings for this plugin.

## Quota Admin Commands

This plugin implements the IMAP `SETQUOTA` command, which allows changing the
logged in user's quota limit if the user is admin.

Normally this means that a master user must log in with
`userdb_admin = y` set in the master passdb.

The changing is done via `dict_set()` command, so you must configure the
[[setting,quota_set]] setting to point to some dictionary where your quota
limit exists.

Example, for SQL:

::: code-group
```[dovecot.conf]
plugin {
quota_set = dict:proxy::sqlquota
}
dict {
sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
```

```[dovecot-dict-sql.conf.ext]
# Use "host= ... pass=foo#bar" with double-quotes if your password has '#'
# character.
connect = host=/var/run/mysqld/mysqld.sock dbname=mails user=admin \
password=pass
# Alternatively you can connect to localhost as well:
#connect = host=localhost dbname=mails user=admin password=pass # port=3306
map {
pattern = priv/quota/limit/storage
table = quota
username_field = username
value_field = bytes
}
map {
pattern = priv/quota/limit/messages
table = quota
username_field = username
value_field = messages
}
```
:::

Afterwards the quota can be changed with the IMAP command:

```
a SETQUOTA "User quota" (STORAGE 12345 MESSAGES 123)
```

0 comments on commit 1f4d96a

Please sign in to comment.