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@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@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@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@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@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@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@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
Knute Johnson <dovecot@knutejohnson.com> wrote:
I disabled replication and don't really know where to go from here. Can anybody give me a hand?
From what I have seen in this thread your configuration looks ok to me.
IIRC, you have two users, only. And, IIRC, the mbox format isn't really suited for replication. Thus, I do recommend to migrate to another mailbox format like mdbox or sdbox. Migration can be achieved by dsync. You will find examples in the archives of this mailing list.
Good luck, Michael
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.
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
On 21 Apr 2016, at 19:51, Knute Johnson <dovecot@knutejohnson.com> wrote:
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.
Replication attempts to replicate all the users returned by userdb iteration. So you need to make sure that:
doveadm user '*'
doesn't return any extra users you don't want replicated, such has "nobody". Setting the first_valid_uid and last_valid_uid to exclude the unwanted users should have solved this problem (verify that the above command doesn't return "nobody"). I think the problem you have now is simply that replicator already remembered the "nobody" user and doesn't get rid of it automatically. So remove it with:
doveadm replicator remove nobody
On 4/21/2016 12:01, Timo Sirainen wrote:
On 21 Apr 2016, at 19:51, Knute Johnson <dovecot@knutejohnson.com> wrote:
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. Replication attempts to replicate all the users returned by userdb iteration. So you need to make sure that:
doveadm user '*'
doesn't return any extra users you don't want replicated, such has "nobody". Setting the first_valid_uid and last_valid_uid to exclude the unwanted users should have solved this problem (verify that the above command doesn't return "nobody"). I think the problem you have now is simply that replicator already remembered the "nobody" user and doesn't get rid of it automatically. So remove it with:
doveadm replicator remove nobody
Thanks, running doveadm replicator remove after setting the first/last uid did solve that issue. Maybe you would take a look at the other errors I'm getting? Nothing has changed in the configurations from the previous posts in this thread. If you need any more information please let me know. Thanks!
dovecot version 2.2.13
Apr 21 14:30:19 knute5 dovecot: dsync-server(penny): Panic: file mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type == F_RDLCK || mbox->mbox_lock_type != F_RDLCK) Apr 21 14:30:19 knute5 dovecot: dsync-server(penny): Fatal: master: service(doveadm): child 2417 killed with signal 6 (core dumps disabled) Apr 21 14:30:58 knute5 dovecot: dsync-local(knute): Error: read(knutejohnson.com) failed: Connection reset by peer Apr 21 14:30:59 knute5 dovecot: dsync-local(penny): Panic: file mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type == F_RDLCK || mbox->mbox_lock_type != F_RDLCK) Apr 21 14:30:59 knute5 dovecot: dsync-local(penny): Fatal: master: service(doveadm): child 2424 killed with signal 6 (core dumps disabled)
dovecot version 2.2.9
Apr 21 14:30:58 knutejohnson dovecot: dsync-server(knute): Fatal: master: service(doveadm): child 6631 killed with signal 6 (core dumped) Apr 21 14:30:59 knutejohnson dovecot: dsync-server(penny): Error: read(knute5.frazmtn.com) failed: EOF Apr 21 14:32:45 knutejohnson dovecot: imap-login: Login: user=<knute>, method=PLAIN, rip=192.168.3.5, lip=216.240.58.140, mpid=6667, TLS, session=<x955cwUxdQDAqAMF> Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Panic: file mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type == F_RDLCK || mbox->mbox_lock_type != F_RDLCK) Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x5e271) [0x7fc04f02c271] -> /usr/lib/dovecot/libdovecot.so.0(+0x5e34e) [0x7fc04f02c34e] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fc04efe7a9e] -> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_lock+0xcf) [0x7fc04f2e2c2f] -> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_save_begin+0x5f8) [0x7fc04f2e45b8] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_save_begin+0x43) [0x7fc04f307813] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_storage_copy+0x69) [0x7fc04f2ff979] -> /usr/lib/dovecot/modules/lib15_notify_plugin.so(+0x22ae) [0x7fc04e8032ae] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_copy+0x54) [0x7fc04f3078d4] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_move+0x15) [0x7fc04f307985] -> dovecot/doveadm-server(+0x20e4f) [0x7fc04f7e6e4f] -> dovecot/doveadm-server(+0x2181b) [0x7fc04f7e781b] -> dovecot/doveadm-server(dsync_mailbox_import_changes_finish+0x172) [0x7fc04f7e9802] -> dovecot/doveadm-server(dsync_brain_sync_mails+0x6bd) [0x7fc04f7e5add] -> dovecot/doveadm-server(dsync_brain_run+0x523) [0x7fc04f7e1f93] -> dovecot/doveadm-server(+0x1c270) [0x7fc04f7e2270] -> dovecot/doveadm-server(+0x2de60) [0x7fc04f7f3e60] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x27) [0x7fc04f03c247] -> /usr/lib dovecot/libdovecot.so.0(io_loop_handler_run+0xd7) [0x7fc04f03cfd7] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7fc04f03bde8] -> dovecot/doveadm-server(+0x198fd) [0x7fc04f7df8fd] -> dovecot/doveadm-server(+0xebeb) [0x7fc04f7d4beb] -> dovecot/doveadm-server(+0x184d3) [0x7fc04f7de4d3] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x27) [0x7fc04f03c247] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd7) [0x7fc04f03cfd7] -> /usr/lib/dovecot/libdoveco .so.0(io_loop_run+0x38) [0x7fc04f03bde8] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7fc04efecc93] -> dovecot/doveadm-server(main+0x11b) [0x7fc04f7d494b] Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Fatal: master: service(doveadm): child 6668 killed with signal 6 (core dumped)
--
Knute Johnson
On 04/21/16 16:36, Knute Johnson wrote:
On 4/21/2016 12:01, Timo Sirainen wrote:
On 21 Apr 2016, at 19:51, Knute Johnson <dovecot@knutejohnson.com> wrote:
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. Replication attempts to replicate all the users returned by userdb iteration. So you need to make sure that:
doveadm user '*'
doesn't return any extra users you don't want replicated, such has "nobody". Setting the first_valid_uid and last_valid_uid to exclude the unwanted users should have solved this problem (verify that the above command doesn't return "nobody"). I think the problem you have now is simply that replicator already remembered the "nobody" user and doesn't get rid of it automatically. So remove it with:
doveadm replicator remove nobody
Thanks, running doveadm replicator remove after setting the first/last uid did solve that issue. Maybe you would take a look at the other errors I'm getting? Nothing has changed in the configurations from the previous posts in this thread. If you need any more information please let me know. Thanks!
dovecot version 2.2.13
Apr 21 14:30:19 knute5 dovecot: dsync-server(penny): Panic: file mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type == F_RDLCK || mbox->mbox_lock_type != F_RDLCK) Apr 21 14:30:19 knute5 dovecot: dsync-server(penny): Fatal: master: service(doveadm): child 2417 killed with signal 6 (core dumps disabled) Apr 21 14:30:58 knute5 dovecot: dsync-local(knute): Error: read(knutejohnson.com) failed: Connection reset by peer Apr 21 14:30:59 knute5 dovecot: dsync-local(penny): Panic: file mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type == F_RDLCK || mbox->mbox_lock_type != F_RDLCK) Apr 21 14:30:59 knute5 dovecot: dsync-local(penny): Fatal: master: service(doveadm): child 2424 killed with signal 6 (core dumps disabled)
http://wiki.dovecot.org/MboxLocking
dovecot version 2.2.9
Apr 21 14:30:58 knutejohnson dovecot: dsync-server(knute): Fatal: master: service(doveadm): child 6631 killed with signal 6 (core dumped) Apr 21 14:30:59 knutejohnson dovecot: dsync-server(penny): Error: read(knute5.frazmtn.com) failed: EOF Apr 21 14:32:45 knutejohnson dovecot: imap-login: Login: user=<knute>, method=PLAIN, rip=192.168.3.5, lip=216.240.58.140, mpid=6667, TLS, session=<x955cwUxdQDAqAMF> Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Panic: file mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type == F_RDLCK || mbox->mbox_lock_type != F_RDLCK) Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x5e271) [0x7fc04f02c271] -> /usr/lib/dovecot/libdovecot.so.0(+0x5e34e) [0x7fc04f02c34e] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fc04efe7a9e] -> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_lock+0xcf) [0x7fc04f2e2c2f] -> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_save_begin+0x5f8) [0x7fc04f2e45b8] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_save_begin+0x43) [0x7fc04f307813] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_storage_copy+0x69) [0x7fc04f2ff979] -> /usr/lib/dovecot/modules/lib15_notify_plugin.so(+0x22ae) [0x7fc04e8032ae] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_copy+0x54) [0x7fc04f3078d4] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_move+0x15) [0x7fc04f307985] -> dovecot/doveadm-server(+0x20e4f) [0x7fc04f7e6e4f] -> dovecot/doveadm-server(+0x2181b) [0x7fc04f7e781b] -> dovecot/doveadm-server(dsync_mailbox_import_changes_finish+0x172) [0x7fc04f7e9802] -> dovecot/doveadm-server(dsync_brain_sync_mails+0x6bd) [0x7fc04f7e5add] -> dovecot/doveadm-server(dsync_brain_run+0x523) [0x7fc04f7e1f93] -> dovecot/doveadm-server(+0x1c270) [0x7fc04f7e2270] -> dovecot/doveadm-server(+0x2de60) [0x7fc04f7f3e60] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x27) [0x7fc04f03c247] -> /usr/lib dovecot/libdovecot.so.0(io_loop_handler_run+0xd7) [0x7fc04f03cfd7] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7fc04f03bde8] -> dovecot/doveadm-server(+0x198fd) [0x7fc04f7df8fd] -> dovecot/doveadm-server(+0xebeb) [0x7fc04f7d4beb] -> dovecot/doveadm-server(+0x184d3) [0x7fc04f7de4d3] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x27) [0x7fc04f03c247] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd7) [0x7fc04f03cfd7] -> /usr/lib/dovecot/libdoveco .so.0(io_loop_run+0x38) [0x7fc04f03bde8] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7fc04efecc93] -> dovecot/doveadm-server(main+0x11b) [0x7fc04f7d494b] Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Fatal: master: service(doveadm): child 6668 killed with signal 6 (core dumped)
On 4/21/2016 17:53, Edgar Pettijohn wrote:
Thanks Edgar, I hadn't seen that page before. I've tried every combination of locking but still get the same errors.
I would love to see somebody's config files that has this working on a Ubuntu server.
Thanks,
--
Knute Johnson
On 22/04/16 20:17, Knute Johnson wrote:
On 4/21/2016 17:53, Edgar Pettijohn wrote:
Thanks Edgar, I hadn't seen that page before. I've tried every combination of locking but still get the same errors.
I would love to see somebody's config files that has this working on a Ubuntu server.
Thanks,
Hi Knute,
here are my dovecot config's. It seems to be somehow sometimes for me. I am not expert of dovecot just started few weeks ago. I have been playing around and I am not sure what makes mine to work.
I have 2 similar configured servers. Config's are not identical. I had problem with notification "Error: open(/var/run/dovecot/replication-notify-fifo) failed: Permission denied." Still not working perfectly. Replication worked when I used that users UID in "service aggregator" and "unix_listener replication-notify." Then the other user was failing ....
I am using only imap part and haven't test other protocols if they work or not. The other protocols like pop and sieve came by default. I didn't bother to remove them.
#doveadm sync -A remote:u15dove2 command will sync things but I still have some problems. Hopefully this might get you to correct track.
One more thing. I copied root's ssh keys as authorized_keys so I can ssh -lroot other machine without password and visa verse.
So sorry no perfect solution yet avail ....
Linux u15dove1 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux root@u15dove1:/etc/dovecot# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=15.10 DISTRIB_CODENAME=wily DISTRIB_DESCRIPTION="Ubuntu 15.10"
u15dove1 doveconf: root@u15dove1:/etc/dovecot# doveconf -n # 2.2.18: /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.8 (0c4ae064f307+) # OS: Linux 4.2.0-16-generic x86_64 Ubuntu 15.10 auth_mechanisms = plain login dsync_remote_cmd = ssh -l%{login} %{host} doveadm dsync-server -u%u first_valid_uid = 1000 last_valid_uid = 2000 mail_location = maildir:~/Maildir 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 namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } plugin { mail_replica = remote:root@u15dove2 sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap pop3 sieve service aggregator { fifo_listener replication-notify-fifo { user = postfix } unix_listener replication-notify { user = postfix } } service auth { unix_listener /var/spool/postfix/private/dovecot-auth { group = postfix mode = 0660 user = postfix } } service replicator { process_min_avail = 1 unix_listener replicator-doveadm { mode = 0666 } } ssl_cert = </etc/dovecot/dovecot.pem ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM ssl_key = </etc/dovecot/private/dovecot.pem userdb { driver = passwd } protocol lda { deliver_log_format = msgid=%m: %$ mail_plugins = sieve postmaster_address = postmaster quota_full_tempfail = yes rejection_reason = Your message to <%t> was automatically rejected:%n%r } protocol imap { imap_client_workarounds = delay-newmail mail_max_userip_connections = 10 mail_plugins = " notify replication" } protocol pop3 { mail_max_userip_connections = 10 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh }
u15dove2 config: root@u15dove2:/etc/dovecot# doveconf -n # 2.2.18: /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.8 (0c4ae064f307+) # OS: Linux 4.2.0-16-generic x86_64 Ubuntu 15.10 auth_mechanisms = plain login dsync_remote_cmd = ssh -l%{login} %{host} doveadm dsync-server -u%u first_valid_uid = 1000 last_valid_uid = 2000 mail_location = maildir:~/Maildir 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 namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } plugin { mail_replica = remote:root@u15dove1 sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap pop3 sieve service aggregator { fifo_listener replication-notify-fifo { user = root } unix_listener replication-notify { user = root } } service auth { unix_listener /var/spool/postfix/private/dovecot-auth { group = postfix mode = 0660 user = postfix } } service replicator { process_min_avail = 1 unix_listener replicator-doveadm { mode = 0666 } } ssl_cert = </etc/dovecot/dovecot.pem ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM ssl_key = </etc/dovecot/private/dovecot.pem userdb { driver = passwd } protocol lda { deliver_log_format = msgid=%m: %$ mail_plugins = sieve postmaster_address = postmaster quota_full_tempfail = yes rejection_reason = Your message to <%t> was automatically rejected:%n%r } protocol imap { imap_client_workarounds = delay-newmail mail_max_userip_connections = 10 } protocol pop3 { mail_max_userip_connections = 10 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh }
participants (5)
-
Aropalo Tommi
-
Edgar Pettijohn
-
Knute Johnson
-
Michael Grimm
-
Timo Sirainen