mirror of
https://github.com/imapsync/imapsync.git
synced 2025-08-04 07:51:52 +02:00
110 lines
3.7 KiB
Text
110 lines
3.7 KiB
Text
|
|
% $Id: TUTORIAL.t2t,v 1.5 2015/05/12 07:20:14 gilles Exp gilles $
|
|
|
|
= Tutorial for imapsync =
|
|
|
|
== Background knowledge about emailboxes ==
|
|
|
|
Three Internet protocols are used to access almost all email accounts:
|
|
POP3, IMAP, HTTP.
|
|
|
|
The oldest one still used is POP3, Post Office Protocol. POP3 allows only
|
|
one main box called INBOX. With POP3 messages have no flags, no Seen/UnSeen
|
|
Forwarded Flagged labels. Messages are often
|
|
removed from the POP3 server each time a software client looks into it,
|
|
so messages only appear on the client host that fetched them, they are
|
|
unavailable from any other system located elsewhere.
|
|
|
|
|
|
The second protocol to deal with email messages is IMAP, Internet Message Access Protocol.
|
|
IMAP allows a hierarchy of mailboxes also called folders, concurrent accesses,
|
|
tagging with flags, search by many criterium like date, subject, size etc.
|
|
IMAP protocol presents most of the features POP lacks.
|
|
Messages stay on the imap server so any client on the network can access them
|
|
at any time from anywhere, the same messages with the same flags.
|
|
|
|
The third protocol to access email messages is HTTP, HyperText Transfer Protocol.
|
|
HTTP is the protocol to surf the web.
|
|
Web browsers like Google Chrome, Mozilla Firefox, Internet Explorer, Safari,
|
|
are HTTP client softwares.
|
|
Webmails often offer the same features than imap servers because
|
|
webmails underlying storage systems are often imap servers.
|
|
So webmail mailboxes like Gmail, Yahoo, Exchange, Zimbra or Office365 are also accessible via imap.
|
|
|
|
The conclusion of this protocol review is that IMAP can be used
|
|
to access mailboxes most of the time. Here comes imapsync.
|
|
|
|
Software imapsync is a command line tool to
|
|
copy, migrate, backup or synchronize IMAP mailboxes.
|
|
|
|
|
|
Command line means imapsync is not graphical, it is textual,
|
|
you have to type characters on your keyboard.
|
|
Your fingers will not suffer anyway because
|
|
I wrote file examples nearly ready to go.
|
|
Most of the time you only have to change values
|
|
in those files and adapt them to your context.
|
|
|
|
Do not be afraid, the mouse will not be forsaken.
|
|
You can still use the mouse to launch an editor,
|
|
select/copy/paste complete examples
|
|
and run the little script you edit with a doubleclick.
|
|
|
|
Imapsync runs on Unix or Windows.
|
|
It is because imapsync is written in the Perl language
|
|
and thanks to the Perl creators Perl runs everywhere.
|
|
Outside imapsync life is different;
|
|
Historically Windows came after Unix and the marvelous designers
|
|
in this old times decided it would be very cool
|
|
to not share the same syntax for doing the same things.
|
|
Thanks guys, great thinking!
|
|
|
|
To avoid you to learn by headaches a system you do not master
|
|
I will give all examples in both worlds, Unix and Windows.
|
|
Macintosh users are in the Unix world now but do not tell them,
|
|
it can hurt the olders.
|
|
|
|
|
|
== Conventions ==
|
|
|
|
Imapsync has many options but you can ignore most of them
|
|
and still make great transfers.
|
|
|
|
In this documentation I write all the examples as a complete example.
|
|
In order to simplify the reading or the printing,
|
|
the command is written on several lines.
|
|
It could be written on one single line;
|
|
if you prefer the whole command on one line then
|
|
just remove the last character of each line,
|
|
it is the "\" character on Unix examples
|
|
or the "^" character on Windows examples.
|
|
|
|
For example, on Unix
|
|
|
|
```
|
|
imapsync \
|
|
--host1 imap.truc.org \
|
|
--user1 foo \
|
|
--password1 secret1 \
|
|
...
|
|
```
|
|
is equivalent to
|
|
```
|
|
imapsync --host1 imap.truc.org --user1 foo --password1 secret1 ...
|
|
```
|
|
|
|
and on Windows
|
|
```
|
|
imapsync.exe ^
|
|
--host1 imap.truc.org ^
|
|
--user1 foo ^
|
|
--password1 secret1 ^
|
|
...
|
|
```
|
|
is equivalent to
|
|
```
|
|
imapsync --host1 imap.truc.org --user1 foo --password1 secret1 ...
|
|
```
|
|
|
|
|
|
|