On 25/06/12 18:46, Timo Sirainen wrote:
On 24.6.2012, at 18.57, Reinhard Vicinus wrote:
i try to migrate mails from a non dovecot imap server to a dovecot imap server
with doveadm backup as described there:
http://wiki2.dovecot.org/Migration/Dsync
i first tried (local-mailbox port 18143 is the non dovecot imap server):
/usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw -o
imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o
mailbox_list_index=no -v -D backup -R -f -u u...@example.org -m Sent imapc:
and got the following error:
dsync(u...@example.org): Fatal: dsync backup: Looks like you're trying to run
backup in wrong direction. Source is empty and destination is not.
Strange. -R is supposed to make it copy from imapc to mdbox.. Have you tried if
Dovecot can see mails at all from the remote server? Try doveadm -o mail=imapc:
-o ... fetch instead of doveadm backup command.
You're right it was an error in my setup that caused this problem. After
fixing that problem it now works as expected. The only thing I don't get
working is running it via the doveadm-server socket with:
/usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 -o mailbox_list_index=no -v -D backup -S
/var/run/dovecot-director/doveadm-server -R -u u...@example.org imapc:
In the logfile on the server there is the following error message:
Jun 25 20:01:26 10.129.3.200 dovecot: dsync(u...@example.org): Error:
user u...@example.org: Initialization failed: Initializing mail storage
from mail_location setting failed: imapc: missing imapc_host
Jun 25 20:01:26 10.129.3.200 dovecot: dsync(u...@example.org): Fatal:
User init failed
So I think that all the -o configurations aren't transfered via the
doveadm-server socket.
As the dovecot imap account is newly created and therefore empty it seams to
try to backup from the dovecot imap server to the non dovecot imap server. So i
tried instead:
/usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw -o
imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o
mailbox_list_index=no -v -D backup -f -u u...@example.org -m Sent imapc:
Now this is copying from mdbox to imapc, which is also why you're getting the
crash:
Sometimes (every other time?) i got the following segmentation fault:
bt
#0 0x00007f15e2c9ed74 in strcasecmp () from /lib/libc.so.6
#1 0x00007f15e327eaff in imapc_save_callback (reply=0x7fff56096a70,
context=<value optimized out>) at imapc-save.c:168
Note how it's saving a mail to imapc. But still, that's a bug, fixed:
http://hg.dovecot.org/dovecot-2.1/rev/20703dbd1168
dsync(u...@example.org): Warning: Destination mailbox Sent has been modified,
need to recreate it before we can continue syncing
I think this is also because it's going to wrong direction.
Yes, the problem there was that it was the wrong direction.
# 2.1.7: /etc/dovecot-director/dovecot-director.conf
# OS: Linux 2.6.32-40-server x86_64 Ubuntu 10.04.4 LTS
auth_verbose = yes
auth_verbose_passwords = sha1
base_dir = /var/run/dovecot-director
deliver_log_format = director: deliver: msgid=%m from=%f: %$
director_doveadm_port = 20000
director_mail_servers = 10.129.3.193 10.129.3.192 10.129.3.191 10.129.3.190
director_servers = 10.129.3.193 10.129.3.192 10.129.3.191 10.129.3.190
director_user_expire = 2 days
disable_plaintext_auth = no
doveadm_password = xxx
doveadm_proxy_port = 19000
instance_name = dovecot-director
lmtp_proxy = yes
login_greeting = Mail Balancer
login_log_format = director: login: %$: %s
login_trusted_networks = 10.129.3.0/24
mail_debug = yes
mail_fsync = always
mail_gid = vmail
mail_home = /mail/dovecot/%d/%n
mail_location = mdbox:~/mail
mail_log_prefix = "director: mail: %s(%u): "
mail_privileged_group = vmail
mail_uid = vmail
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
mmap_disable = yes
passdb {
args = proxy=y nopassword=y
driver = static
}
protocols = imap pop3 lmtp sieve
service auth {
unix_listener auth-userdb {
user = dovecot
}
}
service director {
fifo_listener login/proxy-notify {
mode = 0666
}
inet_listener {
port = 9090
}
unix_listener director-userdb {
mode = 0600
}
unix_listener login/director {
mode = 0666
}
}
service doveadm {
executable = doveadm-server director
inet_listener doveadm-server {
port = 20000
}
}
service imap-login {
executable = imap-login director
inet_listener imap {
port = 20143
}
inet_listener imaps {
port = 20993
ssl = yes
}
}
service lmtp {
inet_listener lmtp {
address = *
port = 20024
}
}
service managesieve-login {
executable = managesieve-login director
inet_listener sieve {
port = 20200
}
}
service pop3-login {
executable = pop3-login director
inet_listener pop3 {
port = 20110
}
inet_listener pop3s {
port = 20995
ssl = yes
}
}
ssl_cert = </etc/certs/wildcard.net.crt
ssl_key = </etc/certs/wildcard.net.key
verbose_proctitle = yes
protocol lmtp {
auth_socket_path = director-userdb
passdb {
args = proxy=y nopassword=y port=19024
driver = static
}
}
protocol sieve {
auth_socket_path = director-userdb
passdb {
args = proxy=y nopassword=y port=19200
driver = static
}
}
protocol doveadm {
auth_socket_path = director-userdb
}
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}