|
|
|
|
||||||
| comp.mail.imap Discussion of IMAP-based mail systems. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi all,
I'm in the process of migrating my email to gmail to be more flexible on the road. However, I want my home server to be constantly backing up / syncing my gmail to my home network so it's there if anything goes wrong (and to backup). At home I have dovecot IMAP and I have a number of mail trees served up via different IMAP namespaces on a gentoo linux system. My intention is to make one of these namespaces "GMailBackup" so that I can just include that in my IMAP client and access it on my home network whenever I want to. Dovecot is set up for mbox. So I need a solution that can run in the background (cron job) and either 1) Sync my gmail account to a local mbox store (that would then get served up by dovecot) or 2) Sync my gmail account to the "GMailBackup" namespace. With 1) I've looked at getmail / fetchmail but both of these require that the mailboxes/folders I want to sync need to be specified - because gmail maps IMAP folders to labels I want the solution to pick up new folders automatically and sync them to local store. With 2) I've looked at imapsync - but it has hopeless documentation. I can mangle a few things - such as mangling the gmail INBOX to be GMailBackup/INBOX using --regextrans2. However it is really slow, sizing folders in all the local namespaces and seemingly no way in which to specify just one namespace to sync to. offlineimap has no --dry-run option (or whatever) and that makes it too dangerous. Has anyone got a suggestion, or perhaps some with imapsync to make this happen? Cheers, W. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Hello Ponstructor,
> With 2) I've looked atimapsync- but it has hopeless documentation. Ok. Did you really read it? http://www.linux-france.org/prj/imapsync/README http://www.linux-france.org/prj/imapsync/FAQ > I can mangle a few things - such as mangling the gmail INBOX to be > GMailBackup/INBOX using --regextrans2. Yes. > However it is really slow, Ok. Several options can speed a backup. > sizing folders in all the local namespaces --nofoldersizes > and seemingly no way in > which to specify just one namespace to sync to. Option --regextrans2 allows to sync anywhere, no? -- Au revoir, 02 99 64 31 77 Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Hi Gilles
On Aug 18, 11:01pm, Gilles Lamiral <gilles.lami...@gmail.com> wrote: > Hello Ponstructor, > > > With 2) I've looked atimapsync- but it has hopeless documentation. > > Ok. > Did you really read it?http://www.linux-france.org/prj/imap...j/imapsync/FAQ Copiously - that's how I got as far as I got > > > I can mangle a few things - such as mangling the gmail INBOX to be > > GMailBackup/INBOX using --regextrans2. > > Yes. > > > However it is really slow, > > Ok. Several options can speed a backup. > > > sizing folders in all the local namespaces > > --nofoldersizes That s - the main slow down (having just watched it with -- debugimap) is the STATUS lines on the destination server. It bogs down getting status of folders on namespaces that I never want it to use. In the end speed isn't a dealbreaker (after all it will be running in the background) but it's annoying for debugging. If I could just tell it to ignore all but one of the namespaces... > > > and seemingly no way in > > which to specify just one namespace to sync to. > > Option --regextrans2 allows to sync anywhere, no? OK. Fair enough. Here's my current attempt, looks like it should work. imapsync --host1 imap.gmail.com --user1 gmailuser --password1 pass -- host2 destination --user2 user --password2 pass --ssl1 --ssl2 -- exclude \[Gmail\]/All Mail --exclude \[Gmail\]/Spam -- syncinternaldates --regextrans2 "s#(.*)#GMAILBUP/$&#" --nofoldersizes --useheader 'Message-Id' --skipsize --justfolders --dry Thanks, Appreciate the . W. > > -- > Au revoir, 0299 64 31 77 > Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Hello Ponstructor,
> Copiously - that's how I got as far as I got If you want to write better doc you're welcome. > That s - the main slow down (having just watched it with -- > debugimap) is the STATUS lines on the destination server. It bogs > down getting status of folders on namespaces that I never want it to > use. In the end speed isn't a dealbreaker (after all it will be > running in the background) but it's annoying for debugging. If I > could just tell it to ignore all but one of the namespaces... --folder INBOX > > > and seemingly no way in > > > which to specify just one namespace to sync to. --folderrec "topfolder" > imapsync--host1 imap.gmail.com --user1 gmailuser --password1 pass -- > host2 destination --user2 user --password2 pass --ssl1 --ssl2 -- > exclude \[Gmail\]/All Mail --exclude \[Gmail\]/Spam -- > syncinternaldates --regextrans2 "s#(.*)#GMAILBUP/$&#" --nofoldersizes > --useheader 'Message-Id' --skipsize --justfolders --dry imapsync \ --host1 imap.gmail.com --user1 gmailuser --password1 pass --ssl1 \ --host2 destination --user2 user --password2 pass - --ssl2 \ --nofoldersizes --useheader 'Message-Id' --skipsize \ is OK In order to select only some folders you can use --folder --folderrec --include In order to speed up: - select last messages : --maxage - do not sync flags again and again : --fast It's time I start a wiki. -- Au revoir, 02 99 64 31 77 Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 I didn't dig far enough. I think the OP of this thread is trying to do the same thing I am. I'll look at it when I'm more awake. :-) - -- John Mayson <john@mayson.us> Austin, Texas, USA -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFJAqRu2kz4fWh3iuERAiXvAJ4qw7VpY6DxZYOyT1S6ZD iRraIOKACfV3+l NiTo/Sphpw0tXePctIPYQNc= =ubip -----END PGP SIGNATURE----- |
|
![]() |
| Outils de la discussion | |
|
|