mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-09-13 16:45:27 +08:00
Updated Retention policies in Wild Duck IMAP 🦆 (markdown)
parent
c4d2802ba3
commit
a6eb4723d3
1 changed files with 2 additions and 14 deletions
|
@ -9,26 +9,14 @@ Once retention time is reached, the message is deleted from database and attachm
|
|||
For example if you want to have a default retention policy of 90 days, then use `7776000000` as the retention value (90 * 24 * 3600 * 1000). If defined then this value also applies to any new folders the user creates.
|
||||
|
||||
```
|
||||
curl -XPOST "http://localhost:8080/user/create" -H 'content-type: application/json' -d '{
|
||||
curl -XPOST "http://localhost:8080/user" -H 'content-type: application/json' -d '{
|
||||
"username": "testuser",
|
||||
"password": "secretpass",
|
||||
"retention": 7776000000
|
||||
}'
|
||||
```
|
||||
|
||||
Retention time applies per mailbox but currently there is no means to modify mailboxes via HTTP API so if you need to, then you can change the retention time directly in the database.
|
||||
|
||||
```
|
||||
db.mailboxes.updateOne({
|
||||
_id: ObjectId("592296ca50d6c82933e5a307")
|
||||
}, {
|
||||
$set: {
|
||||
retention: 7776000000
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
> Updating retention policy for a mailbox directly in database does not change retention time for existing messages, it only applies to new messages.
|
||||
You can change the retention with the [Mailbox Update](https://github.com/wildduck-email/wildduck/wiki/API-Docs#update-mailbox-details) API. Updating retention policy for a mailbox does not change retention time for existing messages, it only applies to new messages.
|
||||
|
||||
### How does it work?
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue