Commit f107692c authored by Mickaël Guessant's avatar Mickaël Guessant

Doc: document IMAP tags to Exchange categories custom mappings

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2475 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent b03058c3
......@@ -61,5 +61,51 @@
</p>
</subsection>
</section>
<section name="Optional additional step">
<subsection name="Thunderbird mail message tags">
<p>In Thunderbird email messages can be organized with message tags. Outlook provides
similar functionality with categories. DavMail's IMAP gateway can transparently
translate tags to categories (and vice versa). For custom defined tags it may be
necessary to tell DavMail how to convert tags to categories.
</p>
<p>Thunderbird stores tags on the server using IMAP keywords. But internally
Thunderbird uses a mapping between the user visible tag names and the
actually used keywords. For instance, the <strong>To Do</strong> tag is represented by
the <strong>$label4</strong> keyword. Assuming you want the Outlook categories to have the
same names as the Thunderbird tags, DavMail must know which keywords
Thunderbird uses for each tag.
</p>
<p>The keywords used by Thunderbird can be found through Preferences -&gt;
Advanced -%gt; Config Editor, and searching for <code>mailnews.tags.*.tag</code>,
which will show them as <code>mailnews.tags.<i>keyword</i>.tag</code> settings
with their corresponding <i>tag</i> user visible value.
</p>
<p>Some default tags are defined in Thunderbird, for which DavMail uses a
default mapping to categories:
</p>
<source><![CDATA[
$label1=Important
$label2=Work
$label3=Personal
$label4=To Do
$label5=Later]]>
</source>
<p>These mappings can be overridden and extended by manually adding properties to the
DavMail settings file (<code>.davmail.properties</code>) as
<code>davmail.imapFlags.<i>keyword</i>=<i>category</i></code>, like this:
</p>
<source><![CDATA[
davmail.imapFlags.$label2=Hobby
davmail.imapFlags.some_test_tag=Some test Category]]>
</source>
</subsection>
</section>
</body>
</document>
\ No newline at end of file
......@@ -206,14 +206,20 @@ public class TestImap extends AbstractImapTestCase {
resetTestFolder();
appendMessage();
// add predefined and custom keyword flags
// add predefined keyword flag
writeLine(". UID STORE " + messageUid + " +FLAGS ($label4)");
assertEquals(". OK STORE completed", readFullAnswer("."));
writeLine(". UID FETCH " + messageUid + " (FLAGS)");
assertEquals("* 1 FETCH (UID " + messageUid + " FLAGS (\\Seen \\Draft $label4))", readLine());
assertEquals(". OK UID FETCH completed", readFullAnswer("."));
// remove keyword flags
// check server side categories
ExchangeSession session = ExchangeSessionFactory.getInstance(Settings.getProperty("davmail.username"),Settings.getProperty("davmail.password"));
ExchangeSession.Folder folder = session.getFolder("testfolder");
folder.loadMessages();
assertEquals("To Do", folder.get(0).keywords);
// remove keyword flag
writeLine(". UID STORE " + messageUid + " -FLAGS ($label4)");
assertEquals(". OK STORE completed", readFullAnswer("."));
writeLine(". UID FETCH " + messageUid + " (FLAGS)");
......@@ -225,7 +231,7 @@ public class TestImap extends AbstractImapTestCase {
resetTestFolder();
appendMessage();
// add predefined and custom keyword flags
// add custom keyword flag
writeLine(". UID STORE " + messageUid + " +FLAGS (some_tag)");
assertEquals(". OK STORE completed", readFullAnswer("."));
writeLine(". UID FETCH " + messageUid + " (FLAGS)");
......@@ -238,7 +244,7 @@ public class TestImap extends AbstractImapTestCase {
folder.loadMessages();
assertEquals("Some Category", folder.get(0).keywords);
// remove keyword flags
// remove keyword flag
writeLine(". UID STORE " + messageUid + " -FLAGS (some_tag)");
assertEquals(". OK STORE completed", readFullAnswer("."));
writeLine(". UID FETCH " + messageUid + " (FLAGS)");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment