Difference between revisions of "Isync"

From ArchWiki
Jump to: navigation, search
(Blanked the page)
(Undo revision 226559 by RunningDroid (talk))
Line 1: Line 1:
 +
[[category:Email Client]]
 +
isync is a command line application which synchronizes mailboxes; currently Maildir and IMAP4 mailboxes are supported. 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}}
 +
 +
==Installing==
 +
{{AUR|isync}} can be installed from the [[AUR]].
 +
 +
==Features==
 +
 +
*Fine-grained selection of synchronization operations to perform
 +
*Synchronizes single mailboxes or entire mailbox collections
 +
*Partial mirrors possible: keep only the latest messages locally
 +
*Trash functionality: backup messages before removing them
 +
*IMAP features:
 +
**Security: supports TLS/SSL via imaps: (port 993) and STARTTLS; CRAM-MD5 for authentication
 +
**Supports NAMESPACE for simplified configuration
 +
**Pipelining for maximum speed (currently only partially implemented)
 +
 +
==Configuring==
 +
 +
The configuration file is mandatory; mbsync will not run without it.
 +
 +
example ~/.mbsyncrc:
 +
{{hc|~/.mbsyncrc|2=
 +
<nowiki>
 +
IMAPAccount gmail
 +
# Address to connect to
 +
Host imap.gmail.com
 +
User username@gmail.com
 +
Pass ***************
 +
# Use SSL
 +
UseIMAPS yes
 +
# the first two have to be manually retrieved, use:
 +
# "openssl s_client -connect imap.gmail.com:993 -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sed -ne '1,/-END CERTIFICATE-/p' > ~/.mail/gmail.crt"
 +
# and "$ openssl s_client -connect imap.gmail.com:993 -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | tac | sed -ne '1,/-BEGIN CERTIFICATE-/p' | tac > ~/.mail/google.crt"
 +
CertificateFile ~/.mail/gmail.crt
 +
CertificateFile ~/.mail/google.crt
 +
# provided by ca-certificates
 +
CertificateFile /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
 +
 +
IMAPStore gmail-remote
 +
Account gmail
 +
 +
MaildirStore gmail-local
 +
# The trailing "/" is important
 +
Path ~/.mail/gmail/
 +
Inbox ~/.mail/gmail/Inbox
 +
 +
Channel gmail
 +
Master :gmail-remote:
 +
Slave :gmail-local:
 +
# Exclude everything under the internal [Gmail] folder, except the interesting folders
 +
Patterns * ![Gmail]* “[Gmail]/Sent Mail” “[Gmail]/Starred” “[Gmail]/All Mail”
 +
# include everything
 +
#Patterns *
 +
# Automatically create missing mailboxes, both locally and on the server
 +
Create Both
 +
# Save the synchronization state files in the relevant directory
 +
SyncState *
 +
</nowiki>
 +
}}
 +
 +
==Usage==
 +
First make any folders that were specified as Maildirs.
 +
$ mkdir -p ~/.mail/gmail
 +
Then to retrieve the mail for a specific channel run:
 +
$ mbsync gmail
 +
or to retrive the mail for all channels:
 +
$ mbsync -a
 +
==External Links==
 +
*[http://sourceforge.net/projects/isync/ Sourceforge page]
 +
*[http://kevin.deldycke.com/2012/08/gmail-backup-mbsync/ backing up gmail with mbsync]

Revision as of 18:07, 2 October 2012

isync is a command line application which synchronizes mailboxes; currently Maildir and IMAP4 mailboxes are supported. 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

Installing

isyncAUR can be installed from the AUR.

Features

  • Fine-grained selection of synchronization operations to perform
  • Synchronizes single mailboxes or entire mailbox collections
  • Partial mirrors possible: keep only the latest messages locally
  • Trash functionality: backup messages before removing them
  • IMAP features:
    • Security: supports TLS/SSL via imaps: (port 993) and STARTTLS; CRAM-MD5 for authentication
    • Supports NAMESPACE for simplified configuration
    • Pipelining for maximum speed (currently only partially implemented)

Configuring

The configuration file is mandatory; mbsync will not run without it.

example ~/.mbsyncrc:

~/.mbsyncrc
IMAPAccount gmail
# Address to connect to
Host imap.gmail.com
User username@gmail.com
Pass ***************
# Use SSL
UseIMAPS yes
# the first two have to be manually retrieved, use:
# "openssl s_client -connect imap.gmail.com:993 -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sed -ne '1,/-END CERTIFICATE-/p' > ~/.mail/gmail.crt"
# and "$ openssl s_client -connect imap.gmail.com:993 -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | tac | sed -ne '1,/-BEGIN CERTIFICATE-/p' | tac > ~/.mail/google.crt"
CertificateFile ~/.mail/gmail.crt
CertificateFile ~/.mail/google.crt
# provided by ca-certificates
CertificateFile /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt

IMAPStore gmail-remote
Account gmail

MaildirStore gmail-local
# The trailing "/" is important
Path ~/.mail/gmail/
Inbox ~/.mail/gmail/Inbox

Channel gmail
Master :gmail-remote:
Slave :gmail-local:
# Exclude everything under the internal [Gmail] folder, except the interesting folders
Patterns * ![Gmail]* “[Gmail]/Sent Mail” “[Gmail]/Starred” “[Gmail]/All Mail”
# include everything
#Patterns *
# Automatically create missing mailboxes, both locally and on the server
Create Both
# Save the synchronization state files in the relevant directory
SyncState *

Usage

First make any folders that were specified as Maildirs.

$ mkdir -p ~/.mail/gmail

Then to retrieve the mail for a specific channel run:

$ mbsync gmail

or to retrive the mail for all channels:

$ mbsync -a

External Links