[Dovecot] Sieve was installed but doesn't work or log
Hello everyone.
I have dovecot version 1.2.8 installed from source. This morning I installed the sieve plugin to sort emails, and though the install reported no errors, the plugin doesn't seem to function, and no mention of it is made in the logs when I turn on verbose logging.
dovecot --version 1.2.8
dovecot -n
# 1.2.8: /usr/local/etc/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0 base_dir: /usr/local/var/run/dovecot/ log_path: /dev/stderr info_log_path: /dev/stderr log_timestamp: protocols: imap imaps pop3s listen(default): 127.0.0.1:143 listen(imap): 127.0.0.1:143 listen(pop3): * ssl_listen(default): 192.168.1.1:993 ssl_listen(imap): 192.168.1.1:993 ssl_listen(pop3): 192.168.1.1:995 ssl_cert_file: /var/qmail/control/servercert.pem ssl_key_file: /var/qmail/control/servercert.pem ssl_cipher_list: ALL:!LOW verbose_ssl: yes login_dir: /usr/local/var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login verbose_proctitle: yes first_valid_uid: 89 last_valid_uid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 pop3_uidl_format(default): %08Xu%08Xv pop3_uidl_format(imap): %08Xu%08Xv pop3_uidl_format(pop3): %v-%u namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmaster@mail.domain.com hostname: mail.domain.com mail_plugins: sieve mail_plugin_dir: /usr/local/lib/dovecot/lda deliver_log_format: msgid=%m: %$ sieve: /home/vpopmail/domains/%d/%n/sieve sieve_global_path: /usr/local/etc/default.sieve log_path: /var/log/qmail/sieve/dovecot.log info_log_path: /var/log/qmail/sieve/dovecot.log auth default: user: vpopmail passdb: driver: vpopmail userdb: driver: vpopmail plugin: quota: maildir
Here is the config.log from sieve
root@myplace:/usr/local# head dovecot-1.2-sieve-0.1.19/config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.
It was created by Dovecot Sieve configure 0.1.19, which was generated by GNU Autoconf 2.67. Invocation command line was
$ ./configure --with-dovecot=../dovecot-1.2.8/
That compiled cleanly, then make and make install also proceeded without error.
With verbose logging enabled, the only times "sieve" appeared in the logs was when I tried to load it as a plugin for imap -
grep sieve /var/log/qmail/qmail-dovecot/current |tai64nlocal 2013-05-14 09:20:05.091635500 FPlugin sieve not found from directory /usr/local/lib/dovecot/imap 2013-05-14 09:20:06.120848500 FPlugin sieve not found from directory /usr/local/lib/dovecot/imap 2013-05-14 09:20:07.142465500 FPlugin sieve not found from directory /usr/local/lib/dovecot/imap 2013-05-14 09:20:08.164247500 FPlugin sieve not found from directory /usr/local/lib/dovecot/imap
Once I removed it from being loaded as an imap plugin and used it only as an lda plugin, it hasn't appeared in the dovecot logs. It also isn't logging where I asked it to in the config file (log_path: /var/log/qmail/sieve/dovecot.log, or info_log_path: /var/log/qmail/sieve/dovecot.log), but that files was touched and all directories below /var/log/qmail/sieve have the correct permissions for dovecot to write there:
ls -al /var/log/qmail/sieve/ total 16 drwxr-xr-x 2 dovecot dovecot 4096 May 14 11:04 . drwxr-xr-x 7 qmaill root 12288 May 14 11:04 .. -rw-r--r-- 1 dovecot dovecot 0 May 14 11:04 dovecot.log
Can anyone suggest an error they see or what I can do to get my errors with the sieve config logged somewhere?
Thanks for your help and insight.
On Tue, 2013-05-14 at 12:49 -0400, Jim McNamara wrote:
Hello everyone.
I have dovecot version 1.2.8 installed from source. This morning I installed the sieve plugin to sort emails, and though the install reported no errors, the plugin doesn't seem to function, and no mention of it is made in the logs when I turn on verbose logging.
with version 1.2.x I always found cmusieve to behave nicer.
Though, if you are installing from source, why the hell are you using something so old? 1.2.17 is the latest in the now unsupported 1.2 series, but if you are building from source, try 2.1.16 and dovecot-2.1-pigeonhole-0.3.5, I've only recently (months ago) moved to 2.1 from 1.2, and it appears smoother, and lot of niggly things like hung *-login processes on busy servers have gone away, without bench testing, I'd even say its more resource friendly (at least in NFS (without director) configurations)
Are you sure your sieve scripts are valid? do they get compiled?
On 05/14/2013 06:55 PM, Noel Butler wrote:
On Tue, 2013-05-14 at 12:49 -0400, Jim McNamara wrote:
Hello everyone.
I have dovecot version 1.2.8 installed from source. This morning I installed the sieve plugin to sort emails, and though the install reported no errors, the plugin doesn't seem to function, and no mention of it is made in the logs when I turn on verbose logging.
with version 1.2.x I always found cmusieve to behave nicer.
Though, if you are installing from source, why the hell are you using something so old? 1.2.17 is the latest in the now unsupported 1.2 series, but if you are building from source, try 2.1.16 and dovecot-2.1-pigeonhole-0.3.5, I've only recently (months ago) moved to 2.1 from 1.2, and it appears smoother, and lot of niggly things like hung *-login processes on busy servers have gone away, without bench testing, I'd even say its more resource friendly (at least in NFS (without director) configurations)
Are you sure your sieve scripts are valid? do they get compiled?
I believe in the past there was some issues with newer dovecot when using qmail and vpopmail, but it has been years since I tried it. I'll compile the source this morning and see if I can get deliveries to work without sieve, then I'll proceed with the pigeonhole install.
My sieve script passed the test on http://libsieve-php.sourceforge.net/ , they are not complicated scripts at all, literally if sender is A, move to subfolder A of inbox. It was just for testing. The reason I assumed there was a problem was the complete lack of logging. Also when I moved the default sieve script:
sieve_global_path: /usr/local/etc/default.sieve
and the user script:
sieve: /home/vpopmail/domains/%d/%n/sieve
there was no logging that indicated sieve couldn't run because of a lack of any sieve scripts. That plus the single sorting rule not working quickly made me think sieve simply didn't install or work.
Thank you for the help, I'll post back with the success/failure of a more recent version.
On 05/15/2013 08:55 AM, Jim McNamara wrote:
On 05/14/2013 06:55 PM, Noel Butler wrote:
On Tue, 2013-05-14 at 12:49 -0400, Jim McNamara wrote:
Hello everyone.
I have dovecot version 1.2.8 installed from source. This morning I installed the sieve plugin to sort emails, and though the install reported no errors, the plugin doesn't seem to function, and no mention of it is made in the logs when I turn on verbose logging.
with version 1.2.x I always found cmusieve to behave nicer.
Though, if you are installing from source, why the hell are you using something so old? 1.2.17 is the latest in the now unsupported 1.2 series, but if you are building from source, try 2.1.16 and dovecot-2.1-pigeonhole-0.3.5, I've only recently (months ago) moved to 2.1 from 1.2, and it appears smoother, and lot of niggly things like hung *-login processes on busy servers have gone away, without bench testing, I'd even say its more resource friendly (at least in NFS (without director) configurations)
Are you sure your sieve scripts are valid? do they get compiled?
I believe in the past there was some issues with newer dovecot when using qmail and vpopmail, but it has been years since I tried it. I'll compile the source this morning and see if I can get deliveries to work without sieve, then I'll proceed with the pigeonhole install.
My sieve script passed the test on http://libsieve-php.sourceforge.net/ , they are not complicated scripts at all, literally if sender is A, move to subfolder A of inbox. It was just for testing. The reason I assumed there was a problem was the complete lack of logging. Also when I moved the default sieve script:
sieve_global_path: /usr/local/etc/default.sieve
and the user script:
sieve: /home/vpopmail/domains/%d/%n/sieve
there was no logging that indicated sieve couldn't run because of a lack of any sieve scripts. That plus the single sorting rule not working quickly made me think sieve simply didn't install or work.
Thank you for the help, I'll post back with the success/failure of a more recent version.
Thank you for the solid suggestion, Noel! I now have Dovecot 2.2.1 along with Pigeonhole 0.4.0. All is working well at present. The largest issues I encountered was getting the configuration changed and functional from my previous 1.2.8 to 2.0. Once that was accomplished things more or less proceeded well. Managesieve works wonderfully, can dovecot creates the .sieve directory and its subdirectory .sieve/tmp correctly, the thunderbird plugin for sieve is able to connect and everything works, compilation happens automatically and the sieve scripts are functional.
I use John Simpson's Qmail patch/setup on the server, I wasn't able to find a current dovecot config that worked with vpopmail without mysql. Here is my current config which works for me in this setup:
root@hostname:/home/jim# doveconf -n # 2.2.1: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0 auth_cache_size = 10 M auth_default_realm = mail.domain.com auth_mechanisms = plain login auth_socket_path = /usr/local/var/run/dovecot/auth-userdb default_internal_user = vpopmail default_login_user = vpopmail first_valid_gid = 89 first_valid_uid = 89 hostname = mail.domain.com last_valid_gid = 89 last_valid_uid = 89 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes log_path = /dev/stderr mail_access_groups = 89 mail_gid = 89 mail_location = maildir:%h/Maildir mail_plugins = " quota" mail_privileged_group = 89 mail_uid = 89 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 spamtest spamtestplus namespace inbox { inbox = yes location = prefix = separator = . } passdb { driver = vpopmail } plugin { sieve = ~/.sieve/dovecot.sieve sieve_dir = ~/.sieve sieve_extensions = +spamtest +spamtestplus +relational +comparator-i;ascii-numeric } postmaster_address = postmaster@mail.domain.com protocols = imap pop3 lmtp sieve sendmail_path = /var/qmail/bin/sendmail service auth-worker { user = $default_internal_user } service auth { unix_listener auth-userdb { group = vchkpw mode = 0600 user = vpopmail } user = $default_internal_user } service managesieve-login { inet_listener sieve { port = 4190 } service_count = 1 vsz_limit = 64 M } ssl = required ssl_cert = </var/qmail/control/servercert.pem ssl_key = </var/qmail/control/servercert.priv userdb { args = quota_template=quota_rule=*:backend=%q driver = vpopmail } protocol lda { mail_plugins = " quota sieve" } protocol imap { mail_plugins = " quota imap_quota" } protocol pop3 { mail_plugins = " quota quota" }
On Fri, 2013-05-17 at 10:47 -0400, Jim McNamara wrote:
Thank you for the solid suggestion, Noel! I now have Dovecot 2.2.1 along with Pigeonhole 0.4.0. All is working well at present. The largest issues I encountered was getting the configuration changed and functional from my previous 1.2.8 to 2.0. Once that was accomplished things more or less proceeded well. Managesieve works wonderfully, can dovecot creates the .sieve directory and its subdirectory .sieve/tmp correctly, the thunderbird plugin for sieve is able to connect and everything works, compilation happens automatically and the sieve scripts are functional.
I use John Simpson's Qmail patch/setup on the server, I wasn't able to find a current dovecot config that worked with vpopmail without mysql. Here is my current config which works for me in this setup:
No problems Jim, glad it's all sorted.
participants (2)
-
Jim McNamara
-
Noel Butler