Brent Hostetler
2007-Mar-14 12:30 UTC
[Dovecot] Sieve plugin - install help - filters ignored
Hello, My setup consists of the following: * Freebsd 6.2 system with software installed from ports tree: * Postfix 2.3.8,1 * postfixadmin 2.1.0_7 * mysql 5.0.33 * dovecot-1.0.r25 * dovecot-sieve 1.0.1 * clamav 0.90_3 * SpamAssassin 3.1.8_1 * amavisd-new 2.4.5_1,1 My mail setup is a virtual user setup with all users/domains sharing same UID:GID. Postfix and dovecot get their User information from mysql tables that are administered with postfixadmin. Mail is filtered through clamav and spamassassin using amavisd-new setup as a content filter. All users mail is delivered such as their maildir is /usr/local/vmail/%d/%u using dovecot's lda 'deliver' agent. The system is working fine as configured.. Mail goes where it is supposed to. Trying to get sieve support and unable to get this going. First step is simulating home directories.>From dovecot-mysql.conf ... changed user_query touser_query = SELECT maildir, 5000 AS uid, 5000 AS gid, @home := maildir AS home FROM mailbox WHERE username = '%u' Added the following to a users maildir: .dovecot.sieve require "fileinto"; fileinto "test"; --- Restart all daemons.. Mail still delivers to inbox. Nothing appears in /var/log/maillog or /usr/local/vmail/dovecot-deliver.log that shows anything but the message being delivered to the inbox. HELP! Brent.
Timo Sirainen
2007-Mar-14 12:35 UTC
[Dovecot] Sieve plugin - install help - filters ignored
On Wed, 2007-03-14 at 05:30 -0700, Brent Hostetler wrote:> Trying to get sieve support and unable to get this going. First step is > simulating home directories...> Added the following to a users maildir: .dovecot.sieveYou didn't mention if you added: "mail_plugins = cmusieve" inside protocol lda? Also mail_debug=yes can be helpful in figuring out what goes wrong. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070314/b8faa818/attachment.bin>
Timo Sirainen wrote:> You didn't mention if you added: "mail_plugins = cmusieve" inside > protocol lda? > > Also mail_debug=yes can be helpful in figuring out what goes wrong. > >I'm a casual reader on this list. I didn't know what Sieve is so I found http://wiki.dovecot.org/LDA/Sieve. I have linuxconf's vdeliver LDA habd off to procmail and then it does all kinds of recipies. I take it that Sieve is a way to script in logic right before the "deliver" agent write the message. It mirrors what procmail can do to some extent? Kind of? -eric wood
Brent Hostetler
2007-Mar-14 16:47 UTC
[Dovecot] Sieve plugin - install help - filters ignored
> -----Original Message----- > From: Timo Sirainen [mailto:tss at iki.fi] > Sent: Wednesday, March 14, 2007 5:36 AM > To: Brent Hostetler > Cc: dovecot at dovecot.org > Subject: Re: [Dovecot] Sieve plugin - install help - filters ignored > > On Wed, 2007-03-14 at 05:30 -0700, Brent Hostetler wrote: > > Trying to get sieve support and unable to get this going. First step > > is simulating home directories. > .. > > Added the following to a users maildir: .dovecot.sieve > > You didn't mention if you added: "mail_plugins = cmusieve" inside > protocol lda? > > Also mail_debug=yes can be helpful in figuring out what goes wrong.mail_plugins = cmusieve was in my config file.. I added mail_debug=yes and found the problem. My sql query was setting the users Home incorrectly. I changed: user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, @home := maildir AS home FROM mailbox WHERE username = '%u' To: user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, CONCAT('/usr/local/vmail/', @home := maildir) AS home FROM mailbox WHERE username = '%u' And the plugin loads and the mail is filtered!! One problem with the CONCAT method is that there is an extra '/' in the users home path. However, the filter still works As expected. Should I be concerned? deliver(brent at hostetler.ws): Mar 14 09:32:23 Info: cmusieve: Using sieve path: /usr/local/vmail/hostetler.ws/brent//.dovecot.sieve ^ |___ extra '/' Thanks! Brent.