                  (mu4e-trash-folder           . "/devalot/Trash")
                  (mu4e-refile-folder          . "/devalot/Archive")
                  (mu4e-compose-signature      . ,(pjones:mu4e-read-signature "devalot"))
+                 (smtpmail-queue-dir          . "~/mail/queue/devalot/cur")
                  (smtpmail-smtp-server        . "mail.pmade.com")
                  (smtpmail-smtp-service       . 465)
                  (smtpmail-stream-type        . ssl)

;; General Settings:
(custom-set-variables
  '(mail-user-agent 'mu4e-user-agent)
  '(message-send-mail-function 'async-smtpmail-send-it)
  '(message-kill-buffer-on-exit t)
  '(smtpmail-queue-dir "~/mail/queue/cur")

  '(mu4e-maildir "~/mail")
  '(mu4e-mu-home "~/.cache/mu")


(defun pjones:mu4e-make-queue-directory ()
  "Ensure the send queue directory exists."
  (dolist (ctx mu4e-contexts)
    (let* ((vars (mu4e-context-vars ctx))
           (cur (expand-file-name (alist-get 'smtpmail-queue-dir vars)))
           (dir (file-name-directory (directory-file-name cur))))
      (unless (file-exists-p cur)
        (make-directory (file-name-directory dir) t)
        (call-process "mu" nil nil nil "mkdir" dir)
        (call-process "touch" nil nil nil (concat dir ".noindex"))))))

(defun pjones-mu4e-short-maildir (msg)
  "Format the maildir of MSG so it's as short as possible."
