*Sync Apple Contacts
*Isync App
*Apple Isync For Windows
isync is a command line application to synchronize mailboxes; it supports Maildir and IMAP4 mailboxes. New messages, message deletions and flag changes can be propagated both ways.
Synchronization is based on unique message identifiers (UIDs), so no identification conflicts can occur (as opposed to some other mail synchronizers).Synchronization state is kept in one local text file per mailbox pair; multiple replicas of a mailbox can be maintained.Note: isync is the name of the project, mbsync is the name of the executable
Jun 24, 2008 1 - iSync can only be installed through an Administrator account, and the app must be in the root of the 'Applications' folder, not in any sub-folder within.Installing
Download iSyncr Mac Download the FREE desktop version of iSyncr to your Mac. ISyncr requires iSyncr Desktop (free) to run on your computer to sync with iTunes. ITunes for Windows, or iTunes for Mac OS 10.5+ required. This free version is limited to 100 songs per playlist.
Install the isync package.ConfiguringNote: Google appears to block isync from downloading emails by default. If you have 2-step authentication enabled, you need to set up an app password and use that with isync, otherwise you need to go to Google's Security Page and toggle 'Allow less secure apps' to 'on'.Note:Subfolders setting in MaildirStore now seems to be required to be set: iSync Config SubFoldersSubFolders Legacy worked as previous unset - Oct 2017
First create and customize the main configuration file using this example ~/.mbsyncrc:
To get rid of the [Gmail]-Stuff (or [Google Mail] as in my case) in each mailbox name, it's possible to use separate Channels for each directory, and later merge them to a group:
As you can see, name-translations are possible this way, as well.Usage
First make any folders that were specified as Maildirs.
Then to retrieve the mail for a specific channel run:
or to retrive the mail for all channels:Tips and tricksUsing Path and/or Inbox on NTFS partitions
Since ntfs partitions will not accept ; in a filename, you need to change your InfoDelimiter and your FieldDelimiter to something else, you can achieve this by globaly (outside any store or channel configuration) changing the later, like below:Calling mbsync automaticallyWith a timer
If you want to automatically synchronize your mailboxes, isync can be started automatically with a systemd/User unit. The following service file can start the mbsync command:
The following timer configures mbsync to be started 2 minutes after boot, and then every 5 minutes:
Once those two files are created, reload systemd, then enable and startmbsync.timer, adding the --user flag to systemctl.Tip: The mbsync service now only runs after login. It's also possible to launch the systemd-user instances after boot if you configure Systemd/User#Automatic start-up of systemd user instances.Integration with notmuch or mu4e
If you want to run notmuch or mu/mu4e after automatically synchronizing your mails, it is preferable to modify the above mbsync.service by adding a post-start hook, like below:
You can also index mu by changing the ExecStartPost line to ExecStartPost=/usr/bin/mu index, or to ExecStartPost=/usr/bin/emacsclient -e '(mu4e-update-index)' if you are running emacsclient and would like to index mu4e.
This modification assumes that you have already setup notmuch or mu/mu4e for your user. If the ExecStart command does not execute successfully, the ExecStartPost command will not execute, so be aware of this!With imapnotify
IMAP IDLE is a way to get push notifications to download new email, rather than polling the server intermittently. This has the advantage of saving bandwidth and delivering your mail as soon as it's available. Isync doesn't have native IDLE suport, but we can use a program like imapnotify to call mbsync when you receive new email. For this example we'll use the goimapnotifyAUR package which is reported to work better with frequent network interruptions.
Install goimapnotifyAUR and create a config file for each mail server you want to poll. Note that the file name format, including the '.conf', is necessary if you want to use the provided systemd service:
(You can view the full configuration options in the project's README.)
Start and enable the service with $ systemctl --user enable --now goimapnotify@gmail.service.
Note that IMAP IDLE only triggers when new mail arrives, not when there is undownloaded mail on the server. For example, if you receive 100 emails with your computer powered off, then turn on your computer, imapnotify will still not download new mail until you receive another email. For this reason you may want to run mbsync once when you log in.Using XOAUTH2
Install an XOAUTH2 SASL plugin, like cyrus-sasl-xoauth2-gitAUR.
Then install oauth2tokenAUR and follow its README to configure the account. It will be responsible for getting the current XOAUTH2 token using the account credentials every time mbsync needs to authenticate.
Finally add AuthMechs XOAUTH2 and PassCmd 'oauth2get <provider> <account>', substituting <provider> and <account> with the values you used for oauth2create, to the IMAPAccount section in the .mbsyncrc.TroubleshootingSSL error
If you get the following error:
Since google enforce SNI when you use TLS 1.3, ensure to run at least isync v1.3.0See https://sourceforge.net/p/isync/isync/merge-requests/2/ for more details
If you get certificate related errors like
you may need to retrieve the server's certificates manually in order for mbsync to correctly verify it.Step #1: Get the certificates
The factual accuracy of this article or section is disputed.Reason: This may not always be needed, e.g. for gmail CertificateFile /etc/ssl/certs/ca-certificates.crt in the config file may be suffcient (Discuss in Talk:Isync#Step #1: Get the certificates)
This will create a certificate file called ~/.cert/some.imap.server.pem (e.g. ~/.cert/imap.gmail.com.pem). Alternatively one can download get_certs.sh and run it:
If you wish to do this manually, you may enter:
and it will display output something like:
Simply copy the first block that begins with -----BEGIN CERTIFICATE----- and ends with -----END CERTIFICATE-----, paste into a file, and save with a .pem extension (this is necessary for the next step). Older instructions state that, with Gmail, both certificate blocks must be saved but on testing this was found to be unnecessary.
Now, copy the root issuer certificate to your local certificate folder. In this example (Gmail), the root issuer is Equifax Secure Certificate Authority. This certificate is included in the ca-certificates package.Step #2: Setup mbsync
Configure mbsync to use that certificate:BAD Command with Exchange 2003
When connecting to an MS Exchange 2003 server, there could be problems when using pipelining (i.e. executing multiple imap commands concurrently). Such an issue could look as follows:
So command 9 is to select a new folder, command 10 checks the mail and commands 11, 12 and 13 run in parallel, writing/getting/flagging a mail. In this case, the Exchange server would terminate the connection after the BAD return value and go on to the next channel. (And if all went well in this channel, mbsync would return with 0.) After setting
in the IMAPStore config part of the Exchange, this problem did not occur any more.Emails on remote server have the wrong date
This fix works when syncing with fastmail, but it likely applies to other services as well.
If you move an email to a new folder using an email client, and mbsync causes the email to appear with the wrong date onthe server, add this to your configuration file:
For example, without this setting, moving an old email from Inbox to Archive using mu4e and thensyncing to fastmail with mbsync will cause the email to appear in Archive but with the date ofthe sync.Sync Apple Contacts
mbsync uses mtime of email message when uploading from maildir to imap server. You can use fix_maildir_mail_mtime.py script to set mtime from email header.External links
*backing up gmail with mbsync[dead link 2020-03-29 ⓘ]Retrieved from 'https://wiki.archlinux.org/index.php?title=Isync&oldid=638945'
Home > Articles␡
* iSync < BackPage 3 of 15Next >This chapter is from the book Mac OS X Panther Unleashed, 3rd EditionThis chapter is from the bookThis chapter is from the book iSync
Most people's lives extend beyond their home to their workplace (or vice versa). Information should be available wherever you go, on whatever device you use. To this end, Apple has created the iSync software. Since its initial introduction, iSync has grown to support dozens of mobile phones, Palm devices, your iPod, iCal, Safari, Address Book, and more. If you have a .Mac account, no matter what Macintosh you're using, your critical information is only a 'sync' away.
NOTE
Although an iCal Calendar subscription may seem like the perfect way to share information between your home and work computers, you can't edit a subscribed calendar. iSync allows you to have local calendar files that are synchronized automatically between your different workstations.The iSync Interface
The iSync window, shown in Figure 3.19, provides the control over what you're syncing and when you're syncing it. On the left side of the window are the devices (data sources) that have been 'registered' with iSync, and on the right is the Sync Now button to start the synchronization process. Clicking a device icon in the iSync window opens a pane with all available synchronization settings for that device.
Figure 3.19 Devices to sync and a big shiny button.Setting Up .Mac Synchronization
By default, only one item is available for synchronizing—your .Mac account. This is a 'special' device in that it provides a holding area for multiple computers to send and then retrieve information. If you have a .Mac account, it can be used with each of your Macintosh workstations to synchronize Bookmarks and other data.
For each computer that will be synchronized through the .Mac account, you must 'register' that computer with the iSync service. To do this, first make sure that you've successfully added your .Mac account information to the .Mac control panel (discussed in Chapter 4). If you do not have a .Mac account, you will not be able to synchronize machines and devices over the network.
Assuming that your .Mac settings are in order, highlight the .Mac icon, and click the Register button, choose a unique name for the computer, and click the Continue button (see Figure 3.20).Configuring Device Sync Options
Each time you register a device, you must also choose what happens on the first 'sync'—whether information should be copied from the computer to the device, or whether information should be merged with what is currently stored on .Mac.
For the .Mac sync options, you also can choose what items are being synchronized (Safari Bookmarks, Address Book Contacts, and iCal information).
At the bottom of the .Mac sync pane is a list of all computers that have been registered through iSync with your iMac account. You can select a computer in the list and click the Unregister Selected Computer button to remove it.
NOTE
Removing a selected computer does not delete any information from it. It does effectively disable its capability to sync until it is re-registered, but you won't lose any information.
To automatically synchronize your chosen items with .Mac every hour, click the Automatically Synchronize Every Hour check box. Click the .Mac icon to close the configuration pane.
Figure 3.20 Register each computer to be synchronized with .Mac.Adding Other Devices to iSync
To add other devices to iSync, choose Devices, Add Device from the menu. Click Scan if nothing is initially detected. iSync scans for iPods, PDAs, and Bluetooth-paired devices within the range of your computer, as shown in Figure 3.21.
Figure 3.21 Scan for other iSync-capable devices.
Double-click the found devices to add them to the iSync window and 'register' them with the iSync process. Choosing a registered device in the iSync window displays the synchronization options specific to that device. For example, Figure 3.22 shows the synchronization options for my iPod.
Figure 3.22 Synchronization options are unique for each device.
For the iPod, you can choose to automatically synchronize each time your iPod is connected as well as what contacts and calendars should be synchronized. The options for your devices are likely to vary from what you see here. It simply depends on the type of device and the features it supports.
NOTE
If you're a Palm user, you must have the iSync-Palm conduit and the Sync Manager from the Palm Desktop installed for iSync to work. The conduit is available from http://www.apple.com/isync/download/.
Pocket PC users can use the excellent The Missing Sync in conjunction with iSync to synchronize their handheld devices with Mac OS X. (http://www.markspace.com/pocketpc.html).Synchronizing
After choosing the sync options for each of the devices you want to use, click the Sync Now button, or choose Devices, Sync Now (Command-T) from the menu, to synchronize all of them. iSync often displays a confirmation message with the changes it is about to make, allowing you to stop or apply the modifications (this warning is configurable in the iSync Preferences). Figure 3.23 shows the synchronization process.
Figure 3.23 iSync gathers information from your devices and software and then synchronizes it.
After a few seconds, all your devices will have a copy of the latest calendars and contacts.Safety Features
To safeguard your data (in case of accidental or malicious synchronizing), Apple had built in a few features that can help you recover from an 'oops' situation. Using Devices, Revert to Last Sync, you can revert to the information stored on your computer before the last time it was synchronized.
Perhaps even more useful is the ability to take a 'snapshot' of your computer's synchronization data using Devices, Backup My Data. You can do this at any time—presumably when you have your computer set up in a critical state that you wouldn't want to lose. To revert back to the backed up state if something goes awry, you simply choose Devices, Revert To Backup.Resetting All Devices
The Devices, Reset All Devices option can come in handy in two situations:
If you've been working on your computer and have configured it to be the way you want it and don't want to synchronize for fear of messing up your settings, Reset All Devices allows you to override the information stored on your other devices with what is contained on your local computer.
Alternatively, if your local machine isn't the way you want it, and you don't want its configuration to mess up anything else, you can use Reset All Devices to reset its data with what is currently stored in your .Mac account, overriding anything that would have been synchronized with other devices.The iSync Log
To view a log of what iSync has done, when it was done, and the result, choose Window, Show Logs. Figure 3.24 shows the log window.
Figure 3.24 iSync logs each synchronization.
Use the disclosure arrows in front of each log line to expand or collapse details about each entry.Removing Devices
To remove registered devices from iSync, simply highlight them in the iSync window and then use Devices, Remove Device from the menu. .Mac registered computers can remove their registrations by using the Remove options under the Devices menu. A removed device will not be 'seen' by iSync and will have to be manually added to be used again. Alternatively, you can disable synchronization for a registered device by using the device configuration pane to temporarily disable synchronizing.Preferences
The iSync application preferences, shown in Figure 3.25, allow you to add an iSync menu extra to your menu bar. From the menu extra, you can synchronize your devices, open iSync, or view any warnings that occurred during the last synchronization process.
Figure 3.25 Use the iSync preferences to add a menu extra to your menu bar.
Within the preferences, you can also choose the amount of data that has to change for iSync to display a warning message.Related Resources
*Book $55.99Isync App
*eBook (Watermarked) $55.99Apple Isync For Windows
*Web Edition $55.99