Thomas Leuxner
2011-Dec-22  11:29 UTC
[Dovecot] Global Sieve Script Includes no longer works with 056934abd2ef
Latest Dovecot Auto-Build 2.1.rc1-0~auto+42 (056934abd2ef) fails to include
global Sieve Scripts. Not sure this is specific to Stephan's Repository.
Rolling back to older version restores functionality.
==> /var/log/dovecot/dovecot.log <=Dec 22 12:13:52 spectre dovecot:
lmtp(32246): Connect from local
Dec 22 12:13:52 spectre dovecot: lmtp(32246, tlx at leuxner.net): Error:
jo99GvAQ8072fQAAqZii3w: sieve: failed to open script
/var/vmail/domains/leuxner.net/tlx/.dovecot.sieve (view user logfile
/var/vmail/domains/leuxner.net/tlx/.dovecot.sieve.log for more information)
Dec 22 12:13:52 spectre dovecot: lmtp(32246, tlx at leuxner.net):
jo99GvAQ8072fQAAqZii3w: msgid=<4EF310E0.6030006 at Media-Brokers.com>:
saved mail to INBOX
$ cat /var/vmail/domains/leuxner.net/tlx/.dovecot.sieve.log
sieve: info: started log at Dec 22 12:13:52.
main_script: line 2: error: included global script 'global.sieve' does
not exist.
main_script: error: validation failed.
[ Script Calling Global ]
$ head /var/vmail/domains/leuxner.net/tlx/.dovecot.sieve
require
["include","copy","fileinto","vacation"];
include :global "global.sieve";
[?]
$ ls -al /var/vmail/conf.d/leuxner.net/sieve/
total 12
dr-x------ 2 vmail vmail 4096 Dec  7 15:09 .
dr-x------ 4 vmail vmail 4096 Mar 17  2010 ..
-r-------- 1 vmail vmail 3647 Dec  7 15:09 global.sieve
$ doveconf -n
# 2.1.rc1 (056934abd2ef): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.3 
auth_cache_size = 16 k
auth_verbose = yes
mail_location = mdbox:~/mdbox
mail_plugins = acl quota stats
namespace {
  list = yes
  location = mdbox:/var/vmail/public
  prefix = Public/
  separator = /
  subscriptions = no
  type = public
}
namespace inbox {
  hidden = no
  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 = /
  type = private
}
passdb {
  args = username_format=%u /var/vmail/auth.d/%d/passwd
  driver = passwd-file
}
plugin {
  acl = vfile:/var/vmail/conf.d/%d/acls:cache_secs=300
  mail_log_events = expunge mailbox_delete
  quota = dict:user::file:%h/mdbox/dovecot-quota
  quota_rule = *:storage=1GB
  quota_rule2 = Trash:storage=+10%%
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /var/vmail/conf.d/%d/sieve
   stats_refresh = 30s
  stats_track_cmds = yes
}
protocols = imap lmtp
quota_full_tempfail = yes
service auth-worker {
  user = doveauth
}
service auth {
  client_limit = 1224
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  user = doveauth
}
service imap-login {
  inet_listener imap {
    address = 1.2.3.4
    port = 143
  }
  inet_listener imaps {
    port = 0
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service stats {
  fifo_listener stats-mail {
    mode = 0600
    user = vmail
  }
}
ssl_ca = </etc/ssl/certs/SSL123_CA_Bundle.pem
ssl_cert = </etc/ssl/certs/host_domain_tld.crt
ssl_key = </etc/ssl/private/host_domain_tld.key
syslog_facility = local1
userdb {
  args = username_format=%u /var/vmail/auth.d/%d/passwd
  driver = passwd-file
}
verbose_proctitle = yes
protocol lmtp {
  mail_plugins = acl quota stats sieve
}
protocol imap {
  mail_plugins = acl quota stats imap_acl imap_quota mail_log notify imap_stats
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20111222/262585a0/attachment-0004.bin>
Stephan Bosch
2011-Dec-22  11:59 UTC
[Dovecot] Global Sieve Script Includes no longer works with 056934abd2ef
On 12/22/2011 12:29 PM, Thomas Leuxner wrote:> Latest Dovecot Auto-Build 2.1.rc1-0~auto+42 (056934abd2ef) fails to include global Sieve Scripts. Not sure this is specific to Stephan's Repository. Rolling back to older version restores functionality. > > ==> /var/log/dovecot/dovecot.log<=> Dec 22 12:13:52 spectre dovecot: lmtp(32246): Connect from local > Dec 22 12:13:52 spectre dovecot: lmtp(32246, tlx at leuxner.net): Error: jo99GvAQ8072fQAAqZii3w: sieve: failed to open script /var/vmail/domains/leuxner.net/tlx/.dovecot.sieve (view user logfile /var/vmail/domains/leuxner.net/tlx/.dovecot.sieve.log for more information) > Dec 22 12:13:52 spectre dovecot: lmtp(32246, tlx at leuxner.net): jo99GvAQ8072fQAAqZii3w: msgid=<4EF310E0.6030006 at Media-Brokers.com>: saved mail to INBOX > > $ cat /var/vmail/domains/leuxner.net/tlx/.dovecot.sieve.log > sieve: info: started log at Dec 22 12:13:52. > main_script: line 2: error: included global script 'global.sieve' does not exist. > main_script: error: validation failed.The fact that << include "global.sieve"; >> and << include "global"; >> would map to the same script file `global.sieve' is not intended behavior and I fixed this in a recent change: http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/66b7b1636c8c I had the impression that this was already documented/announced in the migration instructions from CMUSieve, but apparently these don't tell the whole story: http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#From_CMUSieve_.28Dovecot_v1.0.2BAC8-v1.1.29 That is why I didn't explicitly announce this change. The .sieve extension only has significance in the filesystem (to make sure that the Sieve interpreter refuses to open anything but Sieve scripts). When specified in the Sieve language, that extension would just be part of the script name, meaning that << include "global.sieve"; >> maps to `global.sieve.sieve' on the filesystem. So, in your case using << include :global "global"; >> should fix it. Because it is technically a bugfix, it is also due to be released for Dovecot v2.0. Is it a big problem to change your include instructions? Is anyone else depending on this unintended feature? Regards, Stephan.