Setting up replication?

Aropalo Tommi taropalo at kronometrix.org
Mon Apr 25 09:39:51 UTC 2016



On 22/04/16 20:17, Knute Johnson wrote:
> On 4/21/2016 17:53, Edgar Pettijohn wrote:
>>
>> http://wiki.dovecot.org/MboxLocking
>
> 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 at 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 at 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 at 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 at 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 at 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
}




More information about the dovecot mailing list