mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
added sieve example for subaddress sorting (#2410)
This commit is contained in:
parent
908e95fa74
commit
54f2181379
|
@ -61,6 +61,23 @@ pipe "external-program";
|
||||||
|
|
||||||
For more examples or a detailed description of the Sieve language have a look at [the official site](http://sieve.info/examplescripts). Other resources are available on the internet where you can find several [examples](https://support.tigertech.net/sieve#sieve-example-rules-jmp).
|
For more examples or a detailed description of the Sieve language have a look at [the official site](http://sieve.info/examplescripts). Other resources are available on the internet where you can find several [examples](https://support.tigertech.net/sieve#sieve-example-rules-jmp).
|
||||||
|
|
||||||
|
## Automatic Sorting Based on Subaddresses
|
||||||
|
|
||||||
|
It is possible to sort subaddresses such as `user+mailing-lists@example.com` into a corresponding folder (here: `INBOX/Mailing-lists`) automatically.
|
||||||
|
|
||||||
|
```sieve
|
||||||
|
require ["envelope", "fileinto", "mailbox", "subaddress", "variables"];
|
||||||
|
|
||||||
|
if envelope :detail :matches "to" "*" {
|
||||||
|
set :lower :upperfirst "tag" "${1}";
|
||||||
|
if mailboxexists "INBOX.${1}" {
|
||||||
|
fileinto "INBOX.${1}";
|
||||||
|
} else {
|
||||||
|
fileinto :create "INBOX.${tag}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Manage Sieve
|
## Manage Sieve
|
||||||
|
|
||||||
The [Manage Sieve](https://doc.dovecot.org/admin_manual/pigeonhole_managesieve_server/) extension allows users to modify their Sieve script by themselves. The authentication mechanisms are the same as for the main dovecot service. ManageSieve runs on port `4190` and needs to be enabled using the `ENABLE_MANAGESIEVE=1` environment variable.
|
The [Manage Sieve](https://doc.dovecot.org/admin_manual/pigeonhole_managesieve_server/) extension allows users to modify their Sieve script by themselves. The authentication mechanisms are the same as for the main dovecot service. ManageSieve runs on port `4190` and needs to be enabled using the `ENABLE_MANAGESIEVE=1` environment variable.
|
||||||
|
|
Loading…
Reference in a new issue