Thank you for your prompt reply and timely help. I will try to be very
explanative in describing my situation. I will begin first with answering
the questions you asked;

 

1)      how are the messages storred on the old server, which storage
backend do you use, maybe Maildir?

Yes, Maildir. Dovecot  version is 2.1.7. 

Virtual users are authenticated by mysql backend. Login is plain login.

 

2) the storage backend on the new server?

                     Maildir. Dovecot Version 2.2.9.  Mysql virtual users
authentication. Plain login

 

3) do you care about the message UIDs?

I Would like to preserve the UIDs as much as possible. However, the most
important thing is for the users to have access to their old emails. 

4) How many users do you have (approx.) and can you access the user's
mailboxes via IMAP, e.g. using a master user or do you know their password
or can you switch to a known password during migration of one particular
user?

I have about 50 total users. I can access their mailboxes via imap but I
don't have their password handy. Mysql  database  with the userdata and
passwords was imported into the new new server so, the users can get
authenticated into the new server with the old server password.

  

5) Did you've changed namespaces?

                     No. I did not change namespaces.

- From your first post I figure that the basic mail server functionality of
the new server is working, most importantly login, message delivery and
retrieval.

 

Yes, the new server is functional and all the users are able to log in, view
delivered messages and retrieve the messages into their mail clients.
However, they cannot view any old messages or retrieve any old messages. 

 

Here is the dovecot.conf of the old mail server;

protocols = imap pop3

log_timestamp = "%Y-%m-%d %H:%M:%S "

mail_location = maildir:/var/vmail/%d/%n

mail_privileged_group = mail

first_valid_uid = 6060

ssl_cert= </etc/ssl/certs/dovecot.pem

ssl_key =< /etc/ssl/private/dovecot.pem

#ssl_ca = </etc/ssl/certs/gd_bundle.crt

 

ssl = yes

#ssl_cert = </etc/postfix/ssl/smtpd.crt

#ssl_key = </etc/postfix/ssl/smtpd.key

 

protocol imap {

  mail_plugins = autocreate quota imap_quota

}

protocol pop3 {

  pop3_uidl_format = %08Xu%08Xv

  mail_plugins = quota

}

protocol lda {

  mail_plugins =  quota sieve

  quota_full_tempfail = yes

 rejection_reason = Your message to <%t> was automatically
rejected:%n%r%n%nThe Subject of your message was: %s

  auth_socket_path = /var/run/dovecot/auth-master

  log_path = /var/log/dovecot-deliver.log

  postmaster_address = [email protected]

#  sieve_path = /var/sieve/global.sieve

}

  auth_mechanisms = plain login cram-md5

  auth_debug = no

  auth_debug_passwords = yes

  auth_verbose = no

  auth_verbose_passwords = no

  disable_plaintext_auth = no

  instance_name = dovecot

  login_greeting = Dovecot ready.

  mail_debug = no

 

  passdb {

  args = /etc/dovecot/dovecot-sql.conf

  driver = sql

}

  userdb {

  args = /etc/dovecot/dovecot-sql.conf

  driver = sql

}

 

 

-----Original Message-----
From: Steffen Kaiser [mailto:[email protected]] 
Sent: Monday, April 14, 2014 2:18 AM
To: K. C. Mohan
Cc: [email protected]
Subject: Re: [Dovecot] integration of old mails into new dovecot Maildir

 

-----BEGIN PGP SIGNED MESSAGE-----

Hash: SHA1

 

On Sun, 13 Apr 2014, K. C. Mohan wrote:

 

Please, do not top post.

 

> Thank you Steffen, for addressing my problem of migrating old mails 

> into new mail server. I went through the article you pointed to but 

> could not succueed. I will appreciate if you could guide me to step by 

> step process to migrate the mails. My old mail server used 2.x dovecot
version.

 

you post very little information:

 

1) how are the messages storred on the old server, which storage backend do
you use, maybe Maildir?

 

2) the storage backend on the new server?

 

3) do you care about the message UIDs?

 

4) How many users do you have (approx.) and can you access the user's
mailboxes via IMAP, e.g. using a master user or do you know their password
or can you switch to a known password during migration of one particular
user?

 

5) Did you've changed namespaces?

 

- From your first post I figure that the basic mail server functionality of
the new server is working, most importantly login, message delivery and
retrieval.

 

I have attached both the old and new servers configuration files as .txt
attachments.

 

> -----Original Message----- From: Steffen Kaiser

> Sent: Thursday, April 10, 2014 6:14 AM

> To: K. C. Mohan - Personal  s

> Cc:  <mailto:[email protected]> [email protected]

> Subject: Re: [Dovecot] integration of old mails into new dovecot 

> Maildir

> 

> -----BEGIN PGP SIGNED MESSAGE-----

> Hash: SHA1

> 

> On Tue, 8 Apr 2014, K. C. Mohan - Personal wrote:

> 

>> I just installed dovecot 2.2.9 on to a new server and want to 

>> transfer all the old mails into the email accounts I imported from 

>> the previous server into MySQL database. I am not able to view the 

>> subfolders and or old mails that I copied into their respective 

>> maildir folders. I was very much appreciate if anyone could let me 

>> know how to import old mails into the new server. All I see, is the 

>> new mails that have come into the account since I started dovecot service
in the new server.

> 

> Check out  <http://wiki2.dovecot.org/Migration>
http://wiki2.dovecot.org/Migration . Read esp. about 

> "preserving messages' UIDs".

> 

> If the old server uses Maildir, too, and you don't care about the 

> UIDs, copy the files over and you are done.

 

- --

Steffen Kaiser

-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.4.11 (GNU/Linux)

 

iQEVAwUBU0t9r3D1/YhP6VMHAQL21wgAx1GgDwQDWwDMPxbMQ+1vR3i7dsyUk5jm

PNmRigoV8qylbn2AuZ1YMxGN2wEZfSl2zi/j2CtSEUX+d9LOf+lvI9V8zXkvSHT6

jYEHwuIQACjPUxWmh7x8XelvQvZHB9PEH56z8eJhkgyVxpae8Rbb1EHurvmxckef

O0fdmCIglXJdJJ+B9WZ7JZVsB3M6PFFsllizS17+Hus6O2NeVaszLa7o7bk5XInD

m+Co4e4sCVphVlssHRCIRa8Lj6nDC+D6g3RjCR+n0rVREXRbvEcSQPerEAqrZhf8

HB46x3V3n6C2fEu7RNWLB0+DzglHLBI5p9ZqAjJRMr3D9Xy9L5SKlQ==

=IH25

-----END PGP SIGNATURE-----

 

---

This email is free from viruses and malware because avast! Antivirus
protection is active.

 <http://www.avast.com> http://www.avast.com

 



---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-17-generic x86_64 Ubuntu 14.04 LTS
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
first_valid_uid = 6060
hostname = sbm1
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_greeting = Dovecot ready.
mail_location = maildir:~/Maildir
mail_privileged_group = 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 spamtest 
spamtestplus notify
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  recipient_delimiter = +
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +notify +imapflagis +spamtest +spamtestplus +relational 
+comparator-i;ascii-numeric
}
postmaster_address = [email protected]
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = root
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  service_count = 1
  vsz_limit = 64 M
}
service pop3-login {
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
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 {
  args = uid=vmail gid=vmail home=/var/vmail/%d/%n
  driver = static
}
verbose_ssl = yes
protocol lmtp {
  mail_plugins = quota sieve
  postmaster_address = [email protected]
}
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
}


protocols = imap pop3
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/var/vmail/%d/%n
mail_privileged_group = mail
first_valid_uid = 6060
ssl_cert= </etc/ssl/certs/dovecot.pem
ssl_key =< /etc/ssl/private/dovecot.pem
#ssl_ca = </etc/ssl/certs/gd_bundle.crt

ssl = yes
#ssl_cert = </etc/postfix/ssl/smtpd.crt
#ssl_key = </etc/postfix/ssl/smtpd.key

protocol imap {
  mail_plugins = autocreate quota imap_quota
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
  mail_plugins = quota
}
protocol lda {
  mail_plugins =  quota sieve
  quota_full_tempfail = yes
  rejection_reason = Your message to <%t> was automatically 
rejected:%n%r%n%nThe Subject of your message was: %s
  auth_socket_path = /var/run/dovecot/auth-master
  log_path = /var/log/dovecot-deliver.log
  postmaster_address = [email protected]
#  sieve_path = /var/sieve/global.sieve
}
  auth_mechanisms = plain login cram-md5
  auth_debug = no
  auth_debug_passwords = yes
  auth_verbose = no
  auth_verbose_passwords = no
  disable_plaintext_auth = no
  instance_name = dovecot
  login_greeting = Dovecot ready.
  mail_debug = no

  passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
  userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}

service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    mode = 0600
    user = vmail
    group = mail
  }
}

   service imap-login {
   executable = /usr/lib/dovecot/imap-login
   inet_listener imap {
   port = 0
 }
   inet_listener imaps {
   address = *
   port = 993
   ssl = yes
 }
}
   service imap {
   executable = /usr/lib/dovecot/imap
}
service pop3-login {
   executable = /usr/lib/dovecot/pop3-login
   inet_listener pop3 {
   port = 0
 }
 inet_listener pop3s {
 address = *
 port = 995
 }
}
service pop3 {
 executable = /usr/lib/dovecot/pop3
}

#  user = root
#  socket listen {
#    master {
#      path = /var/run/dovecot/auth-master
#      mode = 0600
#      user = vmail
#    }
#    client {
#      path = /var/spool/postfix/private/auth
#      mode = 0660
#      user = postfix
#      group = postfix
#    }
#  }
#}
dict {
}
plugin {
  quota = maildir:User quota
  quota_warning = storage=90%% /usr/sbin/quota-warning.sh 90
  quota_warning2 = storage=70%% /usr/sbin/quota-warning.sh 70
  autocreate = Spam
  autosubscribe = Spam
}
                        

Reply via email to