Koozali.org: home of the SME Server

Obsolete Releases => SME Server 9.x => Topic started by: david000 on January 05, 2017, 03:10:48 PM

Title: moving email from one user to another
Post by: david000 on January 05, 2017, 03:10:48 PM
Hi all,

I have a set of couple of hundred emails in a sub folder and would like to move them to a different SME user email account, 'as is'.   

Forwarding appears to change the 'from' address which I need to maintain intact.

Any suggestions appreciated.

Best


David
Title: Re: moving email from one user to another
Post by: Daniel B. on January 05, 2017, 03:37:27 PM
You can copy mails directly from the filesystem (from /home/e-smith/files/users/userA/Maildir/.INBOX.subfolder to /home/e-smith/files/users/userB/Maildir/.INBOX.subfolder) with cp, or rsync. Just be sure to chown the files to the destination user after the copy
Title: Re: moving email from one user to another
Post by: david000 on January 05, 2017, 04:22:17 PM
Thanks - I'll give that a go :)
Title: Re: moving email from one user to another
Post by: Stefano on January 05, 2017, 04:54:54 PM
Or use imapsync
Title: Re: moving email from one user to another
Post by: david000 on January 05, 2017, 05:21:45 PM
Or use imapsync

Thanks, I'll read the notes..
Title: Re: moving email from one user to another
Post by: mmccarn on January 06, 2017, 01:34:08 PM
The wiki page for Imapsync (https://wiki.contribs.org/Imapsync) still directs you to use the dag repo, which has been retired.  Hidden in the instructions is the note that for SME8 or SME9 you'll need to use the Epel (https://wiki.contribs.org/Epel) repo instead.

You can also setup both accounts in Thunderbird and drag the folder from one to the other...

The Imapsync docs include a list of similar tools at the bottom; Imapcopy was the easiest to use (simplest syntax).
Title: Re: moving email from one user to another
Post by: turandot on January 06, 2017, 01:40:44 PM
You can also setup both accounts in Thunderbird and drag the folder from one to the other...

This is what I would have recommended: an easy and straight forward approach, I used this a dozen times in the past.
Title: Re: moving email from one user to another
Post by: david000 on January 06, 2017, 02:16:27 PM
I have installed imapsync but I confess that my linux command line skills are probably not up to it.   I had got as far as looking up what 'chown' is about so that I could try the direct copy approach when I saw the Thunderbird suggestion !

I'll try the Thunderbird approach. It may be handy for archiving old mail as well.. 

UPDATE:   Thunderbird worked very well :)   

Is there a good way of using it to archive mail in a way that can be searched (if needed) at a later date ?
Title: Re: moving email from one user to another
Post by: Stefano on January 06, 2017, 03:57:57 PM
Give some time, I'll post a solution
Title: Re: moving email from one user to another
Post by: david000 on January 06, 2017, 04:06:04 PM
Give some time, I'll post a solution

Cheers, much appreciated :)
Title: Re: moving email from one user to another
Post by: mmccarn on January 07, 2017, 02:53:40 PM
...
Is there a good way of using it to archive mail in a way that can be searched (if needed) at a later date ?

If it fits your use case, Thunderbird will do this, too.

I find Thunderbird's indexing fantastic.  A workstation running Thunderbird configured to fully sync all mail in all folders provides a good poor mans email search solution.

For searching only one or two accounts, just add them to Thunderbird and let it sync.

For searching your entire server, consider creating an archive mailbox and keeping copies of all email using Bcc and BccMode (https://wiki.contribs.org/Email#Keep_a_copy_of_all_emails).

If you don't mind Google reading your mail, you could  create a Gmail account that syncs all the email you want to search - either lots of individual mailboxes or using Bcc / BccMode.

There's a wiki page for MailArchiva (https://wiki.contribs.org/MailArchiva), but the version it uses hasn't been updated since 2009.
Title: Re: moving email from one user to another
Post by: david000 on January 09, 2017, 10:26:27 AM
Quote from: mmccarn
If it fits your use case, Thunderbird will do this, too.


Cheers, a plan is starting to form  :-P