1

Topic: dovecot sieve not working

======== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: Debian 7.7
- Related log if you're reporting an issue: /var/log/dovecot.log
====

Enabled the vacation filter in roundcube for a user but no vacation email is sent.

Turned on dovecot debug but there are no sieve messages in dovecot.log or dovecot-sieve.log when an email is received for this user.  grep sieve dovecot.log only returns manage sieve messages from when I enabled the filter.

Any ideas?  Below is the output of dovecot -n.

Thanks,
Ray

- - - - -

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.7
auth_master_user_separator = *
auth_mechanisms = PLAIN LOGIN
dict {
  acl = mysql:/etc/dovecot/dovecot-share-folder.conf
  quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
}
first_valid_uid = 2000
last_valid_uid = 2000
listen = *
log_path = /var/log/dovecot.log
mail_gid = 2000
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
mail_plugins = quota
mail_uid = 2000
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace {
  inbox = yes
  location =
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    auto = no
    special_use = \Sent
  }
  mailbox Spam {
    auto = no
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
namespace {
  list = children
  location = maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
  prefix = Shared/%%u/
  separator = /
  subscriptions = yes
  type = shared
}
passdb {
  args = /etc/dovecot/dovecot-mysql.conf
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-master-users-password
  driver = passwd-file
  master = yes
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  auth_socket_path = /var/run/dovecot/auth-master
  quota = dict:user::proxy::quotadict
  quota_rule = *:storage=1G
  quota_warning = storage=85%% quota-warning 85 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
  quota_warning3 = storage=95%% quota-warning 95 %u
  sieve = /%Lh/sieve/dovecot.sieve
  sieve_default = /home/vmail/sieve/dovecot.sieve
  sieve_dir = /%Lh/sieve
  sieve_global_dir = /home/vmail/sieve
}
protocols = pop3 imap sieve lmtp
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-master {
    group = vmail
    mode = 0666
    user = vmail
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service imap-login {
  process_limit = 500
  service_count = 1
}
service lmtp {
  executable = lmtp -L
  inet_listener lmtp {
    port = 24
  }
  process_min_avail = 5
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
  user = vmail
}
service pop3-login {
  service_count = 1
}
service quota-warning {
  executable = script /usr/local/bin/dovecot-quota-warning.sh
  unix_listener quota-warning {
    group = vmail
    mode = 0660
    user = vmail
  }
}
ssl = required
ssl_cert = </etc/ssl/certs/iRedMail_CA.pem
ssl_key = </etc/ssl/private/iRedMail.key
userdb {
  args = /etc/dovecot/dovecot-mysql.conf
  driver = sql
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  lda_mailbox_autocreate = yes
  log_path = /var/log/dovecot-sieve.log
  mail_plugins = quota sieve
  postmaster_address = root
}
protocol lmtp {
  info_log_path = /var/log/dovecot-lmtp.log
  lmtp_save_to_detail_mailbox = yes
  mail_plugins = quota sieve
  postmaster_address = postmaster
  recipient_delimiter = +
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_plugins = quota imap_quota
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

----

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

2

Re: dovecot sieve not working

Dovecot config looks fine.

Please turn on debug mode in Dovecot, send one more testing email, then paste FULL log related to this testing email here, so that others can help troubleshoot.

3

Re: dovecot sieve not working

Here are all the log entries from when I sent a test email.

Apr 14 15:38:11 auth-worker(32759): Info: mysql(127.0.0.1): Connected to database vmail
Apr 14 15:38:15 imap-login: Info: Login: user=<user@example.com>, method=PLAIN, rip=123.123.123.123, lip=101.101.101.101, mpid=304, TLS, session=<YES9V68TXQBYRR8K>
Apr 14 15:38:15 imap: Debug: Loading modules from directory: /usr/lib/dovecot/modules
Apr 14 15:38:15 imap: Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so
Apr 14 15:38:15 imap: Debug: Module loaded: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so
Apr 14 15:38:15 imap: Debug: Added userdb setting: plugin/master_user=user@example.com
Apr 14 15:38:15 imap: Debug: Added userdb setting: plugin/quota_rule=*:bytes=0
Apr 14 15:38:15 imap(user@example.com): Debug: Effective uid=2000, gid=2000, home=/home/vmail/vmail1/example.com/user/
Apr 14 15:38:15 imap(user@example.com): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Apr 14 15:38:15 imap(user@example.com): Debug: Quota rule: root=user mailbox=* bytes=0 messages=0
Apr 14 15:38:15 imap(user@example.com): Debug: Quota warning: bytes=0 (85%) messages=0 reverse=no command=quota-warning 85 user@example.com
Apr 14 15:38:15 imap(user@example.com): Debug: Quota warning: bytes=0 (90%) messages=0 reverse=no command=quota-warning 90 user@example.com
Apr 14 15:38:15 imap(user@example.com): Debug: Quota warning: bytes=0 (95%) messages=0 reverse=no command=quota-warning 95 user@example.com
Apr 14 15:38:15 imap(user@example.com): Debug: dict quota: user=user@example.com, uri=proxy::quotadict, noenforcing=0
Apr 14 15:38:15 imap(user@example.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir://home/vmail/vmail1/example.com/user//Maildir/:INDEX=//home/vmail/vmail1/example.com/user//Maildir/
Apr 14 15:38:15 imap(user@example.com): Debug: maildir++: root=//home/vmail/vmail1/example.com/user//Maildir, index=, control=, inbox=//home/vmail/vmail1/example.com/user//Maildir, alt=
Apr 14 15:38:15 imap(user@example.com): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/Shared/%u
Apr 14 15:38:15 imap(user@example.com): Debug: shared: root=/var/run/dovecot, index=, control=, inbox=, alt=

4

Re: dovecot sieve not working

Weird, no sieve related log.
Does vacation (or any sieve filter) work for other user?

5

Re: dovecot sieve not working

I tried vacation and the included spam sieve with another user and it also does nothing.

6

Re: dovecot sieve not working

Is your user able to receive normal email?

7

Re: dovecot sieve not working

Yes, everything else seems to work fine.

8

Re: dovecot sieve not working

Did you find a solution to this problem?

I have the same problem with ubuntu 14.04

9

Re: dovecot sieve not working

Dear cfas,

Please create a new forum topic for your own question/issue. Clearly explain what your issue, and paste related log, so that others can help troubleshoot.