[Dovecot] dovecot-2.2.beta1: do not removes e-mail with enabled replication

Евгений Басов ya.mwork at yandex.ru
Wed Jan 16 15:21:46 EET 2013


Hello.

I'm created two installations of dovecot-2.2.beta1 with identical
config. Without replication each server works good. With replication
enabled every changes are replicated between these ones.

When I probe remove or move some email in another folder it is
disappears and reappears again and again in source folder and appears in
destination folder. Thus increasing number of letters like with copy.

Possible reasons cause of the problem:

- bug
- configuration settings of dovecot
- users with wich dovecot works and users rights.

Which version is true? If this not a bug, what should be corrected in
the configuration?

Configuration:

auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
import_environment = TZ
lock_method = flock
mail_debug = yes
mail_location = mdbox:/var/vmail/%d/%n:INDEX=/var/vmail_indexes/%d/%n/
mail_plugins = " quota notify replication"
mail_temp_dir = /var/spool/lmtp-dovecot
mdbox_preallocate_space = yes
mdbox_rotate_interval = 1 days
mdbox_rotate_size = 50 M
namespace inbox {
  inbox = yes
  location =
  mailbox Шаблоны {
    auto = create
  }
  mailbox Archive {
    auto = create
    special_use = \Archive
  }
  mailbox Archives {
    auto = create
    special_use = \Archive
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  mail_replica = remote:vmail at mailsys.office.megagroup.ru
  quota = dict:Domain quota:%d:redis:host=127.0.0.1:prefix=domain/
  quota2 = dict:User quota::redis:host=127.0.0.1:prefix=user/
  quota2_rule = *:storage=0
  quota2_rule2 = Trash:storage=+5%%
  quota_rule = *:storage=0
  quota_rule2 = Trash:storage=+5%%
}
service aggregator {
  fifo_listener replication-notify-fifo {
    mode = 0600
    user = vmail
  }
  unix_listener replication-notify {
    mode = 0600
    user = vmail
  }
}
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener auth-userdb {
    group = $default_internal_user
    mode = 0666
    user = $default_internal_user
  }
}
service config {
  unix_listener config {
    mode = 0600
    user = vmail
  }
}
service dict {
  unix_listener dict {
    mode = 0600
    user = $default_internal_user
  }
}
service doveadm {
  user = vmail
}
service imap-login {
  process_min_avail = 5
  service_count = 1
}
service imap-postlogin {
  executable = script-login /usr/local/bin/imaptrackLastLogin.sh
  user = $default_internal_user
}
service imap {
  executable = imap imap-postlogin
  process_limit = 1024
}
service lmtp {
  inet_listener lmtp {
    address = *, ::
    port = 24
  }
  process_min_avail = 5
}
service pop3-login {
  process_min_avail = 5
  service_count = 1
}
service pop3-postlogin {
  executable = script-login /usr/local/bin/pop3trackLastLogin.sh
  user = $default_internal_user
}
service pop3 {
  executable = pop3 pop3-postlogin
  process_limit = 1024
}
service replicator {
  process_limit = 1024
  process_min_avail = 3
}
ssl_cert = </etc/ssl/dovecot/server.pem
ssl_key = </etc/ssl/dovecot/server.key
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  mail_plugins = " quota notify replication imap_quota"
}

Filesystem permissions:

# ls -l /var/
drwxr-xr-x  3 vmail vmail   24 Jan 16 16:14 vmail
drwxr-xr-x  3 vmail vmail   24 Jan 16 16:14 vmail_indexes

# ls -l /var/spool/
drwxrwx--- 2 dovecot dovecot  6 Jan 16 15:11 lmtp-dovecot


Users:
dovecot:x:97:97:added by portage for dovecot:/dev/null:/sbin/nologin
uid=97(dovecot) gid=97(dovecot) groups=97(dovecot)

dovenull:x:102:102:added by portage for dovecot:/dev/null:/sbin/nologin
uid=102(dovenull) gid=102(dovenull) groups=102(dovenull)

vmail:x:999:999:User for work with local mail storage:/home/vmail:/bin/bash
uid=999(vmail) gid=999(vmail) groups=999(vmail),97(dovecot)

Selects from user database are rights because isolated installations are
works and not get errors.



More information about the dovecot mailing list