[Dovecot] sieve filters not being invoked
Hi all,
Similar to someone who posted here yesterday, I am having trouble getting sieve filters working.
I have installed pigeonhole. I can create, edit, and save scripts from both the Thunderbird sieve extension as well as the Roundcube sieve plugin via managesieve running on port 4190. The .sieve file is properly saved in ~/sieve with a symlink from ~/.dovecot.sieve.
But the filters are not being invoked on incoming mail. I have mail_debug enabled, but I don't see anything useful in /var/log/dovecot.
Anyone have any ideas?
Thanks
$ dovecot -n # 2.0.11: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.1-RELEASE amd64 ufs auth_verbose = yes base_dir = /var/run/dovecot/ disable_plaintext_auth = no first_valid_gid = 0 info_log_path = /var/log/dovecot log_path = /var/log/dovecot mail_access_groups = mail mail_debug = yes mail_location = maildir:/home/colin/vmail/%d/%n 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 passdb { args = /usr/local/etc/dovecot-passwd driver = passwd-file } plugin/sieve = ~/.dovecot.sieve plugin/sieve_dir = ~/sieve plugin/sieve_global_dir = /var/lib/dovecot/sieve/global/ plugin/sieve_global_path = /var/lib/dovecot/sieve/default.sieve protocols = imap sieve service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-master { group = mail mode = 0660 user = vmail } user = root } service imap-login { executable = /usr/local/libexec/dovecot/imap-login vsz_limit = 64 M } service managesieve-login { inet_listener sieve { port = 4190 } } service pop3-login { executable = /usr/local/libexec/dovecot/imap-login vsz_limit = 64 M } ssl_cert =
Colin Brace Amsterdam http://lim.nl
View this message in context: http://old.nabble.com/sieve-filters-not-being-invoked-tp31569757p31569757.ht... Sent from the Dovecot mailing list archive at Nabble.com.
Op 8-5-2011 11:56, Colin Brace schreef:
Hi all,
Similar to someone who posted here yesterday, I am having trouble getting sieve filters working.
I have installed pigeonhole. I can create, edit, and save scripts from both the Thunderbird sieve extension as well as the Roundcube sieve plugin via managesieve running on port 4190. The .sieve file is properly saved in ~/sieve with a symlink from ~/.dovecot.sieve.
But the filters are not being invoked on incoming mail. I have mail_debug enabled, but I don't see anything useful in /var/log/dovecot.
Anyone have any ideas?
Is your MTA storing messages using the Dovecot LDA (http://wiki2.dovecot.org/LDA) ? Check that thoroughly. Enable mail_debug to get more verbose logs. To definitively check whether Sieve is working or not, you can invoke dovecot-lda manually. If it works then, the problem most likely lies with your MTA.
At my end, the logs look as follows (manual invocation, mail_debug=yes):
May 9 11:08:34 host dovecot: lda: Debug: Loading modules from directory: /usr/lib/dovecot/modules May 9 11:08:34 host dovecot: lda: Debug: Module loaded: /usr/lib/dovecot/modules/lib90_sieve_plugin.so May 9 11:08:34 host dovecot: lda(stephan): Debug: Effective uid=1011, gid=1011, home=/home/stephan May 9 11:08:34 host dovecot: lda(stephan): Debug: maildir: root exists (/home/stephan/Maildir) May 9 11:08:34 host dovecot: lda(stephan): Debug: maildir++: root=/home/stephan/Maildir, index=, control=, inbox=/home/stephan/Maildir May 9 11:08:34 host dovecot: lda(stephan): Debug: userdb lookup skipped, username taken from USER environment May 9 11:08:34 host dovecot: lda(stephan): Debug: none: root=, index=, control=, inbox= May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: using sieve path for user's script: /home/stephan/.dovecot.sieve May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: opening script /home/stephan/.dovecot.sieve May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: script binary /home/stephan/.dovecot.svbin successfully loaded May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: binary save: not saving binary /home/stephan/.dovecot.svbin, because it is already stored May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: executing script from /home/stephan/.dovecot.svbin May 9 11:08:34 host dovecot: lda(stephan): sieve: msgid=20090729182144.4c9baf96@example.com: stored mail into mailbox 'INBOX'
Regards,
Stephan.
On Mon, 09 May 2011 11:14:44 +0200, Stephan Bosch wrote:
Is your MTA storing messages using the Dovecot LDA (http://wiki2.dovecot.org/LDA [1]) ? Check that thoroughly. Enable mail_debug to get more verbose logs. To definitively check whether Sieve is working or not, you can invoke dovecot-lda manually. If it works then, the problem most likely lies with your MTA.
Thanks, I am almost there. It turns out I was missing this line from Postfix master.cf:
dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/local/libexec/dovecot/deliver -d ${recipient}
In the dovecot-lda log, I am now seeing some action, but there is a permissions problem somewhere:
May 09 12:43:13 lda: Debug: Loading modules from directory: /usr/local/lib/dovecot May 09 12:43:13 lda: Debug: Module loaded: /usr/local/lib/dovecot/lib90_sieve_plugin.so May 09 12:43:13 lda: Error: userdb lookup: connect(/var/run/dovecot//auth-userdb) failed: Permission denied (euid=200(vmail) egid=6(mail) missing +w perm: /var/run/dovecot//auth-userdb, euid is not dir owner) May 09 12:43:13 lda: Fatal: Internal error occurred. Refer to server log for more information.
Any idea where the problem is?
-- Colin Brace Amsterdam http://lim.nl
Links:
[1] http://wiki2.dovecot.org/LDA [2] mailto:20090729182144.4c9baf96@example.com
On Mon, 2011-05-09 at 13:00 +0200, Colin Brace wrote:
dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/local/libexec/dovecot/deliver -d ${recipient}
You're running deliver as vmail user.
May 09 12:43:13 lda: Error: userdb lookup: connect(/var/run/dovecot//auth-userdb) failed: Permission denied (euid=200(vmail) egid=6(mail) missing +w perm: /var/run/dovecot//auth-userdb, euid is not dir owner)
So make auth-userdb owned by vmail user:
service auth { unix_listener auth-userdb { user = vmail } }
participants (3)
-
Colin Brace
-
Stephan Bosch
-
Timo Sirainen