Hello,
I'm just trying to setup two mailservers with dovecot 2.2, postfix, mysql, postfixadmin where i would like to sync the maildirs between them; I'm at the point where sending/receiving and qouta is working and try the maildir replication but it only creates the maildir directories (as example: /srv/vmail/test.domain/screenie/) on the second server but nothing inside the maildir is copied over;
Both servers are setup identical except the things which have to be different (ssl certs and mail_replica node entries);
This is what i'm getting in the log but stuck at: dsync-server(screenie@test.domain): Error: User has no home directory I assume it's the user_query in dovecot-sql.conf.ext but not 100% sure nor an idea to fix it;
May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: auth input: user=screenie@test.domain May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: auth input: screenie@test.domain mail=maildir:/srv/vmail/test.domain/screenie/ quota_rule=*:bytes=102400000 uid=5000 gid=5000 May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: Added userdb setting: mail=maildir:/srv/vmail/test.domain/screenie/ May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: Added userdb setting: plugin/quota_rule=*:bytes=102400000 May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: Effective uid=5000, gid=5000, home= May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: Quota root: name=User Quota backend=dict args=:proxy::sqluserquota May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: Quota rule: root=User Quota mailbox=* bytes=102400000 messages=0 May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: Quota rule: root=User Quota mailbox=Trash bytes=+10240000 (10%) messages=0 May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: Quota grace: root=User Quota bytes=10240000 (10%) May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: dict quota: user=screenie@test.domain, uri=proxy::sqluserquota, noenforcing=0 May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: Namespace inbox: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/srv/vmail/test.domain/screenie/ May 1 18:09:48 mx1 dovecot: doveadm(192.168.1.10,screenie@test.domain): Debug: maildir++: root=/srv/vmail/test.domain/screenie, index=, indexpvt=, control=, inbox=/srv/vmail/test.domain/screenie, alt= May 1 18:09:48 mx1 dovecot: dsync-server(screenie@test.domain): Error: User has no home directory May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: auth input: user=screenie@test.domain May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: auth input: screenie@test.domain mail=maildir:/srv/vmail/test.domain/screenie/ quota_rule=*:bytes=102400000 uid=5000 gid=5000 May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Added userdb setting: mail=maildir:/srv/vmail/test.domain/screenie/ May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Added userdb setting: plugin/quota_rule=*:bytes=102400000 May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Effective uid=5000, gid=5000, home= May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Quota root: name=User Quota backend=dict args=:proxy::sqluserquota May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Quota rule: root=User Quota mailbox=* bytes=102400000 messages=0 May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Quota rule: root=User Quota mailbox=Trash bytes=+10240000 (10%) messages=0 May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Quota grace: root=User Quota bytes=10240000 (10%) May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: dict quota: user=screenie@test.domain, uri=proxy::sqluserquota, noenforcing=0 May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Namespace inbox: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/srv/vmail/test.domain/screenie/ May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: maildir++: root=/srv/vmail/test.domain/screenie, index=, indexpvt=, control=, inbox=/srv/vmail/test.domain/screenie, alt= May 1 18:09:53 mx1 dovecot: doveadm(screenie@test.domain): Debug: Namespace : Using permissions from /srv/vmail/test.domain/screenie: mode=0700 gid=default May 1 18:09:53 mx1 dovecot: dsync-local(screenie@test.domain): Error: User has no home directory
root@mx1:/# dovecot -n # 2.2.13: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-48-pve x86_64 Debian 8.7 simfs auth_mechanisms = plain login dict { sqluserquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } doveadm_password = password doveadm_port = 64500 mail_debug = yes mail_location = maildir:/srv/vmail/%d/%n/maildir mail_plugins = " notify quota replication zlib" 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 { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Items" { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Spam { auto = subscribe special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { mail_replica = tcp:mx2:64500 quota = dict:User Quota::proxy::sqluserquota quota_rule2 = Trash:storage=+10%% sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = " imap lmtp sieve pop3" 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 = 0660 user = postfix } unix_listener auth-userdb { group = vmail mode = 0666 user = vmail } } service config { unix_listener config { user = vmail } } service dict { unix_listener dict { group = vmail mode = 0600 user = vmail } } service doveadm { inet_listener { port = 64500 ssl = no } user = vmail } 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_cert =
root@mx1:/etc/dovecot# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf.ext driver = mysql connect = host=127.0.0.1 dbname=mailserver user=vmail password=password default_pass_scheme = SHA512-CRYPT password_query = SELECT CONCAT('*:bytes=', quota) AS userdb_quota_rule, password FROM mailbox WHERE username = '%u' user_query = SELECT CONCAT('maildir:/srv/vmail/',maildir) AS mail, CONCAT('*:bytes=', quota) AS quota_rule, 5000 AS uid, 5000 AS gid FROM mailbox WHERE username = '%u' iterate_query = SELECT username AS user FROM mailbox WHERE active = '1'; root@mx1:/etc/dovecot#
thx, screenie