Koozali.org: home of the SME Server

Transfer emails from one server to another?

cyberlair

Transfer emails from one server to another?
« on: April 03, 2006, 04:03:52 PM »
Hi Guys

How do you transfer emails from one server to another server?

I tried copying /home/e-smith/files/users/username/Maildir/cur with cp -p * /root/mailbackup and it copies. Then I mounted a share on the other server and tried to copy the folder over and I get permission denied or something copying the file rights? I want to import these emails into my account on the other server.

Is there a way to do this?

Thanks

Offline byte

  • *
  • 2,183
  • +2/-0
Transfer emails from one server to another?
« Reply #1 on: April 04, 2006, 12:41:18 AM »
I would do it something like this...

scp -r /home/e-smith/files/users/username/Maildir/cur <your-server-ip>:/root/mailbkup

then once over move the mail in mailbkup to the relevant user name and make sure that all permissions and owner are set correctly i.e using chmod and chown

HTH
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline ldkeen

  • *
  • 405
  • +0/-0
Transfer emails from one server to another?
« Reply #2 on: April 04, 2006, 02:31:19 AM »
I've had good success using IMAPCopy http://home.arcor.de/armin.diehl/imapcopy/imapcopy.html They have a linux and win32 version. Just create a cfg file listing the source server, destination server and the username/passwords of the accounts you would like to copy from/to.
Regards Lloyd

cyberlair

Transfer emails from one server to another?
« Reply #3 on: April 04, 2006, 03:14:59 AM »
That worked perfectly!!! Thanks very much for your help.

cyberlair

Transfer emails from one server to another?
« Reply #4 on: April 04, 2006, 04:20:07 AM »
I was able to import my webmail inbox from directory cur. How to I import my sent items which is in a folder called ;sent-items/cur. I cannot cd in ;sent-items? How do I do that???

Thanks

Offline mdo

  • *
  • 355
  • +0/-0
Transfer emails from one server to another?
« Reply #5 on: April 04, 2006, 07:36:02 AM »
Try:

cd ';sent-items'/

Michael
...

cyberlair

Transfer emails from one server to another?
« Reply #6 on: April 04, 2006, 02:58:24 PM »
Thanks allot that worked!

cd ';sent-mail'/

sebastian_sw

Transfer emails from one server to another?
« Reply #7 on: May 09, 2006, 07:32:01 PM »
Hey my friends, need someone to point me in the right direction about this one....

I Have a cpl of accounts that manage their emails via the webmail on SME 5.6.
We went throw an upgrade to 7.0 and some manuall restoring regarding ebays, users, etc.-

Here's the issue:
I move /home/e-smith/files/users/username to the new box.
Change permision for user:user for Maildir and Mail directory.

When logging in to webmail as the user i see the emails but with "Invalid Addres" and "No Subject".

Something regarding permission maybe?

clues will be welcome...

Cheers!

Offline raem

  • *
  • 3,972
  • +4/-0
Transfer emails from one server to another?
« Reply #8 on: May 10, 2006, 01:20:47 AM »
sebastian_sw

See answer in your other post

chown -R user:user Maildir

Please do not double post on the same topic.
...

Offline chrislaurie

  • *
  • 96
  • +0/-0
Transfer emails from one server to another?
« Reply #9 on: May 20, 2006, 09:41:36 PM »
I just tried imapcopy and it worked flawlessly - 4655 messages into 30 folders. And fast too! working between a 6.0.1 and a 7rc2 server on my lan.

cyberlair

Transfer emails from one server to another?
« Reply #10 on: September 21, 2006, 09:18:19 PM »
I have restored a mailbox from tape into /root/RESTORE. All the messages are there and they look like this :

1158180158.8901.computerwise:2,
1156945916.2004.computerwise:2,S    1158187716.12332.computerwise:2,S
1158249757.9103.computerwise

I am trying to copy the emails from the cur folder in the /root/RESTORE folder of a user to the working cur mail dir.

scp -r * /home/e-smith/files/users/username/Maildir/cur

The only ones that get copied are ones that look like this 1158249757.9103.computerwise

I get this error copying the others.

ssh: 1157643242.28616.computerwise: Name or service not known

How do I copy these emails?

Thanks

cyberlair

Transfer emails from one server to another?
« Reply #11 on: September 22, 2006, 01:31:29 AM »
I beleive I resolved it by copying the files using cp -p *. Would still like to know why scp would not copy the files?