--expunge1 is optional. It deletes messages marked \Deleted on host1.
Imapsync syncs messages with all their flags, Gmail takes the messages
marked \Deleted but deletes or moves them just after.
Option --expunge1 really removes messages marked \Deleted on host1
so they are not synced at all.
the question is Q. How to synchronize from Gmail to Gmail?
the answer is
R. Use the following example:
imapsync \
--user1 account1@gmail.com \
--password1 gmailsecret1 \
--user2 account2@gmail.com \
--password2 gmailsecret2 \
--gmail1 --gmail2
if I understand correctly it is to sync gmail to gmail, we have developped this UI to fetch a remote IMAP account to NethServer, we did not designed to be a full imapsync UI
I was able to migrate successfully from one remote mail server to a locally hosted one. First thought of mine was “hey, it works right out of the box .” Emails came over without a problem and immediately were populating in SOGo for me.
Possible future feature request - scheduling & email notification updates. I know this really isn’t designed to be a backup-like setup but it would be highly useful if there were some scheduling feature to run a group/all/single user at a given time interval and then have an email notification sent out with the results.
The utility might, I don’t think the implementation here does. I believe this setup can take any IMAP source and import it into a defined email account; Email Source ==> account@NethServer via Imapsync
but you cannot push emails from account@NethServer ==> user@gmail.com(or some other email provider).