1 (edited by michnikkr 2011-12-20 20:41:57)

Topic: [SOLVED] Roundcube filters don`t work.

I have installed iredmail 0.7.3 on Ubuntu 10.04 LTS, everything works fine except filters created in roundcube.

Sieve plugin is enabled in dovecot.conf

plugin {
    # For maildir format.
    #sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
    sieve = /%Lh/sieve/dovecot.sieve
}

protocol lda {
    postmaster_address = root
    auth_socket_path = /var/run/dovecot/auth-master
    mail_plugins = quota sieve autocreate
    sieve_global_path = /var/vmail/sieve/dovecot.sieve
    log_path = /var/log/sieve.log
}

plugin {
   
    # Location of the active script. When ManageSieve is used this is actually
    # a symlink pointing to the active script in the sieve storage directory.
    #sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
    sieve = /%Lh/sieve/dovecot.sieve
   
    # The path to the directory where the personal Sieve scripts are stored. For
    # ManageSieve this is where the uploaded scripts are stored.
    #sieve_dir = /var/vmail/sieve/%Ld/%Ln/
    sieve_dir = /%Lh/sieve
}

After creating filter, filter file xxx.sieve is created. 

require ["fileinto"];
# rule:[test]
if false # anyof (header :contains "From" "xxx.info", header :contains "Subject" "test")
{
        fileinto "Test";
        stop;
}

Filters list is enabled. 

lrwxrwxrwx 1 vmail vmail   11 2011-12-20 09:00 dovecot.sieve -> xxx.sieve

I set dovcot to debug mode and then send mail from @xxx.info with subject “test”. Rules in filter are ignored and mail is moved to Inbox.

Dec 20 13:24:39 deliver(michal@xxx.com): Info: Loading modules from directory: /usr/lib/dovecot/modules/lda
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Module loaded: /usr/lib/dovecot/modules/lda/lib10_quota_plugin.so
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Module loaded: /usr/lib/dovecot/modules/lda/lib20_autocreate_plugin.so
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Module loaded: /usr/lib/dovecot/modules/lda/lib90_sieve_plugin.so
Dec 20 13:24:39 deliver(michal@xxx.com): Info: auth input: mail=maildir:/var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01//Maildir/
Dec 20 13:24:39 deliver(michal@xxx.com): Info: auth input: home=/var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01/
Dec 20 13:24:39 deliver(michal@xxx.com): Info: auth input: quota_rule=*:bytes=0
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Quota root: name=user backend=dict args=:proxy::quotadict
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Quota rule: root=user mailbox=* bytes=0 messages=0
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Quota warning: bytes=0 (85%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 85
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Quota warning: bytes=0 (90%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 90
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Quota warning: bytes=0 (95%) messages=0 command=/usr/local/bin/dovecot-quota-warning.sh 95
Dec 20 13:24:39 deliver(michal@xxx.com): Info: dict quota: user=michal@xxx.com, uri=proxy::quotadict, noenforcing=0
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=1, subscriptions=yes
Dec 20 13:24:39 deliver(michal@xxx.com): Info: maildir: data=/var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01//Maildir/
Dec 20 13:24:39 deliver(michal@xxx.com): Info: maildir++: root=/var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01//Maildir, index=, control=, inbox=/var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01//Maildir
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Namespace: type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=no, subscriptions=yes
Dec 20 13:24:39 deliver(michal@xxx.com): Info: shared: root=, index=, control=, inbox=
Dec 20 13:24:39 deliver(michal@xxx.com): Info: Namespace : Using permissions from /var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01//Maildir: mode=0700 gid=-1
Dec 20 13:24:39 deliver(michal@xxx.com): Info: dict quota: user=michal@xxx.com, uri=proxy::quotadict, noenforcing=0
Dec 20 13:24:39 deliver(michal@xxx.com): Info: sieve: using sieve path for user's script: /var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01/sieve/dovecot.sieve
Dec 20 13:24:39 deliver(michal@xxx.com): Info: sieve: opening script /var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01/sieve/dovecot.sieve
Dec 20 13:24:39 deliver(michal@xxx.com): Info: sieve: executing compiled script /var/vmail/vmail1/xxx.com/m/i/c/michal-2011.12.07.11.02.01/sieve/dovecot.sieve
Dec 20 13:24:39 deliver(michal@xxx.com): Info: sieve: msgid=<87f087262151a932867bee3943930790@xxx.info>: stored mail into mailbox 'INBOX'

Sieve found users dovecot.sieve file but simply ignore it. What can be wrong?

----

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

2

Re: [SOLVED] Roundcube filters don`t work.

michnikkr wrote:

if false # anyof (header :contains "From" "xxx.info", header :contains "Subject" "test")

Please remove "false #" in your filter.

"if false" means this sieve rule will NOT be executed at all, because it's always false, the same as disabled.

3

Re: [SOLVED] Roundcube filters don`t work.

smile Thank you .. it worked! My mistake.