From 62075385457f9214e639da53f53090288ed4c198 Mon Sep 17 00:00:00 2001 From: Brighid McDonnell Date: Fri, 3 Nov 2017 17:55:27 -0700 Subject: [PATCH 1/3] Add docs for rename flag added in #91 Previously the documentation was silent on this flag, which is an important one for the users who want it. --- docs/source/move_mode.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/source/move_mode.rst b/docs/source/move_mode.rst index 49b0f80..33c4784 100644 --- a/docs/source/move_mode.rst +++ b/docs/source/move_mode.rst @@ -10,6 +10,7 @@ Here is a full sample configuration for move mode: [MailMover] folders = INBOX Junk + rename = False max_age = 15 # rules @@ -77,6 +78,18 @@ in the configuration section. By providing afew will only check mails at most 15 days old. +Rename +------ + +When afew moves mail files, if the the `rename` option in the configuration is +set afew will rename those files. You should probably do this if you're using +the `mbsync` program to interact with your IMAP server. + +.. code-block:: ini + + rename = True + + Limitations ----------- @@ -100,4 +113,3 @@ moving it? ;) feature. If you tag a mail with two tags and there is a rule for each of them, both rules will apply. Your mail will be copied into two destination folders, then removed from its original location. - From 06e0a23bbd39eb3a71500b6a278cd2388de3afd1 Mon Sep 17 00:00:00 2001 From: Brighid McDonnell Date: Mon, 6 Nov 2017 13:50:45 -0800 Subject: [PATCH 2/3] Incorporate @flolki's suggested changes Also added some examples of specific error messages that mbsync emits when the rename flag is not say. This should make it so that people google-searching for those error messages are more likely to find this documentation. --- docs/source/move_mode.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/source/move_mode.rst b/docs/source/move_mode.rst index 33c4784..e63063a 100644 --- a/docs/source/move_mode.rst +++ b/docs/source/move_mode.rst @@ -81,9 +81,16 @@ afew will only check mails at most 15 days old. Rename ------ -When afew moves mail files, if the the `rename` option in the configuration is -set afew will rename those files. You should probably do this if you're using -the `mbsync` program to interact with your IMAP server. +Set this option if you are using the `mbsync` IMAP syncing tool. +`mbsync` adds a Unique IDentifier to files' names when it syncs them. +If the `rename` option is not set, moving files can cause UID conflicts +and prevent `mbsync` from syncing with error messages such as +"Maildir error: duplicate UID 1234" or "UID 567 is beyond highest assigned UID 89". +When the option is set, afew will rename files while moving them, +removing the UID but preserving other `mbsync` information. +This allows `mbsync` to assign a new UID to the file and avoid UID conflicts. + +If you are using `offlineimap`, you can safely ignore this option. .. code-block:: ini From 72099ded49cb043a49e8ebcc446a37f85ce621b6 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 7 Nov 2017 12:19:13 +0100 Subject: [PATCH 3/3] fix typos in docs for rename option --- docs/source/move_mode.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/move_mode.rst b/docs/source/move_mode.rst index e63063a..5c8c8ce 100644 --- a/docs/source/move_mode.rst +++ b/docs/source/move_mode.rst @@ -82,10 +82,11 @@ Rename ------ Set this option if you are using the `mbsync` IMAP syncing tool. -`mbsync` adds a Unique IDentifier to files' names when it syncs them. +`mbsync` adds a unique identifier to files' names when it syncs them. If the `rename` option is not set, moving files can cause UID conflicts and prevent `mbsync` from syncing with error messages such as "Maildir error: duplicate UID 1234" or "UID 567 is beyond highest assigned UID 89". + When the option is set, afew will rename files while moving them, removing the UID but preserving other `mbsync` information. This allows `mbsync` to assign a new UID to the file and avoid UID conflicts.