1

Topic: No sieve filtering for new Docker iredmail

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello, I have just transfered an old iredmail to a new server using docker this time. Almost everything is working but the filter defined in Roundcube are ignored.

Here is my dovecot -n :

# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.7.2 ()
# OS: Linux 5.10.0-25-amd64 x86_64 Ubuntu 20.04.3 LTS
# Hostname: amberlyst.fr
auth_default_realm = amberlyst.fr
auth_master_user_separator = *
auth_mechanisms = PLAIN LOGIN
default_client_limit = 4096
default_process_limit = 500
default_vsz_limit = 512 M
deliver_log_format = from=%{from}, envelope_sender=%{from_envelope}, subject=%{subject}, msgid=%m, size=%{size}, delivery_time=%{delivery_time}ms, %$
dict {
  acl = mysql:/etc/dovecot/dovecot-share-folder.conf
  lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf
  quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
}
first_valid_uid = 2000
imap_hibernate_timeout = 30 secs
imap_max_line_length = 2 M
last_valid_uid = 2000
listen = *
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c %k
mail_attribute_dict = file:%Lh/dovecot-attributes
mail_gid = 2000
mail_location = maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/
mail_plugins = acl mail_log mailbox_alias notify quota
mail_uid = 2000
mailbox_list_index_very_dirty_syncs = yes
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 index ihave duplicate mime foreverypart extracttext imapsieve vnd.dovecot.imapsieve
namespace {
  inbox = yes
  location =
  mailbox Archive {
    auto = no
    special_use = \Archive
  }
  mailbox Archives {
    auto = no
    special_use = \Archive
  }
  mailbox "Deleted Messages" {
    auto = no
    autoexpunge = 60 days
    special_use = \Trash
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    auto = subscribe
    autoexpunge = 60 days
    special_use = \Junk
  }
  mailbox "Junk E-mail" {
    auto = no
    autoexpunge = 60 days
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Items" {
    auto = no
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    auto = no
    special_use = \Sent
  }
  mailbox Spam {
    auto = no
    autoexpunge = 60 days
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    autoexpunge = 60 days
    special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
namespace {
  list = children
  location = maildir:%%Lh/Maildir/:INDEX=%%Lh/Maildir/Shared/%%Ld/%%Ln
  prefix = Shared/%%u/
  separator = /
  subscriptions = yes
  type = shared
}
passdb {
  args = /etc/dovecot/dovecot-master-users
  driver = passwd-file
  master = yes
}
passdb {
  args = /opt/iredmail/custom/dovecot/master-users
  driver = passwd-file
  master = yes
}
passdb {
  args = /etc/dovecot/dovecot-mysql.conf
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  imapsieve_mailbox1_before = file:/opt/iredmail/bin/dovecot/sieve/report_spam.sieve
  imapsieve_mailbox1_causes = COPY APPEND
  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox2_before = file:/opt/iredmail/bin/dovecot/sieve/report_ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_name = *
  imapsieve_url = sieve://127.0.0.1:4190
  last_login_dict = proxy::lastlogin
  last_login_key = # hidden, use -P to show it
  mail_log_events = delete undelete expunge copy save mailbox_create mailbox_delete mailbox_rename
  mail_log_fields = uid box msgid size from subject flags
  mailbox_alias_new = Sent Messages
  mailbox_alias_new2 = Sent Items
  mailbox_alias_old = Sent
  mailbox_alias_old2 = Sent
  quota = dict:user::proxy::quotadict
  quota_grace = 50M
  quota_rule = *:storage=1G
  quota_status_nouser = DUNNO
  quota_status_overquota = 552 5.2.2 Mailbox is full
  quota_status_success = DUNNO
  quota_warning = storage=100%% quota-warning 100 %u
  quota_warning2 = storage=95%% quota-warning 95 %u
  quota_warning3 = storage=90%% quota-warning 90 %u
  quota_warning4 = storage=85%% quota-warning 85 %u
  sieve = ~/sieve/dovecot.sieve
  sieve_before = /var/vmail/sieve/dovecot.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /var/vmail/sieve
  sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
  sieve_max_redirects = 30
  sieve_pipe_bin_dir = /opt/iredmail/bin/dovecot/sieve
  sieve_plugins = sieve_imapsieve sieve_extprograms
  sieve_redirect_envelope_from = recipient
  sieve_vacation_send_from_recipient = yes
}
protocols = pop3 imap sieve lmtp
service anvil {
  process_limit = 1
  unix_listener anvil-auth-penalty {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service auth {
  client_limit = 4096
  inet_listener {
    port = 12346
  }
  process_limit = 1
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = vmail
    mode = 0666
    user = vmail
  }
  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-hibernate {
  unix_listener imap-hibernate {
    group = vmail
    user = vmail
  }
}
service imap-login {
  client_limit = 0
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
  process_limit = 0
  service_count = 1
}
service imap {
  process_limit = 4096
  unix_listener imap-master {
    group = vmail
    mode = 0666
    user = vmail
  }
}
service lmtp {
  executable = lmtp -L
  inet_listener lmtp {
    port = 24
  }
  process_min_avail = 5
  user = vmail
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service pop3-login {
  client_limit = 0
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
  process_limit = 0
  service_count = 1
}
service pop3 {
  process_limit = 4096
}
service quota-status {
  client_limit = 1000
  executable = quota-status -p postfix
  inet_listener {
    port = 12340
  }
}
service quota-warning {
  executable = script /opt/iredmail/bin/dovecot/quota_warning.sh
  unix_listener quota-warning {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service stats {
  inet_listener stats {
    address = 0.0.0.0
    port = 24242
  }
  unix_listener stats-writer {
    group = vmail
    mode = 0660
    user = vmail
  }
}
ssl = required
ssl_cert = </opt/iredmail/ssl/cert.pem
ssl_cipher_list = EECDH+CHACHA20:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_min_protocol = TLSv1.2
ssl_prefer_server_ciphers = yes
syslog_facility = local5
userdb {
  args = /etc/dovecot/dovecot-mysql.conf
  driver = sql
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  imap_metadata = yes
  mail_max_userip_connections = 30
  mail_plugins = acl mail_log mailbox_alias notify quota imap_quota imap_acl imap_sieve last_login
}
protocol pop3 {
  mail_max_userip_connections = 30
  mail_plugins = acl mail_log mailbox_alias notify quota last_login
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  lda_mailbox_autocreate = yes
  lda_mailbox_autosubscribe = yes
  mail_plugins = acl mail_log mailbox_alias notify quota sieve last_login
}
protocol lmtp {
  lmtp_save_to_detail_mailbox = yes
  mail_plugins = acl mail_log mailbox_alias notify quota sieve last_login
  recipient_delimiter = +
}

I use the default docker command to start it with no different configuration for now except a modification to login without the full domain name, my old mysql database and my old vmail1 folder. I can't see any sieve log in /var/log.

Do you have an idea of where the problem can be located ?
Thank you in advance

----

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

2

Re: No sieve filtering for new Docker iredmail

I also notice there is no mention of sieve nor any sieve logs in the container :

[iRedMail] Remove leftover pid files which may cause service fail to start.
[iRedMail] [Entrypoint] /docker/entrypoints/rsyslog.sh
[iRedMail] [Entrypoint] /docker/entrypoints/cron.sh
[iRedMail] [Entrypoint] /docker/entrypoints/mariadb.sh
[iRedMail] Starting temporary MariaDB instance.
2023-12-11 15:34:29 0 [Note] mysqld (mysqld 10.3.31-MariaDB-0ubuntu0.20.04.1-log) starting as process 211 ...
[iRedMail] Reset password for SQL user 'root'%'localhost'.
[iRedMail] [Run] /docker/mariadb/pre_start/0-vmail_db.sh
[iRedMail] Grant privileges to SQL user 'vmail' and 'vmailadmin'.
[iRedMail] Make sure postmaster@amberlyst.fr is a global admin.
[iRedMail] [Run] /docker/mariadb/pre_start/amavisd_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/fail2ban_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/iredadmin_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/iredapd_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/roundcube.sh
ERROR: Error in DDL upgrade 2018021600: [1050] Table 'filestore' already exists
Updating database schema (2018021600)... [FAILED]
[iRedMail] [Run] /docker/mariadb/pre_start/sa_bayes.sh
[iRedMail] Stopping the temporary mysql instance.
[iRedMail] Stopped the temporary mysql instance.
[iRedMail] [Entrypoint] /docker/entrypoints/dovecot.sh
sed: cannot rename /etc/dovecot/sed3fQUPC: Device or resource busy
sed: cannot rename /etc/dovecot/sedUBLwtF: Device or resource busy
sed: cannot rename /etc/dovecot/sed3HUVuP: Device or resource busy
[iRedMail] [Entrypoint] /docker/entrypoints/postfix.sh
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmj.sh
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmjadmin.sh
[iRedMail] [Entrypoint] /docker/entrypoints/iredapd.sh
[iRedMail] [Entrypoint] /docker/entrypoints/antispam.sh
[iRedMail] Run 'sa-update' (required by Amavisd).
Update finished, no fresh updates were available
[iRedMail] [Entrypoint] /docker/entrypoints/nginx.sh
[iRedMail] [Entrypoint] /docker/entrypoints/phpfpm.sh
[iRedMail] [Entrypoint] /docker/entrypoints/roundcube.sh
[iRedMail] [Entrypoint] /docker/entrypoints/fail2ban.sh
[iRedMail] [Entrypoint] /docker/entrypoints/iredadmin.sh
[iRedMail] CMD: /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/amavisd.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/clamav.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/dovecot.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/fail2ban.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/iredadmin.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/iredapd.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/mariadb.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/mlmmjadmin.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/phpfpm.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/postfix.conf" during parsing
2023-12-11 15:34:38,279 INFO Included extra file "/etc/supervisor/conf.d/rsyslog.conf" during parsing
2023-12-11 15:34:38,279 INFO Set uid to user 0 succeeded
2023-12-11 15:34:38,284 INFO RPC interface 'supervisor' initialized
2023-12-11 15:34:38,284 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-12-11 15:34:38,284 INFO supervisord started with pid 1
2023-12-11 15:34:39,287 INFO spawned: 'rsyslog' with pid 730
2023-12-11 15:34:39,288 INFO spawned: 'cron' with pid 731
2023-12-11 15:34:39,289 INFO spawned: 'mariadb' with pid 732
2023-12-11 15:34:39,290 INFO spawned: 'clamav' with pid 733
2023-12-11 15:34:39,291 INFO spawned: 'dovecot' with pid 734
2023-12-11 15:34:39,293 INFO spawned: 'iredadmin' with pid 735
2023-12-11 15:34:39,294 INFO spawned: 'iredapd' with pid 738
2023-12-11 15:34:39,295 INFO spawned: 'mlmmjadmin' with pid 739
2023-12-11 15:34:39,297 INFO spawned: 'amavisd' with pid 740
2023-12-11 15:34:39,298 INFO spawned: 'phpfpm' with pid 741
2023-12-11 15:34:39,300 INFO spawned: 'nginx' with pid 743
2023-12-11 15:34:39,316 INFO spawned: 'postfix' with pid 745
2023-12-11 15:34:39,317 INFO spawned: 'fail2ban' with pid 746
2023-12-11 15:34:39,318 INFO reaped unknown pid 513
2023-12-11 15:34:39,328 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,328 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,328 INFO success: mariadb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: iredadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: phpfpm entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-12-11 15:34:39,329 INFO success: fail2ban entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)


I start the server using this command :

docker run \
    --rm \
    --name iredmail \
    --env-file /iredmail/iredmail-docker.conf \
    --hostname <myhostname.com> \
    -p 800:80 \
    -p 44443:443 \
    -p 110:110 \
    -p 995:995 \
    -p 143:143 \
    -p 993:993 \
    -p 25:25 \
    -p 465:465 \
    -p 587:587 \
    -p 4190:4190 \
    -v /iredmail/data/backup-mysql:/var/vmail/backup/mysql \
    -v /iredmail/data/mailboxes:/var/vmail/vmail1 \
    -v /iredmail/data/mlmmj:/var/vmail/mlmmj \
    -v /iredmail/data/mlmmj-archive:/var/vmail/mlmmj-archive \
    -v /iredmail/data/imapsieve_copy:/var/vmail/imapsieve_copy \
    -v /iredmail/data/custom:/opt/iredmail/custom \
    -v /iredmail/data/ssl:/opt/iredmail/ssl \
    -v /iredmail/data/mysql:/var/lib/mysql \
    -v /iredmail/data/clamav:/var/lib/clamav \
    -v /iredmail/data/sa_rules:/var/lib/spamassassin \
    -v /iredmail/data/postfix_queue:/var/spool/postfix \
    -v /etc/letsencrypt/live/<myhostname.com>/privkey.pem:/etc/ssl/private/iRedMail.key:ro \
    -v /etc/letsencrypt/live/<myhostname.com>/fullchain.pem:/etc/ssl/certs/iRedMail.crt:ro \
    -v /iredmail/data/custom/dovecot/dovecot.conf:/etc/dovecot/dovecot.conf \
    iredmail/mariadb:stable