PIM/Mail.md
... ...
@@ -39,15 +39,36 @@ Client
39 39
40 40
# Offline
41 41
42
-Mutt IMAP isn't available offline. Configure offlineimap and notmuch.
43
-
42
+Mutt IMAP isn't available offline. Configure ~~offlineimap~~ mbsync and notmuch.
44 43
45 44
46 45
## mbsync / isync
47 46
48 47
<https://wiki.archlinux.org/index.php/Isync>
49 48
49
+(`%i` is the subdirectory of the user home `%h` - required to support multiple separate mail accounts.)
50
+
51
+```ini
52
+[Unit]
53
+Description=Mailbox synchronization service
54
+
55
+[Service]
56
+Type=oneshot
57
+ExecStart=/usr/bin/mbsync -c %h/%i/config/isync/mbsyncrc -V -a
58
+# a script to classify messages (optional)
59
+ExecStartPost=%h/%i/config/notmuch-hook.sh
60
+```
50 61
62
+Sync flags when local flags are changed by notmuch by watching the notmuch xapian directory.
63
+
64
+`~/.config/systemd/user/mbsync@.path`
65
+```ini
66
+[Path]
67
+PathChanged=%h/%i/mail/.notmuch/xapian
68
+
69
+[Install]
70
+WantedBy=multi-user.target
71
+```
51 72
52 73
## offlineimap
53 74