From 366f9ab42f7e09cc9ee0f7301f8f4d7cde0eafdd Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Wed, 3 Jul 2019 08:44:11 +0200 Subject: [PATCH] doc: Refactor Dovecot and OfflineIMAP migration sections Move the sections on (a) Dovecot morals and (b) migration from OfflineIMAP from the baseline case document to separate documents. --- doc/baseline.mdwn | 80 ---------------------------------- doc/dovecot-comments.mdwn | 72 ++++++++++++++++++++++++++++++ doc/offlienimap-migration.mdwn | 9 ++++ doc/overview.mdwn | 9 ++++ 4 files changed, 90 insertions(+), 80 deletions(-) create mode 100644 doc/dovecot-comments.mdwn create mode 100644 doc/offlienimap-migration.mdwn diff --git a/doc/baseline.mdwn b/doc/baseline.mdwn index 697cb62..29b121b 100644 --- a/doc/baseline.mdwn +++ b/doc/baseline.mdwn @@ -217,83 +217,3 @@ systemctl --user daemon-reload ``` This is standard Systemd configuration. See "systemd.unit(5)". - -# Dovecot morals (comments on configuration) - -Stop read here if you are happy with having it all working. - -Dovecot has many intricate options for configuration. As explained, -the setup described in this guide is straight forward. The interested -can visit the bellow section of comments. - -## Secure your instance - -Above configuration assumes that you will disable all of dovecot. As a -precaution take a few security measures regarding the service in case -you happen to start it (or need it for purposes not presented here). - -Edit */etc/dovecot/conf.d/10-ssl.conf*. The latter to `ssl = no` - -Make sure dovecot is not exposed on Internet on ports. Edit -*/etc/dovecot/conf.d/10-master.conf*: - - -``` -service imap-login { - inet_listener imap { - port = 0 - } - inet_listener imaps { - port = 0 - } -} - -``` - -Restart and verify with `ss -ptln` that nothing listens on port 143 or -993. - -## Dovecot namespaces - -Sources - - * Dovecot v2.x - documentation, [Namespaces](https://wiki2.dovecot.org/Namespaces) - -The benefit of using namespaces is that Dovecot could support -multiple mailboxes from one instance. Therefore namespaces. would be -the natural choice for the described setup. - -One reason not to use namespaces is that InterIMAP yet doesn't -support it. However, namespaces would also add unnecessary -complexity. The setup described here is straight forward. Multiple -instances of Dovecot does not correspond to a lot of overhead, and -InterIMAP it would any how causes extra dovecot instances. - -## Maildir file system layout - -As said, local storage is configured to be in Maildir format. In -theory Mutt has native Maildir support and could directly parse the -Maildir folders. Using the IMAP server to serve the content is however -preferred. - -Source - - * Dovecot's - documentation, - [Maildir configuration](https://wiki.dovecot.org/MailLocation/Maildir) - -Dovecot uses Maildir++ directory layout. Folders are prefixed with dot -(.). There is an option (suffix) `LAYOUT=fs` to enable file system -layout. We recommend the default configuration. File system level -management should be treated as dovecot internals, and looked at -through the IMAP lens, not directly. Also, Maildir++ correspond to a -clean structure where Maildir's *new*, *tmp* and *cur* folders are -conceptually separated from mail folders through the naming pattern. - -# Migrate from OfflineIMAP - -[OfflineIMAP](https://www.offlineimap.org) is a mailbox -synchronisation solution. In theory one might could reuse a Malildir -setup from OfflineIMAP. Don't. It is easy enough to re-synchronise all -email fresh. diff --git a/doc/dovecot-comments.mdwn b/doc/dovecot-comments.mdwn new file mode 100644 index 0000000..d9ba262 --- /dev/null +++ b/doc/dovecot-comments.mdwn @@ -0,0 +1,72 @@ +--- +title: Dovecot morals (comments on configuration) +... + +Dovecot has many intricate options for configuration. As explained, +the setup described in this guide is straight forward. The interested +can visit the bellow section of comments. + +# Secure your instance + +Above configuration assumes that you will disable all of dovecot. As a +precaution take a few security measures regarding the service in case +you happen to start it (or need it for purposes not presented here). + +Edit */etc/dovecot/conf.d/10-ssl.conf*. The latter to `ssl = no` + +Make sure dovecot is not exposed on Internet on ports. Edit +*/etc/dovecot/conf.d/10-master.conf*: + + +``` +service imap-login { + inet_listener imap { + port = 0 + } + inet_listener imaps { + port = 0 + } +} + +``` + +Restart and verify with `ss -ptln` that nothing listens on port 143 or +993. + +# Dovecot namespaces + +Sources + + * Dovecot v2.x + documentation, [Namespaces](https://wiki2.dovecot.org/Namespaces) + +The benefit of using namespaces is that Dovecot could support +multiple mailboxes from one instance. Therefore namespaces. would be +the natural choice for the described setup. + +One reason not to use namespaces is that InterIMAP yet doesn't +support it. However, namespaces would also add unnecessary +complexity. The setup described here is straight forward. Multiple +instances of Dovecot does not correspond to a lot of overhead, and +InterIMAP it would any how causes extra dovecot instances. + +# Maildir file system layout + +As said, local storage is configured to be in Maildir format. In +theory Mutt has native Maildir support and could directly parse the +Maildir folders. Using the IMAP server to serve the content is however +preferred. + +Source + + * Dovecot's + documentation, + [Maildir configuration](https://wiki.dovecot.org/MailLocation/Maildir) + +Dovecot uses Maildir++ directory layout. Folders are prefixed with dot +(.). There is an option (suffix) `LAYOUT=fs` to enable file system +layout. We recommend the default configuration. File system level +management should be treated as dovecot internals, and looked at +through the IMAP lens, not directly. Also, Maildir++ correspond to a +clean structure where Maildir's *new*, *tmp* and *cur* folders are +conceptually separated from mail folders through the naming pattern. diff --git a/doc/offlienimap-migration.mdwn b/doc/offlienimap-migration.mdwn new file mode 100644 index 0000000..6bc0076 --- /dev/null +++ b/doc/offlienimap-migration.mdwn @@ -0,0 +1,9 @@ +--- +title: | + Migrate from OfflineIMAP +... + +[OfflineIMAP](https://www.offlineimap.org) is a mailbox +synchronisation solution. In theory one might could reuse a Malildir +setup from OfflineIMAP. Don't. It is easy enough to re-synchronise all +email fresh. diff --git a/doc/overview.mdwn b/doc/overview.mdwn index cd9bcee..f86ebed 100644 --- a/doc/overview.mdwn +++ b/doc/overview.mdwn @@ -12,3 +12,12 @@ documentation: multiple email accounts Start with the baseline configuration and apply expansions as needed. + +Here follow commentary documentation to cover technical aspects of the +setup or give deeper understanding. + + 3. [Dovecot morals](dovecot-comments.mdwn) -- Comments on some of + Dovecot's many intricate options for configuration + + 4. [Migrate from OfflineIMAP](offlienimap-migration.mdwn) -- What to + consider while migrate from other mail synchronisation software -- 2.39.2