mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-07 08:28:53 +08:00
Merge branch 'master' of github.com:nodemailer/wildduck
This commit is contained in:
commit
2a6e900d7c
1 changed files with 10 additions and 72 deletions
82
README.md
82
README.md
|
@ -10,7 +10,7 @@ Wild Duck tries to follow Gmail in architectural design. If there's a decision t
|
||||||
|
|
||||||
* *MongoDB* to store all data
|
* *MongoDB* to store all data
|
||||||
* *Redis* for pubsub and counters
|
* *Redis* for pubsub and counters
|
||||||
* *Node.js*, at least version 6.0.0
|
* *Node.js* at least version 6.0.0
|
||||||
|
|
||||||
**Optional requirements**
|
**Optional requirements**
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ node server.js --config=/etc/wildduck.toml
|
||||||
|
|
||||||
### Step 4\. Create an user account
|
### Step 4\. Create an user account
|
||||||
|
|
||||||
See see [API Reference](https://github.com/nodemailer/wildduck/wiki/API-Docs#add-a-new-user) for details about creating new user accounts
|
See [API Docs](https://github.com/nodemailer/wildduck/wiki/API-Docs#add-a-new-user) for details about creating new user accounts
|
||||||
|
|
||||||
### Step 5\. Use an IMAP/POP3 client to log in
|
### Step 5\. Use an IMAP/POP3 client to log in
|
||||||
|
|
||||||
|
@ -68,7 +68,13 @@ Any IMAP or POP3 client will do. Use the credentials from step 4\. to log in.
|
||||||
3. Provide Gmail-like features like pushing sent messages automatically to Sent Mail folder or notifying about messages moved to Junk folder so these could be marked as spam
|
3. Provide Gmail-like features like pushing sent messages automatically to Sent Mail folder or notifying about messages moved to Junk folder so these could be marked as spam
|
||||||
4. Provide parsed mailbox and message data over HTTP. This should make creating webmail interfaces super easy, no need to parse RFC822 messages to get text content or attachments
|
4. Provide parsed mailbox and message data over HTTP. This should make creating webmail interfaces super easy, no need to parse RFC822 messages to get text content or attachments
|
||||||
|
|
||||||
## FAQ
|
# HTTP API
|
||||||
|
|
||||||
|
Users, mailboxes and messages can be managed with HTTP requests against Wild Duck API
|
||||||
|
|
||||||
|
### [API Docs](https://github.com/nodemailer/wildduck/wiki/API-Docs)
|
||||||
|
|
||||||
|
# FAQ
|
||||||
|
|
||||||
### Does it work?
|
### Does it work?
|
||||||
|
|
||||||
|
@ -168,79 +174,11 @@ If a messages is downloaded by a client this message gets marked as _Seen_
|
||||||
|
|
||||||
If a messages is deleted by a client this message gets marked as Seen and moved to Trash folder
|
If a messages is deleted by a client this message gets marked as Seen and moved to Trash folder
|
||||||
|
|
||||||
# HTTP API
|
|
||||||
|
|
||||||
> **NB!** The HTTP API is being re-designed
|
|
||||||
|
|
||||||
Users, mailboxes and messages can be managed with HTTP requests against Wild Duck API
|
|
||||||
|
|
||||||
TODO:
|
|
||||||
|
|
||||||
1. Expose counters (seen/unseen messages, message count in mailbox etc.)
|
|
||||||
2. Search/list messages
|
|
||||||
3. Expose journal updates through WebSocket or similar
|
|
||||||
|
|
||||||
[API REFERENCE](https://github.com/nodemailer/wildduck/wiki/API-Docs)
|
|
||||||
|
|
||||||
## Message filtering
|
## Message filtering
|
||||||
|
|
||||||
> The filtering system is subject to change with the API updates. Most probably the filters are going to reside in separate collection and not as part of the user object.
|
|
||||||
|
|
||||||
Wild Duck has built-in message filtering in LMTP server. This is somewhat similar to Sieve even though the filters are not scripts.
|
Wild Duck has built-in message filtering in LMTP server. This is somewhat similar to Sieve even though the filters are not scripts.
|
||||||
|
|
||||||
Filters are configuration objects stored in the `filters` array of the users object.
|
Filters can be managed via the [Wild Duck API](https://github.com/nodemailer/wildduck/wiki/API-Docs).
|
||||||
|
|
||||||
**Example filter**
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
{
|
|
||||||
// identifier for this filter
|
|
||||||
id: ObjectId('abcdefghij...'),
|
|
||||||
|
|
||||||
// query to check messages against
|
|
||||||
query: {
|
|
||||||
// message must match all filter rules for the filter actions to apply
|
|
||||||
// all values are case insensitive
|
|
||||||
headers: {
|
|
||||||
// partial string match against decoded From: header
|
|
||||||
from: 'sender@example.com',
|
|
||||||
// partial string match against decoded To: header
|
|
||||||
to: 'recipient@example.com',
|
|
||||||
// partial string match against decoded Subject: header
|
|
||||||
subject: 'Väga tõrges'
|
|
||||||
},
|
|
||||||
|
|
||||||
// partial string match (case insensitive) against decoded plaintext message
|
|
||||||
text: 'Mõigu ristis oli mis?',
|
|
||||||
|
|
||||||
// positive: must have attachments, negative: no attachments
|
|
||||||
ha: 1,
|
|
||||||
|
|
||||||
// positive: larger than size, negative: smaller than abs(size)
|
|
||||||
size: 10
|
|
||||||
},
|
|
||||||
// what to do if the filter query matches the message
|
|
||||||
action: {
|
|
||||||
|
|
||||||
// mark message as seen
|
|
||||||
unseen: false,
|
|
||||||
|
|
||||||
// mark message as flagged
|
|
||||||
flag: true,
|
|
||||||
|
|
||||||
// set mailbox ID
|
|
||||||
mailbox: 'aaaaa', // must be ObjectID!
|
|
||||||
|
|
||||||
// positive spam, negative ham
|
|
||||||
spam: 1,
|
|
||||||
|
|
||||||
// if true, delete message
|
|
||||||
delete: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**NB!** If you do not care about an action field then do not set it, otherwise matches from other filters do not apply
|
|
||||||
|
|
||||||
## Sharding
|
## Sharding
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue