forked from imapsync/imapsync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FAQ.Folders_Selection.txt
112 lines (68 loc) · 3.59 KB
/
FAQ.Folders_Selection.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/cat
$Id: FAQ.Folders_Selection.txt,v 1.8 2019/07/27 20:04:46 gilles Exp gilles $
This documentation is also available online at
https://imapsync.lamiral.info/FAQ.d/
https://imapsync.lamiral.info/FAQ.d/FAQ.Folders_Selection.txt
=======================================================================
Imapsync tips to select folders.
=======================================================================
By default, Imapsync syncs all folders, one by one, in alphanumeric order.
The IMAP protocol has a specific way to code folders names,
especially when these names use non-ascii 7bit characters.
This encoding is called utf7imap.
Imapsync uses the same encoding as IMAP, utf7imap.
In order to well specify folders names on the command line, imapsync
prints the complete folder list of both sides at the beginning of each run.
The left column is the encoding you have to use, without the first enclosing
square brackets [], the right column is the human utf8 view.
=======================================================================
Q. How can I sync only one folder?
R. Use --folder option.
imapsync ... --folder MyFolder
If you have more specific folders to sync just add several --folder
imapsync ... --folder MyFolder --folder ThisFolder --folder ThatFolder
=======================================================================
Q. What are --subscribe and --subscribed for, and how can they be used?
R. In the IMAP protocol each user can subscribe to one or more folders.
Then one can configure his email software to just see his subscribed
folders. That's an IMAP feature.
Imapsync can use this imap feature to select subscribed folders
and also subscribe to folders on host2. Here are the options:
--subscribed : Transfers subscribed folders.
--subscribe : Subscribe to the folders transferred on the
host2 that are subscribed on host1. On by default.
--subscribeall : Subscribe to the folders transferred on the
host2 even if they are not subscribed on host1.
=======================================================================
Q. I want to exclude a folder hierarchy like "public"
R. Use:
--exclude "^public\."
or maybe
--exclude '^"public\.'
In the example given the character "." is the folder separator, you
can omit it. Just take the string as it appears on the imapsync
output line :
From folders list : [INBOX] [public.dreams] [etc.]
=======================================================================
Q. I want to exclude only INBOX
R. Use:
imapsync ... --exclude "^INBOX$"
A good way to see what will be done is to first use:
imapsync ... --exclude "^INBOX$" --justfolders --nofoldersizes --dry
=======================================================================
Q. I want to exclude folders matching SPAM no matter the case,
aka how to be case insensitive
R. Use:
imapsync ... --exclude "(?i)spam"
A good way to see what will be done is to first use:
imapsync ... --exclude "(?i)spam" --justfolders --nofoldersizes --dry
=======================================================================
Q. I want the --folder "MyFolder" option be recursive.
Two solutions:
R1. Use
--folderrec "MyFolder"
R2. Use --include "^MyFolder"
Then the folder "MyFolder" and all its subfolders will be handled
and only them.
=======================================================================
=======================================================================