Re: [Dovecot] dovecot-sieve and LMT
On 06/18/2012 07:44 PM, Martin Weil wrote: require fileinto; if header :contains [subject] [Test] { fileinto .Folder1; } else { fileinto .Folder2; } Of course Folder1 and Folder2 do exist. (/var/mail/vmail/domain.com/user/mail/.Folder1 and Folder2) Don't add a dot on the beggining of the folder name in sieve scripts. Use fileinto :create folder or lda_mailbox_autocreate option to create non-existing folders. -- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net] --- PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
Re: [Dovecot] dovecot-sieve and LMT
Hi. Thanks for your hints, I altered the file but sadly, there is no change in behavior. It's like sieve is not doing anything at all. if header :contains [subject] [Test] { fileinto :create Folder1; } else { fileinto :create Folder2; } The lda_mailbox_autocreate option seems to be a version 2.0 feature. I am using 1.2.9. Thanks Martin Am 19.06.2012 um 09:51 schrieb A.L.E.C: On 06/18/2012 07:44 PM, Martin Weil wrote: require fileinto; if header :contains [subject] [Test] { fileinto .Folder1; } else { fileinto .Folder2; } Of course Folder1 and Folder2 do exist. (/var/mail/vmail/domain.com/user/mail/.Folder1 and Folder2) Don't add a dot on the beggining of the folder name in sieve scripts. Use fileinto :create folder or lda_mailbox_autocreate option to create non-existing folders. -- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net] --- PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
Re: [Dovecot] dovecot-sieve and LMT
Op 6/19/2012 10:17 AM, Martin Weil schreef: Hi. Thanks for your hints, I altered the file but sadly, there is no change in behavior. It's like sieve is not doing anything at all. if header :contains [subject] [Test] { fileinto :create Folder1; } else { fileinto :create Folder2; } The lda_mailbox_autocreate option seems to be a version 2.0 feature. I am using 1.2.9. Do your logs mention anything about LDA and Sieve being invoked? This wiki page shows a few hints on what this should look like and steps to be taken when LDA and Sieve are not being invoked: http://wiki2.dovecot.org/Pigeonhole/Sieve/Troubleshooting Regards, Stephan.
Re: [Dovecot] dovecot-sieve and LMT
Am 19.06.2012 um 10:29 schrieb Stephan Bosch: Op 6/19/2012 10:17 AM, Martin Weil schreef: Hi. Thanks for your hints, I altered the file but sadly, there is no change in behavior. It's like sieve is not doing anything at all. if header :contains [subject] [Test] { fileinto :create Folder1; } else { fileinto :create Folder2; } The lda_mailbox_autocreate option seems to be a version 2.0 feature. I am using 1.2.9. Do your logs mention anything about LDA and Sieve being invoked? This wiki page shows a few hints on what this should look like and steps to be taken when LDA and Sieve are not being invoked: http://wiki2.dovecot.org/Pigeonhole/Sieve/Troubleshooting Regards, Stephan. Indeed they did not. I incorrectly thought that a line in postfix's main.cf would change the delivery to deliver. That would have been true if I used local delivery. For virtual users postfix is using virtual by default. So I had to add deliver to postfix's master.cf and change the virtual_transport in main.cf. After configuring logging for deliver I can now confirm that it is used. I was mistaken by thinking local delivery is the same as virtual delivery. I could have avoided this by reading the wiki more carefully. Sorry about that. But I am afraid sieve is still not working. Mails are still delivered to INBOX. Martin
Re: [Dovecot] dovecot-sieve and LMT
Op 6/19/2012 11:20 AM, Martin Weil schreef: Indeed they did not. I incorrectly thought that a line in postfix's main.cf would change the delivery to deliver. That would have been true if I used local delivery. For virtual users postfix is using virtual by default. So I had to add deliver to postfix's master.cf and change the virtual_transport in main.cf. After configuring logging for deliver I can now confirm that it is used. I was mistaken by thinking local delivery is the same as virtual delivery. I could have avoided this by reading the wiki more carefully. Sorry about that. But I am afraid sieve is still not working. Mails are still delivered to INBOX. Do the logs say anything about Sieve? You can enable mail_debug in your configuration to obtain more verbose log messages about what Sieve is doing. Regards, Stephan.
Re: [Dovecot] dovecot-sieve and LMT
Am 19.06.2012 um 12:44 schrieb Stephan Bosch: Op 6/19/2012 11:20 AM, Martin Weil schreef: Indeed they did not. I incorrectly thought that a line in postfix's main.cf would change the delivery to deliver. That would have been true if I used local delivery. For virtual users postfix is using virtual by default. So I had to add deliver to postfix's master.cf and change the virtual_transport in main.cf. After configuring logging for deliver I can now confirm that it is used. I was mistaken by thinking local delivery is the same as virtual delivery. I could have avoided this by reading the wiki more carefully. Sorry about that. But I am afraid sieve is still not working. Mails are still delivered to INBOX. Do the logs say anything about Sieve? You can enable mail_debug in your configuration to obtain more verbose log messages about what Sieve is doing. Regards, Stephan. Thanks a lot for this tip. It turned out I used the %u variable instead of %n in the path of the sieve script, so sieve was looking in a non existing directory. After correcting sieve complained about the :create statement. But after I removed it, it worked flawlessly. Thanks a lot again. Martin
Re: [Dovecot] dovecot-sieve and LMT
Op 6/19/2012 3:13 PM, Martin Weil schreef: Am 19.06.2012 um 12:44 schrieb Stephan Bosch: Op 6/19/2012 11:20 AM, Martin Weil schreef: Indeed they did not. I incorrectly thought that a line in postfix's main.cf would change the delivery to deliver. That would have been true if I used local delivery. For virtual users postfix is using virtual by default. So I had to add deliver to postfix's master.cf and change the virtual_transport in main.cf. After configuring logging for deliver I can now confirm that it is used. I was mistaken by thinking local delivery is the same as virtual delivery. I could have avoided this by reading the wiki more carefully. Sorry about that. But I am afraid sieve is still not working. Mails are still delivered to INBOX. Do the logs say anything about Sieve? You can enable mail_debug in your configuration to obtain more verbose log messages about what Sieve is doing. Regards, Stephan. Thanks a lot for this tip. It turned out I used the %u variable instead of %n in the path of the sieve script, so sieve was looking in a non existing directory. After correcting sieve complained about the :create statement. But after I removed it, it worked flawlessly. The :create tag doesn't work unless the mailbox extension is active; you need to add the following to the top of your Sieve script to use it: require mailbox; Regards, Stephan.