Probleme with replication and shared mailbox
Laurent BRAULT (OSILOG)
lbrault at osilog.fr
Mon Feb 25 17:42:36 EET 2019
Dear Dovecot Users/Admins/Mailing-List
First of all I would give a big thanks for your great work !
I may need your help to find out what’s going on with my replication and shared mailbox problem.
I setup a full active/active servers with :
* Postfix
* Dovecot
* MariaDB (automaticaly balanced/failover between the 2 host within DRBD and Heartbeat)
* SpamAssassin
* Clamav
* Sieve
* Webmail
* IMAP Over SSL and SMTP Over TLS
* Fail2ban
##################################################################################################
<dovecot –version>
##################################################################################################
2.2.27 (c0f36b0) ==> DEBIAN 9 Stretch (no back ports)
##################################################################################################
Everythink works fine until I activate a share on a mailbox.
I run the following command to share the full mailbox « websentinel » to « lbrault » (because of « acl_defaults_from_inbox = yes » set in conf) :
==> doveadm acl set -u websentinel at example.fr INBOX user=lbrault at example.fr admin create delete expunge insert lookup post read write write-deleted write-seen
Just after activation of share and connect through webmail client (Horde in this case but tried Roundcube also) I get this kind of error messages on logs :
##################################################################################################
Feb 25 15:59:50 mx01 dovecot: imap(lbrault at example.fr): Error: /mnt/mail/vmail/example.fr/lbrault/shared/websentinel at example.fr/.INBOX/dovecot.index.pvt reset, view is now inconsistent
Feb 25 15:59:50 mx01 dovecot: imap(lbrault at example.fr): Error: /mnt/mail/vmail/example.fr/lbrault/shared/websentinel at example.fr/.INBOX/dovecot.index.pvt view is inconsistent
Feb 25 15:59:50 mx01 dovecot: imap(lbrault at example.fr): Error: /mnt/mail/vmail/example.fr/lbrault/shared/websentinel at example.fr/.INBOX/dovecot.index.pvt view is inconsistent
Feb 25 15:59:50 mx01 dovecot: imap(lbrault at example.fr): BUG: Unknown internal error in=293 out=119712
##################################################################################################
In parallele to this error some new folders are created on the mailboxes root with name containing « nonexistent mailbox… » :
##################################################################################################
16:00:37 root at mx01 /mnt/mail/vmail # lla
total 48
drwxr-xr-x 12 vmail vmail 4096 févr. 25 16:00 .
drwxr-xr-x 3 root root 4096 févr. 11 12:13 ..
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=47376e22c8876e5cff5b000036d82855)
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=48376e22c8876e5cff5b000036d82855)
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=49376e22c8876e5cff5b000036d82855)
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=5c72c71b3f896e5c615c000036d82855)
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=809fff0046896e5c665c000036d82855)
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=a1895d0c36866e5c865b000036d82855)
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=c14aaa38d1846e5c285b000036d82855)
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=ed909808b1846e5c523b01006b8a5dcb)
drwx------ 2 vmail vmail 4096 févr. 25 16:00 (nonexistent mailbox with GUID=fa9d41114b896e5c6b5c000036d82855)
drwx------ 4 vmail vmail 4096 févr. 21 11:57 example.fr
##################################################################################################
When I look at the GUID it seems this GUID are linked to the folder into the shared mailbox (websentinel)
I tried to change dsync params with the following command into 10-master.conf to exclude the shared folder from replication but it seems having no effect with the TCP replication :
==> replication_dsync_parameters = -d -N -l 30 -U -x shared
Here is my dovecot -n report :
##################################################################################################
<dovecot -n> :
##################################################################################################
# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 4.9.0-8-amd64 x86_64 Debian 9.7 ext4
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = yes
doveadm_password = # hidden, use -P to show it
doveadm_port = 12345
mail_attribute_dict = file:/mnt/mail/vmail/%d/%n/dovecot-attributes
mail_debug = yes
mail_location = maildir:/mnt/mail/vmail/%d/%n
mail_plugins = " quota notify replication acl"
mail_privileged_group = vmail
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 editheader vnd.dovecot.pipe vnd.dovecot.filter vnd.dovecot.execute
namespace {
list = children
location = maildir:/mnt/mail/vmail/%%d/%%n:INDEXPVT=/mnt/mail/vmail/%d/%n/shared/%%u
prefix = shared/%%u/
separator = /
subscriptions = no
type = shared
}
namespace inbox {
inbox = yes
location =
mailbox Archive {
auto = subscribe
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 =
separator = /
type = private
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
acl = vfile
acl_defaults_from_inbox = yes
acl_shared_dict = file:/var/lib/dovecot/db/shared-mailboxes.db
mail_replica = tcp:mx02.example.fr
quota = maildir:User quota
quota_grace = 10%%
quota_rule = *:storage=1G
quota_rule2 = Trash:storage=+100M
quota_rule3 = Junk:ignore
quota_status_overquota = 552 5.2.2 Mailbox is full
sieve = /mnt/mail/vmail/%d/%n/.dovecot.sieve
sieve_after = /etc/dovecot/sieve/spamfilter.sieve
sieve_dir = /mnt/mail/vmail/%d/%n/sieve
sieve_execute_bin_dir = /usr/lib/dovecot/sieve-execute
sieve_extensions = +editheader +vnd.dovecot.pipe +vnd.dovecot.filter +vnd.dovecot.execute
sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter
sieve_pipe_bin_dir = /usr/lib/dovecot/sieve-pipe
sieve_plugins = sieve_extprograms
}
protocols = " imap lmtp sieve"
replication_dsync_parameters = -d -N -l 30 -U -x shared
replication_max_conns = 50
service aggregator {
fifo_listener replication-notify-fifo {
mode = 0666
user = vmail
}
unix_listener replication-notify {
mode = 0666
user = vmail
}
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
group = vmail
mode = 0666
user = vmail
}
}
service doveadm {
inet_listener {
port = 12345
}
user = vmail
}
service imap-login {
inet_listener imaps {
port = 993
ssl = yes
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service replicator {
process_min_avail = 1
unix_listener replicator-doveadm {
mode = 0666
}
}
ssl = required
ssl_cert = </etc/letsencrypt/live/mx01.example.fr/fullchain.pem
ssl_key = # hidden, use -P to show it
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
verbose_ssl = yes
protocol lmtp {
mail_plugins = " quota notify replication acl sieve"
postmaster_address = lbrault at example.fr
}
protocol lda {
mail_plugins = " quota notify replication acl sieve"
}
protocol imap {
imap_metadata = yes
mail_plugins = " quota notify replication acl imap_quota imap_acl"
}
##################################################################################################
##################################################################################################
<dovecot-sql.conf.ext> :
##################################################################################################
driver = mysql
connect = host=192.168.1.512 dbname=postfix user=mailman password=MySuperPassword
default_pass_scheme = SHA512-CRYPT
password_query = \
SELECT email as username, pwd AS password, \
concat('*:bytes=', quota_limit_bytes) AS userdb_quota_rule \
FROM addresses WHERE email = '%u' AND active = 1
user_query = \
SELECT 5000 AS uid, 5000 as gid, email, \
'/mnt/mail/vmail/%d/%n' AS home, \
concat('*:bytes=', quota_limit_bytes) AS quota_rule \
FROM addresses WHERE email = '%u' AND active = 1
iterate_query = SELECT email AS user FROM addresses WHERE active = 1
##################################################################################################
I would share a special thanks for Community help 😊
If more conf files needed (ie postfix main.cf) please ask me for them.
Best regards
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190225/0610dd00/attachment-0001.html>
More information about the dovecot
mailing list