0

sorry if I am not clear enough, but I don't know all the terms because I am new to this field. And sorry for my English.

  1. As backup I have all emails from the old provider in form of many folders and files (the files are plain email files - the folders seem to be a flatten structure of the original folders in the webmail).

  2. I need to import all the old mails to the new email accounts which are on gmail via google-apps.

What I tried:

  1. I used Emailchemy to convert the folders and it seems, that I can reconstruct the folder structure of the old email accounts. (I only tried the demo version so far)
  2. Then I created a email-account on thunderbird with imap connection to one of the mail accounts at gmail.
  3. then I tried to import the converted as well as the original mailfiles into the thunderbird account with the import/export thunderbird-addOn.

The Result:

  1. If I try to imort mbox files, thunderbird tells me i cannot import mbox files into a imap account.

  2. If I import folders, some of the folders are created, but not all and no mails are in them.

What can I do? How do you call my problem :D ?

1 Answer 1

0

Its not the best solution, but it seems that isync is a good way to handle the issue.

One Problem is, that google limits the amout of allowed data, so you need to trigger the sync over and over again. So it lasts quite long if you upload big email-accounts.

Here is my config .mbsyncrc:

IMAPAccount gmail
Host imap.gmail.com
User emailaddress
Pass password
UseIMAPS yes
CertificateFile /etc/ssl/certs/ca-certificates.crt

IMAPStore gmail-imap
Account gmail


MaildirStore gmail-local
# you have to manually create ~/.mbsync/gmail/ 
Path /path/to/Maildir/
# Inbox required, even if one specifies  :gmail-local:INBOX
# otherwise it goes in ~/Maildir
Inbox /path/to/Maildir/


Channel gmail-inbox
Master :gmail-imap:
Slave :gmail-local:
MaxSize 25MB
Pattern *
Create Both
Expunge Slave
Sync Push
SyncState *

And I used this shell script to handle the problem of google reseting the connection:

while true; do
    mbsync gmail-inbox
    echo "5 minutes pause to next try"
    sleep 240
    echo "one minute remaining"
    sleep 60
done

If your folders starting with . you need to remove the dot. maybe with this line:

for f in .*; do mv $f "`echo $f | cut -c2- `"; done

Now I can leave it and wait until tomorow :)

remark

I had trobles with some folders which contained many characters in their names or umlauts respectivly sublements for umlauts. mbsync then trew an error about a too small buffer. changing the names helped me. I then changed the names back on gmail accounts, where I also recreated the folder structure, which was just flattend by the export.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .