On 26-02-14 16:36, dbmail_user wrote: > I am new to dbmail, sorry if I asking trivial question > > bit confused here, so first we need to migrate the message/email from > Maildir to dbmail using '../contrib/mailbox2dbmail/mailbox2dbmail/' and then > migrate the flag/tag using 'imapsync'... what is the approach we need to > follow?
If preserving flags and labels is important - it usually is - using imapsync or similar tools is the only way. mailbox2dbmail is a 'raw' import-tool that will import messages from existing mailboxes into dbmail mailboxes. It is not what you want. With imapsync you can copy email accounts from one IMAP server to another, and it will do so incrementally so you can run it again and again and it will only pick up changes and not try to do everything all over again. There is one very tricky part when using such a tool: it needs to have access to the imap account. This implies it needs the passwords for the accounts on *both* sides. One tactic I use is: for each account: preserve the password on both sides set the password to a known value on both sides run imapsync for account restore the original password on both sides Of course, preserving the current password depends on the existing setup. Sometimes this means extracting the encrypted secret from LDAP or AD, sometimes from /etc/shadow, or from some other authentication backend provisioned through PAM, ymmv. For a shadow file I would do: cp /etc/shadow /etc/shadow.orig #generate a sha512 salted hash: HASH=`mysql -N -B -e "select encrypt('somesecret','$6$saltvalue$')"` #set a new password: usermod -p "$HASH" username and once you're done, copy /etc/shadow.orig back to /etc/shadow. -- ________________________________________________________________ Paul J Stevens pjstevns @ gmail, twitter, github, linkedin www.nfg.nl/i...@nfg.nl/+31.85.877.99.97 _______________________________________________ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail