diff options
| -rw-r--r-- | .doom.d/config.el | 19 | ||||
| -rw-r--r-- | .mbsyncrc | 12 |
2 files changed, 27 insertions, 4 deletions
diff --git a/.doom.d/config.el b/.doom.d/config.el index 3b068d2..1150ec4 100644 --- a/.doom.d/config.el +++ b/.doom.d/config.el @@ -330,5 +330,24 @@ littering will happen locally." (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime) +(defun mssola/clean-email-env () + "Clean the maildir environment." + + (interactive) + + ;; The 'ajuntament' maildir is a bit special, since I have to handle it + ;; manually for embarrasing reasons. + (mapc (lambda (f) + (unless (file-directory-p f) + (delete-file f))) + (directory-files (concat (file-name-as-directory (getenv "HOME")) + ".mail/ajuntament/inbox/new") + t))) + +;; This is the only hook that `mu4e' allows us to actually do something around +;; fetching emails. Let's clean the environment before anything, which should be +;; fine for stupid maildirs such as 'ajuntament'. +(add-hook 'mu4e-update-pre-hook 'mssola/clean-email-env) + ;; And a binding! (map! "C-c m" #'mu4e) @@ -119,7 +119,11 @@ Expunge Both SyncState * ## -# ajuntament +# ajuntament: notice that in this case the mailbox is configured to 'Pull' only +# and that deletions are not propagated. This is done to workaround the +# shamefully-low capacity given on this service, in a way that I have to +# periodically *remove everything* on the server. This is hence manually backed +# up. IMAPAccount ajuntament Host mail.diba.cat @@ -142,9 +146,9 @@ Channel ajuntament Master :ajuntament-remote: Slave :ajuntament-local: Patterns * !Calendar -Create Both -Sync All -Expunge Both +Create None +Sync Pull New Flags +Expunge None SyncState * ## |
