diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2025-09-16 22:24:37 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-09-16 22:26:01 +0200 |
| commit | a16f435dac91cfea3c8d63fcd345dada458d53a0 (patch) | |
| tree | 40bc7dcde2a3c110052e4eeadf3719bcc98dfe57 /.config | |
| parent | 650b3277c8cf4fbf47bdfdb18d613eb14c9e5297 (diff) | |
| download | dotfiles-a16f435dac91cfea3c8d63fcd345dada458d53a0.tar.gz dotfiles-a16f435dac91cfea3c8d63fcd345dada458d53a0.zip | |
Add my mailbox.org account into my email setup
This means instructing mbsync on how to fetch email, GNU Emacs on how to
index it, and then msmtp on how to deliver it.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to '.config')
| -rw-r--r-- | .config/emacs/init.el | 28 | ||||
| -rw-r--r-- | .config/msmtp/config | 10 |
2 files changed, 34 insertions, 4 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index c256a4e..dc7b0e9 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -598,6 +598,11 @@ ;; Set the maildir directory in any case. (setq mu4e-maildir "~/data/mail") +(defun mssola/append-current-year-to (prefix) + "Append the current year to the given `prefix'." + + (concat prefix (format-time-string "%Y" (current-time)))) + (defun mssola/mu4e () "Configure mu4e in-place and launch it." @@ -608,7 +613,6 @@ ;; Use `msmtp' as the program for sending email. (setq sendmail-program (executable-find "msmtp") - send-mail-function #'smtpmail-send-it starttls-use-gnutls t message-sendmail-f-is-evil t message-sendmail-extra-arguments '("--read-envelope-from") @@ -618,13 +622,13 @@ ;; gathers all inboxes. (add-to-list 'mu4e-bookmarks '(:name "Inbox" - :query "maildir:/gmail/inbox OR maildir:/comsuse/inbox OR maildir:/sindicat/inbox OR maildir:/uoc/inbox" + :query "maildir:/gmail/inbox OR maildir:/comsuse/inbox OR maildir:/sindicat/inbox OR maildir:/uoc/inbox OR maildir:/mailbox/inbox" :key ?n)) ;; For whatever reason I lost the "messages sent" bookmark. Let's re-add it. (add-to-list 'mu4e-bookmarks '(:name "Sent" - :query "from:mikisabate@gmail.com OR from:msabate@suse.com" + :query "from:mikisabate@gmail.com OR from:msabate@suse.com OR from:mssola@mssola.com" :key ?s)) ;; General mu4e settings. @@ -695,6 +699,24 @@ (mu4e-refile-folder . "/gmail/All") (mu4e-trash-folder . "/gmail/Trash"))) + ;; mailbox.org + ,(make-mu4e-context + :name "mailbox" + :enter-func (lambda () + (mu4e-message "Switching to mailbox.org") + (setq mu4e-sent-messages-behavior 'delete)) + :match-func + (lambda (msg) + (when msg + (string-prefix-p "/mailbox" (mu4e-message-field msg :maildir)))) + :vars `( + (user-mail-address . "mssola@mssola.com") + (mu4e-reply-to-address . "mssola@mssola.com") + (mu4e-drafts-folder . "/mailbox/Drafts") + (mu4e-sent-folder . "/mailbox/sent") + (mu4e-refile-folder . ,(mssola/append-current-year-to "/mailbox/Archive/")) + (mu4e-trash-folder . "/mailbox/Trash"))) + ;; suse.com ,(make-mu4e-context :name "suse" diff --git a/.config/msmtp/config b/.config/msmtp/config index 186ad30..b51be94 100644 --- a/.config/msmtp/config +++ b/.config/msmtp/config @@ -14,6 +14,14 @@ from mikisabate@gmail.com user mikisabate@gmail.com passwordeval "kwallet-query --read-password gmail kdewallet --folder email" +# mailbox.org +account mailbox +host smtp.mailbox.org +port 587 +from mssola@mssola.com +user mssola@mssola.com +passwordeval "kwallet-query --read-password mailbox kdewallet --folder email" + # suse.com account comsuse host smtp.gmail.com @@ -23,4 +31,4 @@ user msabate@suse.com passwordeval "kwallet-query --read-password susecom kdewallet --folder email" # Set a default account -account default : gmail +account default : mailbox |
