On 04/08/2015 05:53 PM, Patrick Lion wrote:
Hey folks,

ive already made a bug report in the gentoo bugtracker last year. In the
meantime after some releases the error persists with the current dovecot
and pigeonhole versions.

Please see my bug report at gentoo mailinglist:

https://bugs.gentoo.org/show_bug.cgi?id=522148

Okay, here are some informations:

Steps to Reproduce:

add "editheader" to sieve options or "sievec" a file that need the extension

if header :matches "Something" "*" {
addheader "Anything" "${1}";
deleteheader "Something";
}

sievec mod_header.sieve
sievec(root): Fatal: Plugin 'editheader' not found from directory
/usr/lib64/dovecot/sieve



dovecot --version
2.2.16

pigeonhole-0.4.7 sources got downloaded and used in the build process

dovecot -n

# 2.2.16: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.7
# OS: Linux 2.6.32-openvz-042stab102.9-amd64 x86_64 Gentoo Base System
release 2.2
auth_mechanisms = plain login
auth_socket_path = /var/run/dovecot/auth-userdb
auth_verbose = yes
dict {
   quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
imap_capability = CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE IDLE SORT
SORT=DISPLAY THREAD=REFERENCES THREAD=ORDEREDSUBJECT CHILDREN NAMESPACE
UIDPLUS LIST-EXTENDED CONTEXT=SEARCH LIST-STATUS SPECIAL-USE XLIST QUOTA
info_log_path = syslog
login_log_format_elements = user=<%u> method=%m ip=%r mpid=%e
mail_location = maildir:%h/.maildir
mail_plugins = quota
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
copy include body enotify environment mailbox date index ihave duplicate
imapflags notify
namespace compat {
   alias_for =
   hidden = yes
   inbox = no
   list = no
   location =
   prefix = INBOX.
   separator = .
}
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 =
   separator = /
}
passdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
plugin {
   args = /etc/dovecot/dovecot-sql.conf.ext
   quota = maildir
   quota_rule2 = trash:storage=+150M
   quota_warning = storage=95%% quota-warning 95 %u
   quota_warning2 = storage=80%% quota-warning 80 %u
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/sieve
   sieve_extensions = +notify +imapflags
   sieve_global_extensions = variables
}
postmaster_address = [email protected]
service auth {
   unix_listener /var/spool/postfix/private/auth {
     group = mail
     mode = 0660
     user = postfix
   }
   unix_listener auth-userdb {
     group = mail
     mode = 0660
     user = postfix
   }
}
service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = postfix
     mode = 0660
     user = postfix
   }
}
service quota-warning {
   executable = script /etc/postfix/quota-warning.sh
   unix_listener quota-warning {
     group = hosting
     mode = 0660
     user = postfix
   }
   user = postfix
}
ssl_cert = </etc/ssl/dovecot/server.pem
ssl_key = </etc/ssl/dovecot/server.key
userdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
protocol lda {
   mail_plugins = quota sieve
   postmaster_address = [email protected]
}
protocol imap {
   mail_plugins = quota imap_quota
}
protocol pop3 {
   mail_plugins = quota
}
protocol lmtp {
   hostname = dev.someserver
   mail_plugins = quota sieve
   postmaster_address = [email protected]
}


Please let me know if you need any additional informations, build logs (
log from 2.213 attached at bugs.gentoo.org ) or whatever may be helpful to
track this down.

I'm not using gentoo, but here on Debian everything works as expected.

eugene@hopper[pts/4]:~> locate editheader
/usr/share/doc/dovecot-core/sieve/extensions/editheader.txt

That is a txt version of
http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Editheader

eugene@hopper[pts/4]:~> doveconf -a | grep sieve
  sieve = ~/.sieve/.current
  sieve_dir = ~/.sieve
  sieve_global_dir = /etc/dovecot/sieve
  mail_plugins = " sieve

eugene@hopper[pts/4]:~> cat test.sieve
require ["editheader"];

if header :matches "Something" "*" {
addheader "Anything" "${1}";
deleteheader "Something";
}


Notice that require line.

eugene@hopper[pts/4]:~> sievec -d -x +editheader test.sieve -

* Script metadata (block: 0):

class = file
class.version = 0
location = /home/eugene/test.sieve

* Required extensions (block: 1):

  0: editheader (id: 30)

* Main program (block: 2):

Address   Line  Code
00000000:       DEBUG BLOCK: 3
00000001:       EXTENSIONS [1]:
00000002:         editheader
00000003:    3: HEADER
00000006:         match type: matches
00000009:         header names: STR[9] "Something"
00000015:         key list: STR[1] "*"
00000019:    3: JMPFALSE 39 [00000041]
0000001e:    4: addheader
00000020:         field-name: STR[8] "Anything"
0000002b:         value: STR[4] "${1}"
00000032:    5: DELETEHEADER
00000034:         field name: STR[9] "Something"
00000041:    5: [End of code]

--
Eugene Paskevich             |   *==)-----------   |     Plug me into
[email protected]        |   -----------(==*   |      The Matrix

Reply via email to