Hello, I am building a new server on CentOS 7 and the global sieve filter can not be loaded. The debug shows: Nov 9 15:23:09 mail dovecot: lmtp(11182, gao@mydomain.com): Debug: sieve: Pigeonhole version 0.4.2 initializing Nov 9 15:23:09 mail dovecot: lmtp(11182, gao@mydomain.com): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include `:global' scripts.
The pigeonhole version: # yum list dovecot-pigeonhole dovecot-pigeonhole.x86_64 1:2.2.10-8.el7
I googled and got confused on how to make sieve point to the correct global filter (which I want auto deliver spams to Junk folder). So what is the correct setting?
Thanks in advance.
Gao
Here is my doveconf -n output:
[root@mail ~]# doveconf -n # 2.2.10: /etc/dovecot/dovecot.conf # OS: Linux 3.10.0-693.5.2.el7.x86_64 x86_64 CentOS Linux release 7.4.1708 (Core) xfs auth_mechanisms = plain login cram-md5 first_valid_gid = 5000 first_valid_uid = 5000 last_valid_gid = 5000 last_valid_uid = 5000 listen = * mail_debug = yes mail_gid = 5000 mail_location = maildir:/home/vmail/%d/%n/:INDEX=/home/vmail/%d/%n/indexes mail_plugins = " quota" mail_uid = 5000 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 ihave mbox_write_locks = fcntl namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = } passdb { args = /etc/dovecot/conf.d/dovecot-mysql.conf.ext driver = sql } plugin { quota = maildir:User quota quota_exceeded_message = ERROR:422 - Mailbox full, sorry. quota_rule = Junk:ignore quota_rule2 = Trash:storage=+100M quota_warning = storage=90%% quota-warning 90 %u %d quota_warning2 = storage=80%% quota-warning 80 %u %d sieve = ~/sieve/.dovecot.sieve sieve_dir = ~/sieve sieve_global_path = /home/vmail/sieve/globalfilter.sieve sieve_max_script_size = 1M sievedir = ~/sieve } protocols = imap pop3 lmtp sieve service auth { unix_listener /var/spool/postfix/private/auth { group = vmail mode = 0666 user = vmail } } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } service managesieve-login { inet_listener sieve { port = 4190 } process_min_avail = 0 service_count = 1 vsz_limit = 64 M } service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } } service quota-warning { executable = script /usr/local/bin/overquota.sh group = vmail unix_listener quota-warning { group = vmail user = vmail } user = vmail } ssl = required ssl_cert = </etc/letsencrypt/live/mydomain.com/fullchain.pem ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4 ssl_key = </etc/letsencrypt/live/mydomain.com/privkey.pem ssl_prefer_server_ciphers = yes ssl_protocols = !SSLv2 !SSLv3 userdb { args = /etc/dovecot/conf.d/dovecot-mysql.conf.ext driver = sql } protocol lmtp { mail_plugins = " quota sieve" postmaster_address = postmaster@mydomain.com } protocol imap { mail_plugins = " quota imap_quota" } protocol sieve { managesieve_implementation_string = Dovecot Pigeonhole managesieve_max_compile_errors = 5 managesieve_max_line_length = 65536 }
Set the sieve_global_dir like this. /etc/dovecot/conf.d/99-mystuff.conf: . . plugin { sieve = ~/Maildir/dovecot.sieve sieve_dir = ~/Maildir/sieve sieve_global_dir = /etc/dovecot/sieve/global/ sieve_before = /etc/dovecot/sieve/before.d/ # sieve_before2 = # sieve_before3 = sieve_after = /etc/dovecot/sieve/after.d/ # sieve_after2 = # sieve_after3 =
fts = lucene fts_lucene = whitespace_chars=@. }
Permissions: drwxr-xr-x. 174 root root system_u:object_r:etc_t:s0 12288 Nov 9 11:43 /etc drwxr-xr-x. 4 root root system_u:object_r:dovecot_etc_t:s0 95 Apr 28 2016 /etc/dovecot drwxr-xr-x. 5 root root system_u:object_r:dovecot_etc_t:s0 64 Jul 13 2015 /etc/dovecot/sieve drwxr-xr-x. 2 root root system_u:object_r:dovecot_etc_t:s0 10 Jul 13 2015 /etc/dovecot/sieve/global
Since this directory is read-only to all but root, pre-complie your scripts with 'sievec'.
Bill
On 11/9/2017 6:39 PM, Gao wrote:
Hello, I am building a new server on CentOS 7 and the global sieve filter can not be loaded. The debug shows: Nov 9 15:23:09 mail dovecot: lmtp(11182, gao@mydomain.com): Debug: sieve: Pigeonhole version 0.4.2 initializing Nov 9 15:23:09 mail dovecot: lmtp(11182, gao@mydomain.com): Debug: sieve: include: sieve_global_dir is not set; it is currently not possible to include `:global' scripts.
The pigeonhole version: # yum list dovecot-pigeonhole dovecot-pigeonhole.x86_64 1:2.2.10-8.el7
I googled and got confused on how to make sieve point to the correct global filter (which I want auto deliver spams to Junk folder). So what is the correct setting?
Thanks in advance.
Gao
Here is my doveconf -n output:
[root@mail ~]# doveconf -n # 2.2.10: /etc/dovecot/dovecot.conf # OS: Linux 3.10.0-693.5.2.el7.x86_64 x86_64 CentOS Linux release 7.4.1708 (Core) xfs auth_mechanisms = plain login cram-md5 first_valid_gid = 5000 first_valid_uid = 5000 last_valid_gid = 5000 last_valid_uid = 5000 listen = * mail_debug = yes mail_gid = 5000 mail_location = maildir:/home/vmail/%d/%n/:INDEX=/home/vmail/%d/%n/indexes mail_plugins = " quota" mail_uid = 5000 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 ihave mbox_write_locks = fcntl namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = } passdb { args = /etc/dovecot/conf.d/dovecot-mysql.conf.ext driver = sql } plugin { quota = maildir:User quota quota_exceeded_message = ERROR:422 - Mailbox full, sorry. quota_rule = Junk:ignore quota_rule2 = Trash:storage=+100M quota_warning = storage=90%% quota-warning 90 %u %d quota_warning2 = storage=80%% quota-warning 80 %u %d sieve = ~/sieve/.dovecot.sieve sieve_dir = ~/sieve sieve_global_path = /home/vmail/sieve/globalfilter.sieve sieve_max_script_size = 1M sievedir = ~/sieve } protocols = imap pop3 lmtp sieve service auth { unix_listener /var/spool/postfix/private/auth { group = vmail mode = 0666 user = vmail } } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } service managesieve-login { inet_listener sieve { port = 4190 } process_min_avail = 0 service_count = 1 vsz_limit = 64 M } service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } } service quota-warning { executable = script /usr/local/bin/overquota.sh group = vmail unix_listener quota-warning { group = vmail user = vmail } user = vmail } ssl = required ssl_cert = </etc/letsencrypt/live/mydomain.com/fullchain.pem ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4 ssl_key = </etc/letsencrypt/live/mydomain.com/privkey.pem ssl_prefer_server_ciphers = yes ssl_protocols = !SSLv2 !SSLv3 userdb { args = /etc/dovecot/conf.d/dovecot-mysql.conf.ext driver = sql } protocol lmtp { mail_plugins = " quota sieve" postmaster_address = postmaster@mydomain.com } protocol imap { mail_plugins = " quota imap_quota" } protocol sieve { managesieve_implementation_string = Dovecot Pigeonhole managesieve_max_compile_errors = 5 managesieve_max_line_length = 65536 }
On Thu, 9 Nov 2017 21:02:44 -0500 Bill Shirley <bill@KnoxvilleChristian.org> wrote:
Set the sieve_global_dir like this. /etc/dovecot/conf.d/99-mystuff.conf: . . plugin { sieve = ~/Maildir/dovecot.sieve sieve_dir = ~/Maildir/sieve sieve_global_dir = /etc/dovecot/sieve/global/ sieve_before = /etc/dovecot/sieve/before.d/ # sieve_before2 = # sieve_before3 = sieve_after = /etc/dovecot/sieve/after.d/ # sieve_after2 = # sieve_after3 =
fts = lucene fts_lucene = whitespace_chars=@. }
Permissions: drwxr-xr-x. 174 root root system_u:object_r:etc_t:s0 12288 Nov 9 11:43 /etc drwxr-xr-x. 4 root root system_u:object_r:dovecot_etc_t:s0 95 Apr 28 2016 /etc/dovecot drwxr-xr-x. 5 root root system_u:object_r:dovecot_etc_t:s0 64 Jul 13 2015 /etc/dovecot/sieve drwxr-xr-x. 2 root root system_u:object_r:dovecot_etc_t:s0 10 Jul 13 2015 /etc/dovecot/sieve/global
Since this directory is read-only to all but root, pre-complie your scripts with 'sievec'.
Bill
... And don't follow this example setting sieve_dir inside your maildirs. This will lead to the dir being shown as imap folder which you don't want. Simply put out it outside and everything is fine.
-- Regards, Stephan
No it isn't shown as a folder. All folder directories here begin with a dot. i.e. .INBOX .Trash .Drafts
Bill
On 11/10/2017 3:07 AM, Stephan von Krawczynski wrote:
On Thu, 9 Nov 2017 21:02:44 -0500 Bill Shirley <bill@KnoxvilleChristian.org> wrote:
Set the sieve_global_dir like this. /etc/dovecot/conf.d/99-mystuff.conf: . . plugin { sieve = ~/Maildir/dovecot.sieve sieve_dir = ~/Maildir/sieve sieve_global_dir = /etc/dovecot/sieve/global/ sieve_before = /etc/dovecot/sieve/before.d/ # sieve_before2 = # sieve_before3 = sieve_after = /etc/dovecot/sieve/after.d/ # sieve_after2 = # sieve_after3 =
fts = lucene fts_lucene = whitespace_chars=@. }
Permissions: drwxr-xr-x. 174 root root system_u:object_r:etc_t:s0 12288 Nov 9 11:43 /etc drwxr-xr-x. 4 root root system_u:object_r:dovecot_etc_t:s0 95 Apr 28 2016 /etc/dovecot drwxr-xr-x. 5 root root system_u:object_r:dovecot_etc_t:s0 64 Jul 13 2015 /etc/dovecot/sieve drwxr-xr-x. 2 root root system_u:object_r:dovecot_etc_t:s0 10 Jul 13 2015 /etc/dovecot/sieve/global
Since this directory is read-only to all but root, pre-complie your scripts with 'sievec'.
Bill ... And don't follow this example setting sieve_dir inside your maildirs. This will lead to the dir being shown as imap folder which you don't want. Simply put out it outside and everything is fine.
On Fri, 10 Nov 2017 03:41:20 -0500 Bill Shirley <bill@KnoxvilleChristian.org> wrote:
No it isn't shown as a folder. All folder directories here begin with a dot. i.e. .INBOX .Trash .Drafts
Bill
No, they don't. me thought that, too. But using the rainloop webmail interface on top of such a config showed the sieve folder in the overview. Sometimes you can even see a "dovecot" folder, which also disappears when sieve is outside.
-- Regards, Stephan
On 11/10/2017 3:07 AM, Stephan von Krawczynski wrote:
On Thu, 9 Nov 2017 21:02:44 -0500 Bill Shirley <bill@KnoxvilleChristian.org> wrote:
Set the sieve_global_dir like this. /etc/dovecot/conf.d/99-mystuff.conf: . . plugin { sieve = ~/Maildir/dovecot.sieve sieve_dir = ~/Maildir/sieve sieve_global_dir = /etc/dovecot/sieve/global/ sieve_before = /etc/dovecot/sieve/before.d/ # sieve_before2 = # sieve_before3 = sieve_after = /etc/dovecot/sieve/after.d/ # sieve_after2 = # sieve_after3 =
fts = lucene fts_lucene = whitespace_chars=@. }
Permissions: drwxr-xr-x. 174 root root system_u:object_r:etc_t:s0 12288 Nov 9 11:43 /etc drwxr-xr-x. 4 root root system_u:object_r:dovecot_etc_t:s0 95 Apr 28 2016 /etc/dovecot drwxr-xr-x. 5 root root system_u:object_r:dovecot_etc_t:s0 64 Jul 13 2015 /etc/dovecot/sieve drwxr-xr-x. 2 root root system_u:object_r:dovecot_etc_t:s0 10 Jul 13 2015 /etc/dovecot/sieve/global
Since this directory is read-only to all but root, pre-complie your scripts with 'sievec'.
Bill
... And don't follow this example setting sieve_dir inside your maildirs. This will lead to the dir being shown as imap folder which you don't want. Simply put out it outside and everything is fine.
Stephan von Krawczynski wrote on 10.11.2017 16:35:
On Fri, 10 Nov 2017 03:41:20 -0500 Bill Shirley <bill@KnoxvilleChristian.org> wrote:
No it isn't shown as a folder. All folder directories here begin with a dot. i.e. .INBOX .Trash .Drafts
Bill No, they don't. me thought that, too. But using the rainloop webmail interface on top of such a config showed the sieve folder in the overview. Sometimes you can even see a "dovecot" folder, which also disappears when sieve is outside.
-- Regards, Stephan
On 11/10/2017 3:07 AM, Stephan von Krawczynski wrote:
On Thu, 9 Nov 2017 21:02:44 -0500 Bill Shirley <bill@KnoxvilleChristian.org> wrote:
Set the sieve_global_dir like this. /etc/dovecot/conf.d/99-mystuff.conf: . . plugin { sieve = ~/Maildir/dovecot.sieve sieve_dir = ~/Maildir/sieve sieve_global_dir = /etc/dovecot/sieve/global/ sieve_before = /etc/dovecot/sieve/before.d/ # sieve_before2 = # sieve_before3 = sieve_after = /etc/dovecot/sieve/after.d/ # sieve_after2 = # sieve_after3 =
fts = lucene fts_lucene = whitespace_chars=@. }
Permissions: drwxr-xr-x. 174 root root system_u:object_r:etc_t:s0 12288 Nov 9 11:43 /etc drwxr-xr-x. 4 root root system_u:object_r:dovecot_etc_t:s0 95 Apr 28 2016 /etc/dovecot drwxr-xr-x. 5 root root system_u:object_r:dovecot_etc_t:s0 64 Jul 13 2015 /etc/dovecot/sieve drwxr-xr-x. 2 root root system_u:object_r:dovecot_etc_t:s0 10 Jul 13 2015 /etc/dovecot/sieve/global
Since this directory is read-only to all but root, pre-complie your scripts with 'sievec'.
Bill ... And don't follow this example setting sieve_dir inside your maildirs. This will lead to the dir being shown as imap folder which you don't want. Simply put out it outside and everything is fine.
Excactly the same happens with Roundcube (at least v.1.2): The Sieve folder shows up in the Folder View.
I just checked with Thunderbird, SquirrelMail, and Roundcube. The sieve directory is not in the overview.
dovecot is highly configurable. Ya think I may have configured mine where this is not a problem? I have 9+ mail servers running this way.
Bill
On 11/10/2017 4:56 AM, Tamsy wrote:
Stephan von Krawczynski wrote on 10.11.2017 16:35:
On Fri, 10 Nov 2017 03:41:20 -0500 Bill Shirley <bill@KnoxvilleChristian.org> wrote:
No it isn't shown as a folder. All folder directories here begin with a dot. i.e. .INBOX .Trash .Drafts
Bill No, they don't. me thought that, too. But using the rainloop webmail interface on top of such a config showed the sieve folder in the overview. Sometimes you can even see a "dovecot" folder, which also disappears when sieve is outside.
-- Regards, Stephan
On 11/10/2017 3:07 AM, Stephan von Krawczynski wrote:
On Thu, 9 Nov 2017 21:02:44 -0500 Bill Shirley <bill@KnoxvilleChristian.org> wrote:
Set the sieve_global_dir like this. /etc/dovecot/conf.d/99-mystuff.conf: . . plugin { sieve = ~/Maildir/dovecot.sieve sieve_dir = ~/Maildir/sieve sieve_global_dir = /etc/dovecot/sieve/global/ sieve_before = /etc/dovecot/sieve/before.d/ # sieve_before2 = # sieve_before3 = sieve_after = /etc/dovecot/sieve/after.d/ # sieve_after2 = # sieve_after3 =
fts = lucene fts_lucene = whitespace_chars=@. }
Permissions: drwxr-xr-x. 174 root root system_u:object_r:etc_t:s0 12288 Nov 9 11:43 /etc drwxr-xr-x. 4 root root system_u:object_r:dovecot_etc_t:s0 95 Apr 28 2016 /etc/dovecot drwxr-xr-x. 5 root root system_u:object_r:dovecot_etc_t:s0 64 Jul 13 2015 /etc/dovecot/sieve drwxr-xr-x. 2 root root system_u:object_r:dovecot_etc_t:s0 10 Jul 13 2015 /etc/dovecot/sieve/global
Since this directory is read-only to all but root, pre-complie your scripts with 'sievec'.
Bill ... And don't follow this example setting sieve_dir inside your maildirs. This will lead to the dir being shown as imap folder which you don't want. Simply put out it outside and everything is fine. Excactly the same happens with Roundcube (at least v.1.2): The Sieve folder shows up in the Folder View.
Am 10.11.2017 um 11:57 schrieb Bill Shirley:
I just checked with Thunderbird, SquirrelMail, and Roundcube. The sieve directory is not in the overview.
dovecot is highly configurable. Ya think I may have configured mine where this is not a problem? I have 9+ mail servers running this way.
Do you have 'maildir_stat_dirs=yes'? Without it non-mailbox files may show up as mailboxes. See:
https://wiki.dovecot.org/VirtualUsers/Home#Home_vs._mail_directory
-- Alex JOST
Alex, that's good to know.
The defaults for Fedora: [0:root@elmo squid]$ doveconf | grep maildir_stat_dirs maildir_stat_dirs = no [0:root@elmo squid]$ grep maildir_stat_dirs /etc/dovecot/conf.d/* /etc/dovecot/conf.d/10-mail.conf:#maildir_stat_dirs = no
I haven't overridden it. All my changes are in /etc/dovecot/conf.d/99-mystuff.conf except for 10-ssl.conf where I commented out ssl_cert & ssl_key.
Like I said, I'm not having a problem with anything unwanted showing up: [0:root@elmo squid]$ ls /home/bill/Maildir/ cur dovecot.index.log.2 dovecot.list.index.log dovecot.svbin maildir.dovecot.purge.conf shared-maildirs dovecot.index dovecot.index.thread dovecot.list.index.log.2 dovecot-uidlist maildir.purge.conf.bak sieve dovecot.index.cache dovecot-keywords dovecot.mailbox.log dovecot-uidvalidity new subscriptions dovecot.index.log dovecot.list.index dovecot.sieve dovecot-uidvalidity.50841ad2 shared-folders tmp
Bill
On 11/10/2017 6:06 AM, Alex JOST wrote:
Am 10.11.2017 um 11:57 schrieb Bill Shirley:
I just checked with Thunderbird, SquirrelMail, and Roundcube. The sieve directory is not in the overview.
dovecot is highly configurable. Ya think I may have configured mine where this is not a problem? I have 9+ mail servers running this way.
Do you have 'maildir_stat_dirs=yes'? Without it non-mailbox files may show up as mailboxes. See:
https://wiki.dovecot.org/VirtualUsers/Home#Home_vs._mail_directory
participants (5)
-
Alex JOST
-
Bill Shirley
-
Gao
-
Stephan von Krawczynski
-
Tamsy