[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debugging Dovecot and Sieves



On Mon, Jan 17, 2011 at 09:09:34PM +0000, Avi Greenbury wrote:
> Hi all,
> 
> In short, I'm trying to use sieve to filter my mail in a dpkg-supplied
> dovecot/postfix virtual mailbox setup on a lenny machine. I can't find
> anything to suggest that sieve's being used (or even loaded) at all,
> and I'm wondering what I'm doing wrong.
> 
> 
> I've got this in my /etc/dovecot/dovecot.conf:
> 
> protocol lda {
>         mail_plugins = cmusieve
> }
> plugin {
>         sieve = /etc/dovecot/sieves/%u.sieve
> }
> 
> And I've got /etc/dovecot/sieve.default:

Looking at your configuration, you're only telling dovecot to look in
/etc/dovecot/sieves. If you need a default sieve,
http://wiki.dovecot.org/LDA/Sieve/CMU suggests you need to add
"sieve_global_path = /etc/dovecot/default.sieve" AND make sure that
/etc/dovecot/sieves/email.sieve doesn't exist.

> 
> require ["fileinto", "envelope", "subaddress"];
> if envelope :detail "to" "test"{
>   fileinto "test";
> }

The above page also suggests looking for a
/etc/dovecot/default.sieve.err file in case you've made errors.

> 
> then I run
> echo "woo. test" | mail -s "Testing" email+test@address.com
> 
> And the email doesn't get filtered, it's just dropped into the inbox
> (I've already created a 'test' folder in a mail client). I was under the
> impression that on first use the sieve file should be compiled into
> some form of non-ascii file, but I can't find trace of that, so I'm
> guessing it's not being parsed at all. 
> On the other hand, it does get dropped into the email@address.com
> inbox, so I'm fairly satisfied that Postfix is getting its bit right,
> and Dovecot is correctly interpreting the local part of the address.
> 
> I can't find anything to indicate why the sieve's not being invoked, or
> even anything logging its attempts to run it - I'm concerned I might not
> have the cmusieve plugin available, but I can't find a way of getting a
> list of available plugins out of dovecot.

"ls /usr/lib/dovecot/modules" should give you a rough idea of what
you've got.

Attachment: signature.asc
Description: Digital signature


Reply to: