1

Topic: [SOLVED] "Filters" doesn't work i RoundCube

Hi

I'm running iRedmail (0.7.2) on Ubuntu 10.04.

My problem is that I cant get the RoundCube mail filters to work, they are just ignored.

Any ideas?

Cheers!
// Tomas

2

Re: [SOLVED] "Filters" doesn't work i RoundCube

Please turn on debug mode in Dovecot (/etc/dovecot.conf or /etc/dovecot/dovecot.conf), then monitor its log files (/var/log/dovecot.log and /var/log/sieve.log) to check why it happened:

mail_debug = yes

3

Re: [SOLVED] "Filters" doesn't work i RoundCube

Ok, I tried that but I can't find anything interesting in the logs.

When I have set a auto reply filter and a message is received there's nothing in /var/log/dovecot.log and below is in the /var/log/sieve.log:

Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: Loading modules from directory: /usr/lib/dovecot/modules/lda
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: Module loaded: /usr/lib/dovecot/modules/lda/lib01_acl_plugin.so
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: auth input: mail=maildir:/var/vmail/vmail1/spangberg.eu/a/n/n/anna1-2011.07.06.11.45.41//Maildir/
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: auth input: home=/var/vmail/vmail1/spangberg.eu/a/n/n/anna1-2011.07.06.11.45.41/
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: auth input: quota_rule=*:bytes=0
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl: No acl_shared_dict setting - shared mailbox listing is disabled
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=1, subscriptions=yes
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: maildir: data=/var/vmail/vmail1/spangberg.eu/a/n/n/anna1-2011.07.06.11.45.41//Maildir/
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: maildir++: root=/var/vmail/vmail1/spangberg.eu/a/n/n/anna1-2011.07.06.11.45.41//Maildir, index=, control=, inbox=/var/vmail/vmail1/spangberg.eu/a/n/n/anna1-2011.07.06.11.45.41//Maildir
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl: initializing backend with data: vfile
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl: acl username = anna1@spangberg.eu
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl: owner = 1
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl vfile: Global ACL directory: (null)
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: Namespace: type=public, prefix=Public/, sep=/, inbox=no, hidden=no, list=1, subscriptions=no
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: maildir: data=/var/vmail/vmail1/public
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: maildir++: root=/var/vmail/vmail1/public, index=, control=, inbox=
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl: initializing backend with data: vfile
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl: acl username = anna1@spangberg.eu
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl: owner = 0
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: acl vfile: Global ACL directory: (null)
Jul 06 13:07:41 deliver(anna1@spangberg.eu): Info: Namespace : Using permissions from /var/vmail/vmail1/spangberg.eu/a/n/n/anna1-2011.07.06.11.45.41//Maildir: mode=0700 gid=-1
Jul 06 13:07:42 deliver(anna1@spangberg.eu): Info: msgid=<008601cc3bcc$ea63adb0$bf2b0910$@spangberg.eu>: saved mail to INBOX

4

Re: [SOLVED] "Filters" doesn't work i RoundCube

No error message in pasted log.
Did you send email to yourself? If so, it won't trigger auto-reply filter. Please send with another account instead.

5

Re: [SOLVED] "Filters" doesn't work i RoundCube

No, it was sent with another account (on the same domain).
I did set a "move to junk"-filter as well but there where no errors then either.

6

Re: [SOLVED] "Filters" doesn't work i RoundCube

A thought; Is there a way to enable/disable the use of filters in dovecot?

// Tomas

7

Re: [SOLVED] "Filters" doesn't work i RoundCube

Spångberg wrote:

A thought; Is there a way to enable/disable the use of filters in dovecot?

Search 'sieve' in /etc/dovecot.conf or /etc/dovecot/dovecot.conf.

8

Re: [SOLVED] "Filters" doesn't work i RoundCube

Found nothing there.. any other ideas?

9

Re: [SOLVED] "Filters" doesn't work i RoundCube

Could you please paste output of command 'dovecot -n' here?
Remove passwords and replace sensitive information before pasting.

10

Re: [SOLVED] "Filters" doesn't work i RoundCube

root@mail:/# dovecot -n
# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-32-server x86_64 Ubuntu 10.04.2 LTS
log_path: /var/log/dovecot.log
protocols: pop3 pop3s imap imaps managesieve
listen(default): *
listen(imap): *
listen(pop3): *
listen(managesieve): 127.0.0.1:2000
ssl_cert_file: /etc/ssl/certs/iRedMail_CA.pem
ssl_key_file: /etc/ssl/private/iRedMail.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
mail_uid: 1001
mail_gid: 1001
mail_location: maildir:~/Maildir
mail_debug: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugins(default): acl imap_acl
mail_plugins(imap): acl imap_acl
mail_plugins(pop3): quota zlib
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: public
  separator: /
  prefix: Public/
  location: maildir:/var/vmail/vmail1/public
  list: yes
lda:
  postmaster_address: XXXX
  auth_socket_path: /var/run/dovecot/auth-master
  mail_plugins: sieve quota autocreate
  sieve_global_path: /var/vmail/sieve/dovecot.sieve
  log_path: /var/log/sieve.log
  mail_plugins: acl
auth default:
  mechanisms: plain login
  default_realm: xxx.se
  user: vmail
  passdb:
    driver: ldap
    args: /etc/dovecot/dovecot-ldap.conf
  userdb:
    driver: ldap
    args: /etc/dovecot/dovecot-ldap.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/dovecot-auth
      mode: 438
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 438
      user: vmail
      group: vmail
plugin:
  quota_warning: storage=85%% /usr/local/bin/dovecot-quota-warning.sh 85
  quota_warning2: storage=90%% /usr/local/bin/dovecot-quota-warning.sh 90
  quota_warning3: storage=95%% /usr/local/bin/dovecot-quota-warning.sh 95
  quota: maildir
  quota_rule: *:storage=100M
  expire: Trash 7 Trash/* 7 Junk 30
  expire_dict: proxy::expire
  auth_socket_path: /var/run/dovecot/auth-master
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
  sieve_dir: /var/vmail/sieve/%Ld/%Ln/
  acl: vfile
dict:
  expire: db:/var/lib/dovecot/expire/expire.db

11

Re: [SOLVED] "Filters" doesn't work i RoundCube

You have sieve enabled in dovecot, but i can't find sieve related log in your /var/log/sieve.log:

lda:
  mail_plugins: sieve quota autocreate
  sieve_global_path: /var/vmail/sieve/dovecot.sieve
  log_path: /var/log/sieve.log

# Per-user sieve rules.
plugin:
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
  sieve_dir: /var/vmail/sieve/%Ld/%Ln/

If Dovecot can't find per-user sieve script, it will complain errors like below in /var/log/sieve.log:

Jul 06 20:57:56 deliver(ccc@cvt.com): Info: sieve: user's script path /var/vmail/sieve/cvt.com/ccc/dovecot.sieve doesn't exist (using global script path in stead)

if dovecot found per-user sieve script, it will log contents like below in /var/log/sieve.log:

Jul 06 21:01:58 deliver(ccc@cvt.com): Info: sieve: using sieve path for user's script: /var/vmail/sieve/cvt.com/ccc/dovecot.sieve
Jul 06 21:01:58 deliver(ccc@cvt.com): Info: sieve: opening script /var/vmail/sieve/cvt.com/ccc/dovecot.sieve
Jul 06 21:01:58 deliver(ccc@cvt.com): Info: sieve: executing compiled script /var/vmail/sieve/cvt.com/ccc/dovecot.sieve

12

Re: [SOLVED] "Filters" doesn't work i RoundCube

Working!

When I added support for shared mailfolders a couple of month ago I added the following part to the end of dovecot.conf, when I removed it, the filters started to work again..

Any ideas of which line that might have caused the problem? Or maybe I'll start a new topic on adding support for shared mailfolders.. smile

Thanks for your help
Cheers!
// Tomas

> # User's private mail location
> mail_location = maildir:~/Maildir
>
> # When creating any namespaces, you must also have a private namespace:
> namespace private {
>   separator = /
>   prefix =
>   #location defaults to mail_location.
>   inbox = yes
> }
>
> namespace public {
>   separator = /
>   prefix = Public/
>   location = maildir:/var/vmail/vmail1/public
>   subscriptions = no  # v1.1+
> }
>
> protocol imap {
>   mail_plugins = acl imap_acl
> }
> protocol lda {
>   # If you use deliver with Sieve you may want to enforce ACLs:
>   mail_plugins = acl
> }
>
> plugin {
>   # Without global ACLs:
>   acl = vfile
>
>   # With global ACLs in /etc/dovecot/acls/ directory:
>   #acl = vfile:/etc/dovecot/acls
> }
>
>

13

Re: [SOLVED] "Filters" doesn't work i RoundCube

As i highlighted in previous reply (in this forum topic), you don't have plugin 'sieve' enabled in protocol lad {}.

14

Re: [SOLVED] "Filters" doesn't work i RoundCube

Aha, got it, thanks!