Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Emacs config notes


Some mu4e configuration is kept in ./mu4e.el.gpg.



Stolen from the mu4e manual.

| emacs   |
|    +------+
+----| mu4e | --> send mail (smtpmail)
      |  A
      V  |  ---/ search, view, move mail
+---------+    \
|   mu    |
  |    A
  V    |
| Maildir |  <--- receive mail (fetchmail,
+---------+                     offlineimap, ...)

mu and mu4e

brew install mu --with-emacs

mu index --maildir=~/Mail

set simpson-mail-update-command in mu4e.el.gpg to a string that will be run to check for mail on the CLI to update the mail icon, e.g. (setq simpson-mail-update-command "mu find flag:unread maildir:/service/Inbox 2>/dev/null")

One issue to work around here:

After a lot of digging around I found the solution was in the mbsync and mu4e manuals (of course). The problem is caused because mu4e does not by default rename files when moving them to a new directory and this then causes problems for mbsync. This is easily fixed by setting

(setq mu4e-change-filenames-when-moving t)

mbsync or offlineimap


brew install isync

IMAPAccount service
PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg"

IMAPStore service-remote
Account service

MaildirStore service-local
Path ~/Mail/service/
Inbox ~/Mail/service/Inbox

Channel service
Master :service-remote:
Slave :service-local:
Patterns *
# Automatically create missing mailboxes, both locally and on the server
Create Slave
SyncState *
  • the brew services setup for isync doesn’t work. I rolled my own launchd plist plus a small shell script to sync messages every couple minutes.

brew install offlineimap brew services start offlineimap

accounts = name

[Account name]
localrepository = local
remoterepository = remote
postsynchook = mu index --maildir=~/Mail

[Repository local]
type = Maildir
localfolders = ~/Mail/name

[Repository remote]
type = IMAP
remotehost =
remoteuser = loginUser
remotepass = puppies
sslcacertfile = /usr/local/etc/openssl/cert.pem


(add-to-list 'mu4e-bookmarks
              :name  "name"
              :query "maildir:/path/path/INBOX OR maildir:/otherpath/otherpath/INBOX"
              :key ?c))


  • These variables in context can also be set outside of a context if there aren’t multiple accounts.
(setq mu4e-contexts `(
                        :name "First context"
                        :match-func (lambda (msg)
                                      (when msg
                                        (mu4e-message-contact-field-matches msg :to "")))
                        :vars '((user-mail-address . "")
                                (mu4e-sent-folder . "/path/path/Sent Items")
                                (mu4e-drafts-folder . "/path/path/Drafts")
                                (mu4e-trash-folder . "/path/path/Trash")
                                (mu4e-refile-folder . "/path/path/Archive")
                                (smtpmail-user . "")
                                (smtpmail-smtp-server . "fastmail smtp")))
                        :name "Work"
                        :match-func (lambda (msg)
                                      (when msg
                                        (or (mu4e-message-contact-field-matches msg :to "work email")
                                            (mu4e-message-contact-field-matches msg :to "other email like a list account or alias"))))
                        :vars '((user-mail-address . "")
                                (mu4e-sent-folder . "/path/path/Sent Mail")
                                (mu4e-drafts-folder . "/path/path/Drafts")
                                (mu4e-trash-folder . "/path/path/Trash")
                                (mu4e-refile-folder . "/path/path/All Mail")
                                (smtpmail-smtp-server . "other smtp" )
                                (smtpmail-user . "smtp user")
                                (mu4e-sent-messages-behavior . delete)))))

Note that mu4e-sent-messages-behavior is set to delete which is ideal for Gmail.


  • authinfo.gpg needs to be setup with the smtp host(s).

machine port 57 login password puppies


You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.