Potential bug report: Cannot use ":args" option via Pigeonhole Sieve pipe plugin

Zeeshan Muhammad zeeshan.muhammad at gmail.com
Tue Jun 7 10:16:19 UTC 2016


It looks like pipe addon specification at
http://hg.rename-it.nl/pigeonhole-0.2-sieve-pipe/raw-file/tip/doc/rfc/spec-bosch-sieve-pipe.txt
notes ":args" usage is possible but the implementation source at
https://github.com/dovecot/pigeonhole/blob/master/src/plugins/sieve-extprograms/cmd-pipe.c
shows it was implemented as follows:

pipe "sieve-pipe-example" [ "first-arg", "second-arg" ];

My test sieve is now working, but I don't understand why I wasn't able to
use ":args" format noted in the specification document.

On 7 June 2016 at 10:52, Zeeshan Muhammad <zeeshan.muhammad at gmail.com>
wrote:

> Hi all,
>
> Following the instructions noted at
> http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe , I am trying to
> make use of the Pigeonhole sieve pipe plugin to execute an application with
> custom arguments via my test sieve script:
>
> require ["vnd.dovecot.pipe"];
> if address :is "to" "test at example.com" {
>   pipe :args [ "first-arg", "second-arg" ] "sieve-pipe-example";
> }
>
> I am editing my test sieve script via Mozilla Thunderbird v45.1.1 using
> the Sieve email-client addon (v0.2.3h, see
> https://github.com/thsmi/sieve#releases and
> https://addons.mozilla.org/en-US/thunderbird/addon/sieve/ )
>
> When I attempt to save the example sieve script above, I get the following
> error returned by ManageSieve via Mozilla Thunderbird's Sieve addon:
>
> "The script could not be saved:
> Sieve mail filter: line 3: error: unknown tagged argument ':args' for the
> pipe command (reported only once at first occurrence).
> Sieve mail filter: error: validation failed."
>
> I have setup sieve-pipe-example as follows in my 90-sieve.conf
> configuration:
>
> service sieve-pipe-script {
>   executable = script /usr/bin/echo
>   user = dovenull
>
>   # socket name is program-name in Sieve
>   unix_listener sieve-pipe-example {
>   }
> }
>
> I cannot see where I am going wrong. I have combed through the
> specification at
> http://hg.rename-it.nl/dovecot-2.2-pigeonhole/raw-file/tip/doc/rfc/spec-bosch-sieve-extprograms.txt
> as well as the official Dovecot/Pigeonhole wiki-pages and cannot find a
> solution.
>
> If I omit the :args option (and the arguments array), the sieve script
> successfully gets accepted by ManageSieve.
>
> Am I encountering a potential bug or am I doing something silly in my test
> setup?
>
> # Dovecot version: v2.2.24
> # Pigeonhole version: v0.4.14
> # Operating system: CentOS Linux release 7.2.1511 (Core)
> # CPU architecture: x86_64
>
> # Dovecot -n output (I have filtered my IP addresses and mail server's
> FQDN):
>
> # 2.2.24 (a82c823): /usr/local/etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.14 (099a97c)
> # OS: Linux 3.10.0-327.18.2.el7.x86_64 x86_64 CentOS Linux release
> 7.2.1511 (Core)
> auth_default_realm = example.com
> base_dir = /var/run/dovecot/
> default_login_user = vpopmail
> first_valid_uid = 500
> info_log_path = /dev/stderr
> last_valid_uid = 500
> lda_mailbox_autocreate = yes
> lda_mailbox_autosubscribe = yes
> log_path = /dev/stderr
> mail_debug = yes
> mail_location = maildir:~/Maildir
> mail_max_userip_connections = 20
> mail_plugins = " fts fts_lucene"
> managesieve_notify_capability = mailto
> managesieve_sieve_capability = fileinto reject envelope encoded-character
> vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
> copy include variables body enotify environment mailbox date index ihave
> duplicate mime foreverypart extracttext editheader vnd.dovecot.pipe
> namespace inbox {
>   inbox = yes
>   location =
>   mailbox Drafts {
>     special_use = \Drafts
>   }
>   mailbox Junk {
>     special_use = \Junk
>   }
>   mailbox Sent {
>     special_use = \Sent
>   }
>   mailbox "Sent Messages" {
>     special_use = \Sent
>   }
>   mailbox Trash {
>     special_use = \Trash
>   }
>   prefix =
> }
> passdb {
>   driver = vpopmail
> }
> plugin {
>   fts = lucene
>   fts_autoindex = yes
>   fts_lucene = whitespace_chars=@.
>   sieve = file:~/sieve;active=~/.dovecot.sieve
>   sieve_execute_socket_dir = sieve-execute
>   sieve_extensions = +editheader +vnd.dovecot.pipe
>   sieve_pipe_socket_dir = sieve-pipe
>   sieve_plugins = sieve_extprograms
> }
> protocols = imap pop3 sieve
> service auth {
>   unix_listener auth-userdb {
>     group = vchkpw
>     mode = 0666
>     user = vpopmail
>   }
> }
> service imap-login {
>   inet_listener imap {
>     address = 127.0.0.1
>     port = 143
>     ssl = no
>   }
>   inet_listener imaps {
>     address = 192.168.1.1
>     port = 993
>     ssl = yes
>   }
> }
> service managesieve-login {
>   inet_listener sieve {
>     port = 4190
>   }
> }
> service pop3-login {
>   inet_listener pop3 {
>     address = 127.0.0.1
>     port = 110
>     ssl = no
>   }
>   inet_listener pop3s {
>     address = 192.168.1.1
>     port = 995
>     ssl = yes
>   }
> }
> service sieve-pipe-script {
>   executable = script /usr/bin/echo
>   group = dovenull
>   user = dovenull
> }
> ssl_cert = </etc/ssl/certs/example.com.crt
> ssl_key = </etc/ssl/certs/example.com.key
> ssl_protocols = !SSLv2 !SSLv3
> userdb {
>   driver = vpopmail
> }
> verbose_proctitle = yes
> protocol lda {
>   hostname = mail.example.com
>   info_log_path = /var/log/dovecot/dovecot-lda.log
>   log_path = /var/log/dovecot/dovecot-lda-errors.log
>   mail_plugins = " fts fts_lucene sieve"
>   postmaster_address = postmaster at example.com
> }
> protocol imap {
>   mail_plugins = " fts fts_lucene imap_zlib"
> }
>


More information about the dovecot mailing list