Re: Moving a large amount of mail to a different account

Thomas Raschbacher <[email protected]> Sun, 16 Jul 2017 12:53:10 +0200
Newsgroups gmane.mail.imap.dbmail
Message-ID <[email protected]>
On 2017-07-14 13:51, Sandino Araico Sánchez wrote:
> 
>  user 1001 to user 1234
> BEGIN;
> update dbmail_mailboxes set owner_idnr = 1234 where owner_idnr = 1001;
> COMMIT;
> 
> Example 2: Move messages from user 1001 mailbox Archive to user 1234 
> mailbox  Archive/OldUser
> BEGIN;
> update dbmail_messages set mailbox_idnr = (select mailbox_idnr from 
> dbmail_mailboxes where > owner_idnr = 1234 and name = 
> 'Archive/OldUser') where mailbox = (select mailbox_idnr from > 
> dbmail_mailboxes where owner_idnr = 1001 and name = 'Archive');
> COMMIT;

  Thanks. I was considering somethign like this, but I wasn't sure if 
there was anything else involved? (maybe caches,.. ?) Did you test this 
before?

Also should I run dbmail-util afterwards?

Regards

_______________________________________________
DBmail mailing list
[email protected]
http://lists.nfg.nl/mailman/listinfo/dbmail
_______________________________________________
DBmail mailing list
[email protected]
http://lists.nfg.nl/mailman/listinfo/dbmail