1 [[!img notmuch-logo.png alt="Notmuch logo" class="left"]]
2 # Sofware working with Maildir and Notmuch
4 ## <span id="formats">**Mail storage formats**</span>
6 Notmuch can index any mail that is stored as singular files in directory structure.
7 Here are some popular formats used.
9 ### <span id="maildir">**Maildir**</span>
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]].
14 [Original specification](http://cr.yp.to/proto/maildir.html), for extensions see below.
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.
19 ### <span id="nntp-spool">**NNTP Spool**</span>
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.
24 ### <span id="nntp-spool">**MH folders**</span>
26 This is structured very much like NNTP Spool with numbered messages in a directory.
27 Above statements apply.
29 ## <span id="frontends">**Notmuch frontends**</span>
31 Have a separate [[wiki page|frontends]].
33 ## <span id="synchronizers">**Mail fetchers and synchronizers**</span>
39 <th>Bidirectional</th>
41 <th>Keywords/tags</th>
47 <td><a href="http://offlineimap.org/">offlineimap</a></td>
50 <td>standard-only?</td>
54 <td><a href="http://www.muchsync.org/">muchsync</a></td>
57 <td>notmuch database</td>
61 <td><a href="http://wiki2.dovecot.org/Tools/Doveadm/Sync">dsync</a></td>
63 <td>IMAP4/POP3/custom</td>
64 <td>dovecot format</td>
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>
73 <td><a href="http://isync.sourceforge.net/">mbsync/isync</a></td>
76 <td>standard-only</td>
80 <td><a href="http://pyropus.ca/software/getmail/">getmail</a></td>
87 <td><a href="http://fetchmail.berlios.de/">fetchmail</a></td>
91 <td>no maildir support, can deliver to SMTP or local MDA</td>
94 <td><a href="https://github.com/OfflineIMAP/imapfw">imapfw</a></td>
98 <td>work in progress</td>
103 Other links of interest:
105 * [mswatch](http://mswatch.sourceforge.net/) Triggers sync on mailbox changes.
106 * [mailsync](http://mailsync.sourceforge.net/) Based on UW library that doesn't support Maildir out of the box. MH folders are supported.
107 * [imapsync](http://imapsync.lamiral.info/) (unidirectional)
108 * [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.
110 ## <span id="mda">**Filters and mail delivery agents**</span>
112 * [procmail](http://www.procmail.org/)
113 * Courier (or standalone): [maildrop](http://www.courier-mta.org/maildrop/)
114 * Dovecot: [dovecot-lda](http://wiki.dovecot.org/LDA)
115 * Postfix: [local](http://www.postfix.org/local.8.html)
116 * Exim: [appendfile](http://exim.org/exim-html-current/doc/html/spec_html/ch-the_appendfile_transport.html#SECTmaildirdelivery)
117 * Qmail: [qmail-local](http://qmail.org/man/man8/qmail-local.html)
118 * OpenSMTPD: supports tuning via [.forward](https://www.opensmtpd.org/forward.5.html) files
120 Many MDAs also support filtering via [Sieve](https://en.wikipedia.org/wiki/Sieve_%28mail_filtering_language%29) language.
122 ## <span id="imap">**IMAP servers**</span>
124 Internet Mail Access Protocol servers that can interoperate with notmuch.
125 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.
126 Unfortunately Maildir does not have standard way to encode keywords, so there are extensions neccessary to store that information.
128 ### <span id="dovecot">**Dovecot**</span>
130 The fully standard-compliant IMAP server.
131 Has efficient syncing and multimaster replication capability.
133 * Homepage: http://dovecot.org/
134 * Maildir extensions: http://wiki.dovecot.org/MailboxFormat/Maildir
136 Up to 26 different keywords can be stored per-maildir using Maildir flags a-z.
137 Their meaning is defined via `dovecot-keywords` file which is simple, well-defined text file which maps each letter to specifig tag/keyword.
138 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).
139 Dovecot's dsync will sync keywords into this format.
141 ### <span id="dovecot">**Courier**</span>
143 The origin of [Maildir++](http://www.courier-mta.org/imap/README.maildirquota.html) format. Ships many useful commandline tools.
145 Further maildir specification: http://www.courier-mta.org/maildir.html
147 It stores keywords in [courierimapkeywords](http://www.courier-mta.org/imap/README.imapkeywords.html) inside the maildir.
148 It supports arbitrary amount of keywords, but unfortunately actually reading them is rather convoluted process.
150 ### <span id="imap-other">**Other**</span>
152 * UW-IMAP supports MH folders and there is a patch for Maildir support.
153 * Cyrus 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.