Download:
child 2:3b26c8c03165
parent 0:6d62d30434ab
1:e73deb8e2462
Anton Shestakov <av6@dwimlabs.net>, Sun, 10 Jul 2016 18:59:40 +0800
the rest of files

3 файлов изменено, 16 вставок(+), 0 удалений(-) [+]
99notify.sieve file | annotate | diff | comparison | revisions
dovecot.sieve-pipe.conf file | annotate | diff | comparison | revisions
xmpp-headline.sh file | annotate | diff | comparison | revisions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/99notify.sieve Sun Jul 10 18:59:40 2016 +0800
@@ -0,0 +1,6 @@
+require ["vnd.dovecot.pipe", "copy", "variables"];
+if address :matches "to" "j*@example.com" {
+ if header :matches "from" "*" { set "from" "${1}"; }
+ if header :matches "subject" "*" { set "subject" "${1}"; }
+ pipe :copy :try "xmpp-headline.sh" ["${from}", "${subject}"];
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dovecot.sieve-pipe.conf Sun Jul 10 18:59:40 2016 +0800
@@ -0,0 +1,7 @@
+plugin {
+ sieve = ~/.dovecot.sieve
+ sieve_dir = ~/sieve
+ sieve_plugins = sieve_extprograms
+ sieve_global_extensions = +vnd.dovecot.pipe
+ sieve_pipe_bin_dir = path/to/sieve-pipe
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmpp-headline.sh Sun Jul 10 18:59:40 2016 +0800
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+path/to/sieve-pipe/venv/bin/python path/to/sieve-pipe/xmpp-headline.py "$@"