Dear list, I was trying to use the "notify" action with dovecot sieve but I just couldn't get it work. The relevant lines look as follows: ,-------- |require ["fileinto", "notyfy"]; | if header :contains ["to", "cc"] ["userA at example.com", "userB at example.com"] { | notify | :method "mailto" | :options "userC at example.com" | :low | :message "notification"; | keep; | stop; | } `-------- But I get in log file the error ,-------- | Sep 11 10:51:25 host30 deliver(abc at example.com): sieve runtime error: Notify: Generic Error `-------- Can someone please give me a hint what I did wrong, or give an example how a sieve notify action should look like? I appended my configuration below, in case it matters. I am running linux debian etch, and use the postfix/dovecot packages from debian repository. Thanks for your consideration, Thanh Output from 'dovecot -n': ,-------- | ssl_listen: *:993 | ssl_ca_file: /etc/ssl/certs/cacert.pem | ssl_cert_file: /etc/ssl/certs/cert.pem | ssl_key_file: /etc/ssl/private/key.pem | disable_plaintext_auth: no | login_dir: /var/run/dovecot/login | login_executable: /usr/lib/dovecot/imap-login | mail_extra_groups: mail | mail_location: maildir:/var/mail/vmail/%n | auth default: | user: nobody | passdb: | driver: ldap | args: /etc/dovecot/dovecot-ldap.conf | userdb: | driver: static | args: uid=520 gid=520 home=/var/mail/vmail/%n allow_all_users=yes | socket: | type: listen | client: | path: /var/spool/postfix/private/auth | mode: 432 | user: postfix | group: postfix | master: | path: /var/run/dovecot/auth-master | mode: 384 | user: vmail `-------- dovecot-ldap.conf: ,-------- | hosts = 192.168.100.20:389 | ldap_version = 3 | base = ou=People,dc=example,dc=com | deref = never | scope = onelevel | auth_bind = yes | auth_bind_userdn = uid=%n,ou=People,dc=example,dc=com `--------
sorry for the noise, I found the answer: http://article.gmane.org/gmane.mail.imap.dovecot/20813/match Thanh On Tue, Sep 11, 2007 at 02:06:06PM +0200, The Thanh Han wrote:> Dear list, > > I was trying to use the "notify" action with dovecot sieve > but I just couldn't get it work. The relevant lines look as follows: > > ,-------- > |require ["fileinto", "notyfy"]; > | if header :contains ["to", "cc"] ["userA at example.com", "userB at example.com"] { > | notify > | :method "mailto" > | :options "userC at example.com" > | :low > | :message "notification"; > | keep; > | stop; > | } > `-------- > > But I get in log file the error > > ,-------- > | Sep 11 10:51:25 host30 deliver(abc at example.com): sieve runtime error: Notify: Generic Error > `-------- > > Can someone please give me a hint what I did wrong, or give > an example how a sieve notify action should look like? > > I appended my configuration below, in case it matters. I am > running linux debian etch, and use the postfix/dovecot packages > from debian repository. > > Thanks for your consideration, > Thanh > > Output from 'dovecot -n': > ,-------- > | ssl_listen: *:993 > | ssl_ca_file: /etc/ssl/certs/cacert.pem > | ssl_cert_file: /etc/ssl/certs/cert.pem > | ssl_key_file: /etc/ssl/private/key.pem > | disable_plaintext_auth: no > | login_dir: /var/run/dovecot/login > | login_executable: /usr/lib/dovecot/imap-login > | mail_extra_groups: mail > | mail_location: maildir:/var/mail/vmail/%n > | auth default: > | user: nobody > | passdb: > | driver: ldap > | args: /etc/dovecot/dovecot-ldap.conf > | userdb: > | driver: static > | args: uid=520 gid=520 home=/var/mail/vmail/%n allow_all_users=yes > | socket: > | type: listen > | client: > | path: /var/spool/postfix/private/auth > | mode: 432 > | user: postfix > | group: postfix > | master: > | path: /var/run/dovecot/auth-master > | mode: 384 > | user: vmail > `-------- > > dovecot-ldap.conf: > ,-------- > | hosts = 192.168.100.20:389 > | ldap_version = 3 > | base = ou=People,dc=example,dc=com > | deref = never > | scope = onelevel > | auth_bind = yes > | auth_bind_userdn = uid=%n,ou=People,dc=example,dc=com > `--------
Thanh Han The wrote:> sorry for the noise, I found the answer: > http://article.gmane.org/gmane.mail.imap.dovecot/20813/match > > Thanh >You found "old answer"... :) there is new version of patch and it included in latest source code of sieve plugin [ check downloads page]. Uldis
Hi, On Tue, Sep 11, 2007 at 10:47:10PM +0300, Uldis Pakuls wrote:> you can expand it using variables: > > sample: > ----------- > # Imagine the header > if address :matches ["From"] ["*"] { > # ${1} is the matching address > keep; > notify :method "mailto" :options ["${1}"] :message "Thank you, your message has been received." ; > } else { > # Control wouldn't reach this block, any match was successful > } > ----------- > > see: http://www.ietf.org/internet-drafts/draft-ietf-sieve-variables-08.txtI installed the latest sieve plugin (1.0.2) but it seems that the "variables" extension is not supported yet. When I say ,-------- | require ["fileinto", "variables"]; `-------- then I get the error: ,-------- | sieve parse error: line 1: Unsupported features in require line `-------- If I leave variables out, sieve doesn't complain but the variable is not expanded and I got ,-------- | sent notification to <${1}> (method=mailto) `-------- Any hint please? Thanks, Thanh