I'm trying to set up replication between two servers and I've hit a snag. I have two users and am using mbox files. If anybody has a sample config file for a simple system like mine I would really be grateful to see it. Thanks, The error I'm getting is: Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: user nobody: Initialization failed: Namespace '': mkdir(/nonexistent/mail) failed: Permission denied (euid=65534(nobody) egid=65534(nogroup)) Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: dsync-server: User init failed Mar 23 14:07:31 knute2 dovecot: doveadm(nobody): Error: sync: Failed to start dsync-server command: 75 knute at knute2:/etc/dovecot/conf.d $ sudo doveadm user '*' nobody knute penny I don't know why the user 'nobody' shows up here? nobody is in the /etc/passwd file but he has no group. knute at knute2:/ $ cat /etc/passwd | grep nobody nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin ----------------------- I created a separate config file as suggested in Peer Heinlein's book. knute at knute2:/etc/dovecot/conf.d $ cat 12-replication.conf mail_plugins = $mail_plugins notify replication service replicator { process_min_avail = 1 unix_listener replicator-doveadm { mode = 0600 } } service aggregator { fifo_listener replication-notify-fifo { mode = 0666 } unix_listener replication-notify { mode = 0666 } } service doveadm { inet_listener { port = 30303 } } #doveadm_port = 30303 doveadm_password = secret plugin { mail_replica = tcp:knute2.frazmtn.com:30303 } replication_dsync_parameters = -d -N -l 30 -U --------------------- knute at knute2:/etc/dovecot/conf.d $ dovecot -n # 2.2.13: /etc/dovecot/dovecot.conf # OS: Linux 4.1.19-v7+ armv7l Debian 8.0 doveadm_password = secret mail_location = mbox:~/mail:INBOX=/var/mail/%u mail_plugins = " notify replication" namespace { inbox = yes location mailbox { special_use = \Drafts name = Drafts } mailbox { special_use = \Junk name = Junk } mailbox { special_use = \Sent name = Sent } mailbox { special_use = \Sent name = Sent Messages } mailbox { auto = subscribe special_use = \Trash name = Trash } prefix name = inbox } passdb { driver = pam } plugin { mail_replica = tcp:knute3.frazmtn.com:30303 } protocols = " imap" service { fifo_listener { mode = 0666 path = replication-notify-fifo } unix_listener { mode = 0666 path = replication-notify } name = aggregator } service anvil-auth-penalty { name = anvil } service auth-worker { name = auth-worker } service auth-client { name = auth } service config { name = config } service dict { name = dict } service login/proxy-notify { name = director } service dns-client { name = dns_client } service { inet_listener { port = 30303 name } name = doveadm } service imap { inet_listener { port = 0 name = imaps } name = imap-login } service imap-urlauth { name = imap-urlauth-login } service imap-urlauth-worker { name = imap-urlauth-worker } service token-login/imap-urlauth { name = imap-urlauth } service login/imap { name = imap } service indexer-worker { name = indexer-worker } service indexer { name = indexer } service ipc { name = ipc } service lmtp { name = lmtp } service log-errors { name = log } service { inet_listener { port = 0 name = pop3 } inet_listener { port = 0 name = pop3s } name = pop3-login } service login/pop3 { name = pop3 } service { process_min_avail = 1 unix_listener { mode = 0600 path = replicator-doveadm } name = replicator } service login/ssl-params { name = ssl-params } service stats-mail { name = stats } ssl_cert = </etc/dovecot/dovecot.pem ssl_key = </etc/dovecot/private/dovecot.pem userdb { driver = passwd } protocol lmtp { service replication-notify-fifo { name = aggregator } service anvil-auth-penalty { name = anvil } service auth-worker { name = auth-worker } service auth-client { name = auth } service config { name = config } service dict { name = dict } service login/proxy-notify { name = director } service dns-client { name = dns_client } service doveadm-server { name = doveadm } service imap { name = imap-login } service imap-urlauth { name = imap-urlauth-login } service imap-urlauth-worker { name = imap-urlauth-worker } service token-login/imap-urlauth { name = imap-urlauth } service login/imap { name = imap } service indexer-worker { name = indexer-worker } service indexer { name = indexer } service ipc { name = ipc } service lmtp { name = lmtp } service log-errors { name = log } service pop3 { name = pop3-login } service login/pop3 { name = pop3 } service replicator-doveadm { name = replicator } service login/ssl-params { name = ssl-params } service stats-mail { name = stats } } protocol lda { service replication-notify-fifo { name = aggregator } service anvil-auth-penalty { name = anvil } service auth-worker { name = auth-worker } service auth-client { name = auth } service config { name = config } service dict { name = dict } service login/proxy-notify { name = director } service dns-client { name = dns_client } service doveadm-server { name = doveadm } service imap { name = imap-login } service imap-urlauth { name = imap-urlauth-login } service imap-urlauth-worker { name = imap-urlauth-worker } service token-login/imap-urlauth { name = imap-urlauth } service login/imap { name = imap } service indexer-worker { name = indexer-worker } service indexer { name = indexer } service ipc { name = ipc } service lmtp { name = lmtp } service log-errors { name = log } service pop3 { name = pop3-login } service login/pop3 { name = pop3 } service replicator-doveadm { name = replicator } service login/ssl-params { name = ssl-params } service stats-mail { name = stats } } protocol imap { mail_max_userip_connections = 32 service replication-notify-fifo { name = aggregator } service anvil-auth-penalty { name = anvil } service auth-worker { name = auth-worker } service auth-client { name = auth } service config { name = config } service dict { name = dict } service login/proxy-notify { name = director } service dns-client { name = dns_client } service doveadm-server { name = doveadm } service imap { name = imap-login } service imap-urlauth { name = imap-urlauth-login } service imap-urlauth-worker { name = imap-urlauth-worker } service token-login/imap-urlauth { name = imap-urlauth } service login/imap { name = imap } service indexer-worker { name = indexer-worker } service indexer { name = indexer } service ipc { name = ipc } service lmtp { name = lmtp } service log-errors { name = log } service pop3 { name = pop3-login } service login/pop3 { name = pop3 } service replicator-doveadm { name = replicator } service login/ssl-params { name = ssl-params } service stats-mail { name = stats } } -- Knute Johnson
On 3/23/2016 14:26, Knute Johnson wrote:> I'm trying to set up replication between two servers and I've hit a > snag. I have two users and am using mbox files. If anybody has a > sample config file for a simple system like mine I would really be > grateful to see it. > > Thanks, > > The error I'm getting is: > > Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: > user nobody: Initialization failed: Namespace '': > mkdir(/nonexistent/mail) failed: Permission denied (euid=65534(nobody) > egid=65534(nogroup)) > Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: > dsync-server: User init failed > Mar 23 14:07:31 knute2 dovecot: doveadm(nobody): Error: sync: Failed > to start dsync-server command: 75 > > knute at knute2:/etc/dovecot/conf.d $ sudo doveadm user '*' > nobody > knute > penny > > I don't know why the user 'nobody' shows up here? nobody is in the > /etc/passwd file but he has no group. > > knute at knute2:/ $ cat /etc/passwd | grep nobody > nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin > > ----------------------- > > I created a separate config file as suggested in Peer Heinlein's book. > > knute at knute2:/etc/dovecot/conf.d $ cat 12-replication.conf > mail_plugins = $mail_plugins notify replication > > service replicator { > process_min_avail = 1 > unix_listener replicator-doveadm { > mode = 0600 > } > } > > service aggregator { > fifo_listener replication-notify-fifo { > mode = 0666 > } > unix_listener replication-notify { > mode = 0666 > } > } > > service doveadm { > inet_listener { > port = 30303 > } > } > > #doveadm_port = 30303 > > doveadm_password = secret > > plugin { > mail_replica = tcp:knute2.frazmtn.com:30303 > } > > replication_dsync_parameters = -d -N -l 30 -U > > ---------------------I've got it working more or less. I had to change the mode of replicator-doveadm to 0666. I'm still getting errors for 'nobody' but that doesn't seem to cause it to not work, just annoying. Can anybody explain the significance of the mode? I'm syncing between a 2.2.9 and 2.2.13 system. Any thing I should look for? Thanks, -- Knute Johnson
On 3/24/2016 08:54, Knute Johnson wrote:> > I've got it working more or less. I had to change the mode of > replicator-doveadm to 0666. I'm still getting errors for 'nobody' but > that doesn't seem to cause it to not work, just annoying. > > Can anybody explain the significance of the mode? > > I'm syncing between a 2.2.9 and 2.2.13 system. Any thing I should > look for? > > Thanks, >Well it worked fine until yesterday and then it started creating duplicates by the hundreds. Errors about EOF for two valid users on the secondary system. This is a sample of the errors in the log: [0x7efecd2c9de8] -> dovecot/doveadm-server(+0x1a189) [0x7efecda6e189] -> dovecot/doveadm-server(+0xebeb) [0x7efecda62beb] -> dovecot/doveadm-server(+0x184d3) [0x7efecda6c4d3] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x27) [0x7efecd2ca247] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd7) [0x7efecd2cafd7] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7efecd2c9de8] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7efecd27ac93] -> dovecot/doveadm-server(main+0x11b) [0x7efecda6294b]: 1 Time(s) dovecot: dsync-server(knute): Error: Sync failed for mbox file /var/mail/knute: UID inserted in the middle of mailbox (709931 > 709911, seq=105, idx_msgs=144): 2 Time(s) dovecot: dsync-server(knute): Error: Sync failed for mbox file /var/mail/knute: UID inserted in the middle of mailbox (710924 > 710923, seq=310, idx_msgs=437): 2 Time(s) dovecot: dsync-server(knute): Error: read(knute5.frazmtn.com) failed: EOF: 165 Time(s) dovecot: dsync-server(knute): Fatal: master: service(doveadm): child 6940 killed with signal 6 (core dumped): 1 Time(s) dovecot: dsync-server(knute): Panic: file mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type == F_RDLCK || mbox->mbox_lock_type != F_RDLCK): 1 Time(s) dovecot: dsync-server(penny): Error: read(knute5.frazmtn.com) failed: EOF: 263 Time(s) I disabled replication and don't really know where to go from here. Can anybody give me a hand? Thanks, -- Knute Johnson
>I'm trying to set up replication between two servers and I've hit a >snag. I have two users and am using mbox files. If anybody has a >sample config file for a simple system like mine I would really be >grateful to see it.>Thanks,>The error I'm getting is:>Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: >user nobody: Initialization failed: Namespace '': >mkdir(/nonexistent/mail) failed: Permission denied (euid=65534(nobody) >egid=65534(nogroup)) >Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: >dsync-server: User init failed >Mar 23 14:07:31 knute2 dovecot: doveadm(nobody): Error: sync: Failed >to >start dsync-server command: 75>knute at knute2:/etc/dovecot/conf.d $ sudo doveadm user '*' >nobody >knute >pennyYou can add to conf.d/10-mail.conf first_valid_uid = 1000 last_valid_uid = 2000 You have nobody uid 65534 so make last_valid_uid less than you have in your /etc/passwd. Same thing with the first_valid_uid just pick first uid after users start in your /etc/passwd>I don't know why the user 'nobody' shows up here? nobody is in the >/etc/passwd file but he has no group.
On 4/21/2016 04:33, Aropalo Tommi wrote:>> I'm trying to set up replication between two servers and I've hit a >> snag. I have two users and am using mbox files. If anybody has a >> sample config file for a simple system like mine I would really be >> grateful to see it. >> Thanks, >> The error I'm getting is: >> Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: >> user nobody: Initialization failed: Namespace '': >> mkdir(/nonexistent/mail) failed: Permission denied (euid=65534(nobody) >> egid=65534(nogroup)) >> Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: >> dsync-server: User init failed >> Mar 23 14:07:31 knute2 dovecot: doveadm(nobody): Error: sync: Failed >to >> start dsync-server command: 75 >> knute at knute2:/etc/dovecot/conf.d $ sudo doveadm user '*' >> nobody >> knute >> penny > You can add to conf.d/10-mail.conf > > first_valid_uid = 1000 > last_valid_uid = 2000 > > You have nobody uid 65534 so make last_valid_uid less than you have in > your /etc/passwd. Same thing with the first_valid_uid just pick first > uid after users start in your /etc/passwd > >> I don't know why the user 'nobody' shows up here? nobody is in the >> /etc/passwd file but he has no group.I really appreciate the response to my post as it is the only one I have gotten but that doesn't really solve the problem, in fact it generates even more errors: Apr 21 09:44:19 knute5 dovecot: doveadm(nobody): Error: sync: Failed to start dsync-server command: 75 Apr 21 09:44:34 knute5 dovecot: doveadm(216.240.58.140,nobody): Error: user nobody: Mail access for users with UID 65534 not permitted (see first_valid_uid in config file, uid from userdb lookup). Apr 21 09:44:34 knute5 dovecot: doveadm(216.240.58.140,nobody): Error: dsync-server: User init failed Do you know if there is a guide somewhere on how to set up replication? I would really like to get this to work. Thanks, -- Knute Johnson