Milan Cvetkovic
2014-Mar-25 19:28 UTC
[Dovecot] Dovecot replication, no updates on message deposit
Hi,
I am trying to setup dovecot replication based on:
http://wiki2.dovecot.org/Replication
All mailboxes share the same UNIX userid ('vmail'), and I setup ssh-key
based login for this account in both directions. As LDA exim4 is
configured to use dovecot deliver LDA. Here is the relevant config from
exim:
/usr/lib/dovecot/deliver -d $local_part -f $sender_address -a
$original_local_part@$original_domain
When a message is deposited to a mailbox, it does not get replicated.
The log is silent:
Mar 25 15:00:20 mx02 dovecot: master: Dovecot v2.2.9 starting up (core
dumps disabled)
Mar 25 15:01:05 mx02 dovecot: lda(user.name): msgid=unspecified: saved
mail to INBOX
The output from doveconf -n is attached.
Any help is appreciated,
Thanks, Milan.
-------------- next part --------------
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.4
auth_mechanisms = plain login
mail_location = maildir:~/Maildir
mail_plugins = " notify replication"
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 {
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 {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
mail_replica = remote:vmail at 192.168.108.136
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
protocols = " imap sieve pop3"
replication_full_sync_interval = 1 hours
service aggregator {
fifo_listener replication-notify-fifo {
user = vmail
}
unix_listener replication-notify {
user = vmail
}
}
service auth {
unix_listener auth-client {
mode = 0660
user = Debian-exim
}
}
service replicator {
process_min_avail = 1
unix_listener replicator-doveadm {
mode = 0600
}
}
ssl_cert = </etc/exim4/exim.crt
ssl_key = </etc/exim4/exim.key
userdb {
driver = prefetch
}
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol lda {
mail_plugins = " sieve"
}
Milan Cvetkovic
2014-Mar-27 16:58 UTC
[Dovecot] Dovecot replication, no updates on message deposit
If anyone is interested - I found the problem in my setup:
> protocol lda {
> mail_plugins = " sieve"
> }
needs to have both "replication" and "notify"
protocol lda {
mail_plugins = " sieve replication notify"
}
Maybe it is just me, but the Replication wiki page is not detailed
enough. I had lots of problems trying to figure out which process runs
on which machine, and in the context of which user.
For example, the first note mentions that "doveadm user '*'"
has to
work. It does not the context when this command would be running. This
is important, because it takes 2 steps to configure it properly:
- to make sure the command runs at all - configure the userdb properly
- to make sure the UNIX user account which would be running it has
the right to do it.
As a result, there are couple of posts on this list bumping up
permissions to various sockets/fifos in /var/run/dovecot directory,
probably in attempts to let 'vmail' user run "doveadm user
'*'". And I
still don't know if 'vmail' user runs it or not...
Milan
exim is configured to use dovecot's deliver as LDA.
Milan Cvetkovic wrote:> Hi,
>
> I am trying to setup dovecot replication based on:
>
> http://wiki2.dovecot.org/Replication
>
> All mailboxes share the same UNIX userid ('vmail'), and I setup
ssh-key
> based login for this account in both directions. As LDA exim4 is
> configured to use dovecot deliver LDA. Here is the relevant config from
> exim:
>
> /usr/lib/dovecot/deliver -d $local_part -f $sender_address -a
> $original_local_part@$original_domain
>
>
> When a message is deposited to a mailbox, it does not get replicated.
> The log is silent:
>
> Mar 25 15:00:20 mx02 dovecot: master: Dovecot v2.2.9 starting up (core
> dumps disabled)
> Mar 25 15:01:05 mx02 dovecot: lda(user.name): msgid=unspecified: saved
> mail to INBOX
>
> The output from doveconf -n is attached.
>
> Any help is appreciated,
>
> Thanks, Milan.
>
> doveconf-n.txt
>
>
> # 2.2.9: /etc/dovecot/dovecot.conf
> # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.4
> auth_mechanisms = plain login
> mail_location = maildir:~/Maildir
> mail_plugins = " notify replication"
> 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 {
> 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 {
> args = /etc/dovecot/dovecot-sql.conf.ext
> driver = sql
> }
> plugin {
> mail_replica = remote:vmail at 192.168.108.136
> sieve = ~/.dovecot.sieve
> sieve_dir = ~/sieve
> }
> protocols = " imap sieve pop3"
> replication_full_sync_interval = 1 hours
> service aggregator {
> fifo_listener replication-notify-fifo {
> user = vmail
> }
> unix_listener replication-notify {
> user = vmail
> }
> }
> service auth {
> unix_listener auth-client {
> mode = 0660
> user = Debian-exim
> }
> }
> service replicator {
> process_min_avail = 1
> unix_listener replicator-doveadm {
> mode = 0600
> }
> }
> ssl_cert = </etc/exim4/exim.crt
> ssl_key = </etc/exim4/exim.key
> userdb {
> driver = prefetch
> }
> userdb {
> args = /etc/dovecot/dovecot-sql.conf.ext
> driver = sql
> }
> protocol lda {
> mail_plugins = " sieve"
> }
>