]> git.cworth.org Git - notmuch-wiki/blob - software.mdwn
Mention InterIMAP for synchronizing emails
[notmuch-wiki] / software.mdwn
1 [[!img notmuch-logo.png alt="Notmuch logo" class="left"]]
2 # Software working with Maildir and Notmuch
3
4 ## <span id="formats">**Mail storage formats**</span>
5
6 Notmuch can index any mail that is stored as singular files in directory structure.
7 Here are some popular formats used.
8
9 ### <span id="maildir">**Maildir**</span>
10
11 This is the native mail storage format for notmuch.
12 In addition to indexing mail content notmuch can synchronize standard maildir flags with notmuch tags. See [[special-tags]].
13
14 [Original specification](http://cr.yp.to/proto/maildir.html), for extensions see below.
15
16 There are slight differences on how to handle the `new` subdirectory.
17 While the definition specifies it's for freshly-delivered mail before adding flags only, some software (notably mutt) use it for all unread mail even after the flags were added to filenames.
18
19 ### <span id="nntp-spool">**NNTP Spool**</span>
20
21 As NNTP uses incrementing number for each message in a newsgroup those are often used for filenames in NNTP software.
22 Notmuch can index mail stored like this, but flag synchronization is unavailable and mail-reading software that expects maildir might not work with it.
23
24 ### <span id="nntp-spool">**MH folders**</span>
25
26 This is structured very much like NNTP Spool with numbered messages in a directory.
27 Above statements apply.
28
29 ## <span id="frontends">**Notmuch frontends**</span>
30
31 Have a separate [[wiki page|frontends]].
32
33 ## <span id="synchronizers">**Mail fetchers and synchronizers**</span>
34
35 <table>
36   <thead>
37     <tr>
38       <th>Name</th>
39       <th>Bidirectional</th>
40       <th>Protocol</th>
41       <th>Keywords/tags</th>
42       <th>More info</th>
43     </th>
44   </thead>
45   <tbody>
46     <tr>
47       <td><a href="http://offlineimap.org/">offlineimap</a></td>
48       <td>yes</td>
49       <td>IMAP4</td>
50       <td>standard-only?</td>
51       <td>-</td>
52     </tr>
53     <tr>
54       <td><a href="http://www.muchsync.org/">muchsync</a></td>
55       <td>yes</td>
56       <td>custom</td>
57       <td>notmuch database</td>
58       <td>-</td>
59     </tr>
60     <tr>
61       <td><a href="http://wiki2.dovecot.org/Tools/Doveadm/Sync">dsync</a></td>
62       <td>yes</td>
63       <td>IMAP4/POP3/custom</td>
64       <td>dovecot format</td>
65       <td>
66         <ul>
67         <li><a href="http://wiki2.dovecot.org/Migration/Dsync">IMAP/POP howto</a></li>
68         <li><a href="http://wiki2.dovecot.org/Replication">replication howto<a></li>
69         </ul>
70       </td>
71     </tr>
72     <tr>
73       <td><a href="http://isync.sourceforge.net/">mbsync/isync</a></td>
74       <td>yes</td>
75       <td>IMAP4</td>
76       <td>standard-only</td>
77       <td>-</td>
78     </tr>
79     <tr>
80       <td><a href="http://pyropus.ca/software/getmail/">getmail</a></td>
81       <td>no</td>
82       <td>IMAP4/POP3</td>
83       <td>no</td>
84       <td>-</td>
85     </tr>
86     <tr>
87       <td><a href="http://fetchmail.berlios.de/">fetchmail</a></td>
88       <td>no</td>
89       <td>IMAP4/POP3</td>
90       <td>no</td>
91       <td>no maildir support, can deliver to SMTP or local MDA</td>
92     </tr>
93     <tr>
94       <td><a href="https://github.com/OfflineIMAP/imapfw">imapfw</a></td>
95       <td>yes</td>
96       <td>IMAP4</td>
97       <td>?</td>
98       <td>work in progress</td>
99     </tr>
100     <tr>
101       <td><a href="https://guilhem.org/interimap/">interimap</a></td>
102       <td>yes</td>
103       <td>IMAP4</td>
104       <td>dovecot</td>
105       <td>Fast bidirectional synchronization between IMAP servers</td>
106     </tr>
107     <tr>
108       <td><a href="https://github.com/gauteh/lieer">lieer</a></td>
109       <td>tags: yes, mail: fetch</td>
110       <td>GMail</td>
111       <td>bi-directional tag</td>
112       <td>Fast email-fetching and two-way tag synchronization between notmuch and GMail written using GMail API and Notmuch Python</td>
113     </tr>
114   </tbody>
115 </table>
116
117 Other links of interest:
118
119 * [mswatch](http://mswatch.sourceforge.net/) Triggers sync on mailbox changes.
120 * [mailsync](http://mailsync.sourceforge.net/) Based on UW library that doesn't support Maildir out of the box. MH folders are supported.
121 * [imapsync](http://imapsync.lamiral.info/) (unidirectional)
122 * [slrnpull](http://slrn.sourceforge.net/docs/slrn-FAQ-5.html) Fetches NNTP newsgroups (such as USENET or Gmane) into numbered spool format which notmuch can index.
123
124 ## <span id="mda">**Filters and mail delivery agents**</span>
125
126 Mail delivery agent (or MDA for short) is a piece of software that performs the
127 final step of mail transfer: saving it into user's mailbox.
128 This is invoked either by SMTP server (MTA), mail fetcher, or chained from
129 other delivery agent to perform such tasks as mail filtering, saving to
130 different folders, or forwarding to different addresses.
131
132 Following software can deliver to Maildir mailboxes:
133
134 * [procmail](http://www.procmail.org/)
135 * Courier (or standalone): [maildrop](http://www.courier-mta.org/maildrop/)
136 * Dovecot: [dovecot-lda](http://wiki.dovecot.org/LDA)
137 * Postfix: [local](http://www.postfix.org/local.8.html)
138 * Exim: [appendfile](http://exim.org/exim-html-current/doc/html/spec_html/ch-the_appendfile_transport.html#SECTmaildirdelivery)
139 * Qmail: [qmail-local](http://qmail.org/man/man8/qmail-local.html)
140 * OpenSMTPD: supports tuning via [.forward](https://www.opensmtpd.org/forward.5.html) files
141
142 Many MDAs also support filtering via [Sieve](https://en.wikipedia.org/wiki/Sieve_%28mail_filtering_language%29) language.
143
144 ## <span id="imap">**IMAP servers**</span>
145
146 Internet Mail Access Protocol servers that can interoperate with notmuch.
147 It is of note that IMAP protocol supports storing so-called [keywords](https://tools.ietf.org/html/rfc3501#page-11) (user-defined flags) which are mostly equivalent to notmuch tags.
148 Unfortunately Maildir does not have standard way to encode keywords, so there are extensions necessary to store that information.
149
150 ### <span id="dovecot">**Dovecot**</span>
151
152 [Homepage](http://dovecot.org/) | [Maildir extensions](http://wiki.dovecot.org/MailboxFormat/Maildir)
153
154 The fully standard-compliant IMAP server.
155 Has efficient syncing and multimaster replication capability.
156
157 Up to 26 different keywords can be stored per-maildir using Maildir flags a-z.
158 Their meaning is defined via `dovecot-keywords` file which is simple, well-defined text file which maps each letter to specific tag/keyword.
159 If more than 26 keywords appear in one Maildir then some of them are stored in [dovecot-specific](http://wiki.dovecot.org/Design/Indexes/MainIndex) [index files](http://wiki.dovecot.org/IndexFiles).
160 Dovecot's dsync will sync keywords into this format.
161
162 ### <span id="courier">**Courier**</span>
163
164 [Homepage](http://www.courier-mta.org/) | [Maildir++ specification](http://www.courier-mta.org/maildir.html) | [Further Maildir++ specification](http://www.courier-mta.org/imap/README.maildirquota.html)
165
166 The origin of Maildir++ format which was also adopted by dovecot, among others.
167 Ships many useful commandline tools.
168
169 It stores keywords in [courierimapkeywords](http://www.courier-mta.org/imap/README.imapkeywords.html) inside the maildir.
170 It supports arbitrary amount of keywords, but unfortunately actually reading them is rather convoluted process.
171
172 ### <span id="imap-other">**Other**</span>
173
174 * [UW-IMAP](http://www.washington.edu/imap/) supports MH folders and there is a patch for Maildir support.
175 * [Cyrus](http://www.cyrusimap.org/) has it's [own mailbox format](http://www.cyrusimap.org/docs/cyrus-imapd/2.5.7/internal/mailbox-format.php), but stores messages as single files which should be indexable.