1 (edited by iredmailnerd 2010-06-29 03:37:46)

Topic: [SOLVED] Managesieve rules not being applied with Dovecot 1.2.9.

After I create managesieve rules in Roundcube (0.3.1), they not applied or applied incorrectly.  Has anyone had this issue before:  For example, I've created a filter named "Gone Fishin" and I want to to notify senders that "I'm gone fishin."  I get the message but the sender never receives the automatic response.  Here the rule:

require ["vacation"];
# rule:[Gone Fishin]
if anyof (true)
{
        vacation "I'm gone fishin";
}


Also, if I use the following rule, it never gets redirected to the other account, I just receive it at the regular account:

# rule:[Redirect]
if anyof (true)
{
        redirect "otheraccount@domain.com";


}

What am I missing?

I'm using iRedMail 0.5.1.

Thanks for any help you can give.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: [SOLVED] Managesieve rules not being applied with Dovecot 1.2.9.

First:
tail -f /var/log/sieve.log

What's the output when filters should have been applied?

3 (edited by iredmailnerd 2010-06-25 11:55:28)

Re: [SOLVED] Managesieve rules not being applied with Dovecot 1.2.9.

maxie_ro wrote:

First:
tail -f /var/log/sieve.log

What's the output when filters should have been applied?


Hi maxie_ro,

Thanks for responding.  I just tested the redirect rule and the log shows the following:

     Jun 24 14:08:28 deliver(regularuser@mydomain.com): Info: msgid=<4C239EF6.6070908@bellsouth.net>: saved mail to INBOX

rather than the mail being delivered to otheraccount@domain.com.

4

Re: [SOLVED] Managesieve rules not being applied with Dovecot 1.2.9.

suggest you upgrade iRedmail to 0.6.

http://www.iredmail.org/forum/topic901- … -mode.html

5 (edited by iredmailnerd 2010-06-29 01:49:27)

Re: [SOLVED] Managesieve rules not being applied with Dovecot 1.2.9.

shake wrote:

suggest you upgrade iRedmail to 0.6.

http://www.iredmail.org/forum/topic901- … -mode.html

I've upgraded to iRedMail 0.6.0 and I'm still having the same issue.  Do you have any other suggestions on how I can resolve the issue?

Thanks.


I'm using Dovecot 1.2.9.  I think that is the cause of my issue.  Do you have any quick pointers on how to get managesieve working with Dovecot 1.2.9?

6

Re: [SOLVED] Managesieve rules not being applied with Dovecot 1.2.9.

iRedMail-0.5.1 ships roundcube-0.2.1, but you have 0.3.1.

Try to set 'mail_debug = yes' in dovecot.conf, restart dovecot service, and then test yourcfilter rule again. Paste log in /var/log/sieve.log here.

7 (edited by iredmailnerd 2010-06-29 06:25:19)

Re: [SOLVED] Managesieve rules not being applied with Dovecot 1.2.9.

ZhangHuangbin wrote:

iRedMail-0.5.1 ships roundcube-0.2.1, but you have 0.3.1.

Try to set 'mail_debug = yes' in dovecot.conf, restart dovecot service, and then test yourcfilter rule again. Paste log in /var/log/sieve.log here.

WOOOHOOOO!!!  It's working!!

Debugging helped and I also remembered why I had to make some changes in dovecot.conf when I first upgraded to Dovecot 1.2.9 back in April. Dovecot 1.2.9 uses different settings in dovecot.conf for the sieve rules.

For example, the following lines, which are typically uncommented in a standard iRedMail install, need to be commented or removed because they are not used in the "protocol managesieve" section for Dovecot 1.2.9:

protocol managesieve {
    # IP or host address where to listen in for connections.
    listen = 127.0.0.1:2000

    # Specifies the location of the symbolic link pointing to the
    # active script in the sieve storage directory.
    #sieve = /mnt/vmail/sieve/%Ld/%Ln/dovecot.sieve    <-- This line needs to be commented or removed.

    # This specifies the path to the directory where the uploaded scripts are stored.
    #sieve_storage = /mnt/vmail/sieve/%Ld/%Ln/         <-- This line needs to be commented or removed.

Also, in the "protocol lda" section, the "sieve" plugin needs to be specified rather than the "cmusieve" plugin:

protocol lda {
    postmaster_address = root
    auth_socket_path = /var/run/dovecot/auth-master
    #mail_plugins = cmusieve quota expire
    mail_plugins = sieve quota

Lastly, the "sieve" and "sieve_dir" options need to be specified in the "Per-user sieve mail filter" plugin section:

# Per-user sieve mail filter.
plugin {
    # For maildir format.
    sieve = /mnt/vmail/sieve/%Ld/%Ln/dovecot.sieve
    sieve_dir = /mnt/vmail/sieve/%Ld/%Ln/

That's it!

Thanks again for all of your help and patience!

Note:  I also remember now that Dovecot 1.2.9 got installed because I'm using Ubuntu 10.04 and Dovecot 1.2.9 gets installed by default.  I did not manually upgrade to 10.04.