doc:appunti:linux:sa:sieve_filtering_examples
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:linux:sa:sieve_filtering_examples [2023/03/22 22:28] – [Forward and keep a local copy] niccolo | doc:appunti:linux:sa:sieve_filtering_examples [2023/03/24 11:59] (current) – [Filtering with Sieve] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Filtering with Sieve ====== | ====== Filtering with Sieve ====== | ||
+ | |||
+ | The **Debian 11 Bullseye** GNU/Linux installs the **Dovecot** mail suite version **2.3.13**, including the **Pigeonhole Sieve** extension **v0.5.13** (via the **dovecot-sieve** package). | ||
+ | |||
+ | The [[https:// | ||
+ | |||
+ | The following recipes were tested into a **$HOME/ | ||
+ | |||
+ | FIXME Document the timeout options. | ||
===== Sender ===== | ===== Sender ===== | ||
- | Storing in different folder upon (envelope) sender: | + | Storing |
< | < | ||
Line 14: | Line 22: | ||
===== Recipient ===== | ===== Recipient ===== | ||
- | Storing in different folder upon destination address: | + | Storing |
< | < | ||
Line 55: | Line 63: | ||
===== Pipe a message to an external program ===== | ===== Pipe a message to an external program ===== | ||
+ | |||
+ | To enable the **execute** Sieve command using **Debian 11** you have to edit some configuration files contained into the **/ | ||
+ | |||
+ | < | ||
+ | plugin { | ||
+ | ... | ||
+ | | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Then you have to edit the **90-sieve-extprograms.conf** configuration file and define the **sieve_execute_socket_dir** and **sieve_execute_bin_dir** options: | ||
+ | |||
+ | < | ||
+ | plugin { | ||
+ | ... | ||
+ | sieve_execute_socket_dir = sieve-execute | ||
+ | sieve_execute_bin_dir = / | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Only the executables contained into // | ||
+ | |||
+ | The following example is used to pipe a received message to an external program, which acts as a gateway from the mail system to the SMS mobile network. Only messages originating from some addresses and containing a properly formatted subject are piped to the external program: | ||
< | < | ||
Line 68: | Line 101: | ||
</ | </ | ||
- | The **execute** command is not considered a final action (which " | + | Here the **execute** //command// is called with the **:pipe** //tag//, this causes the execution of the external program much like the older '' |
+ | |||
+ | The **execute** command is not considered a final action (which " | ||
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
doc/appunti/linux/sa/sieve_filtering_examples.1679524109.txt.gz · Last modified: 2023/03/22 22:28 by niccolo