GithubHelp home page GithubHelp logo

Comments (3)

gilleslamiral avatar gilleslamiral commented on June 18, 2024 1

https://imapsync.lamiral.info/README

  OPTIONS/messages
...
     --skipcrossduplicates : Avoid copying messages that are already copied
                             in another folder, good from Gmail to XYZ when
                             XYZ is not also Gmail.
                             Activated with --gmail1 unless --noskipcrossduplicates

     --debugcrossduplicates : Prints which messages (UIDs) are skipped with
                              --skipcrossduplicates and in what other folders
                              they are.

https://imapsync.lamiral.info/FAQ.d/FAQ.Gmail.txt

Q. How to synchronize from Gmail to XXX?

R. Use this example:

imapsync \
           --user1     [email protected] \
           --password1 gmailsecret \
           --host2     imap.example.org \
           --user2     tata \
           --password2 tatasecret \
           --gmail1

Or, replacing what does --gmail1 (values are from imapsync 2.178):

imapsync \
           --host1     imap.gmail.com \
           --ssl1 \
           --user1     [email protected] \
           --password1 gmailsecret \
           --host2     imap.example.org \
           --user2     tata \
           --password2 tatasecret \
           --maxbytespersecond 40_000 \
           --maxbytesafter 3_000_000_000 \
           --automap \
           --maxsleep 2 \
           --skipcrossduplicates \
           --useheader="X-Gmail-Received" \
           --useheader "Message-Id" \
           --regextrans2 "s,\[Gmail\].,," \
           --folderlast  "[Gmail]/All Mail"

With --gmail1 you can override the parameters
that are activated by them, for example:

imapsync ... --gmail1 --maxbytespersecond 50_000 --noskipcrossduplicates --noautomap

Explanations:

--maxbytespersecond 40_000 ( 40 kBytes/s ) option is here to avoid 
locking or errors when imap transfers exceed Gmail maximum limit. 
See http://support.google.com/a/bin/answer.py?hl=en&answer=1071518
--maxbytespersecond 40_000 is not mandatory in the sense Gmail may
allow you to use an upper value than 2 GBytes per 24h without
disconnections.

--useheader="X-Gmail-Received" --useheader "Message-Id" are not
mandatory. I use them because I found (several years ago, it may have
changed) that Gmail always adds a different header "X-Gmail-Received:"
to all messages it gets. So the identification by imapsync can not
fail using this header. "Message-Id" is there for safety about this
Gmail rule.

--automap is optional but it will save manual folder names changes or
the use of --regextrans2 to map folder names.

--regextrans2 "s,\[Gmail\].,,"
If your destination imap server doesn't like the "[Gmail]" name, 
get rid of this "[Gmail]" part with that.

You can select folders exported to imap within the Gmail preferences,
for example, you may unselect all "System labels".

--skipcrossduplicates is optional but it can save Gigabytes of hard
disk memory. Within imap protocol, Gmail presents Gmail labels as
folders, so a message labelled "Work" "ProjectX" "Urgent" ends up in
three different imap folders "Work" "ProjectX" and "Urgent" after an
imap sync. Option --skipcrossduplicates prevent this behavior.

An issue with --skipcrossduplicates is that the first label synced by
imapsync goes to its corresponding folder but other labels are then
ignored. You can choose what labels have priority by using the
--folderfirst option. For example, --folderfirst "Work" will sync
messages labelled "Work" before messages labelled "CanWait" or
"Urgent". By default imapsync syncs folders (Gmail labels) using the
classical alphanumeric order.

Option --folderlast "CanWait" will sync only messages that only have
the label CanWait.

Option --folderlast "[Gmail]/All Mail", in conjunction with option
--skipcrossduplicates will only put in "[Gmail]/All Mail" the messages
that are not labelled at all.

from imapsync.

komali2 avatar komali2 commented on June 18, 2024

This may actually be because these emails exist in the stupid Important folder. Investigating.

from imapsync.

komali2 avatar komali2 commented on June 18, 2024

It was cause gmail had these items in other folders, and All Mail, and imapsync wasn't duplicating them. There's probably settings to get them to duplicate into Archive like I want, but instead in gmail's webmail I just removed all items from folders like Important, deleted those folders on the new migadu IMAP side, and then resynced. Now it all looks like I'd hoped.

from imapsync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.