aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/msmtp/config8
-rw-r--r--.emacs.d/init.org45
-rw-r--r--.mbsyncrc55
3 files changed, 90 insertions, 18 deletions
diff --git a/.config/msmtp/config b/.config/msmtp/config
index 6bec22e..f52cbc0 100644
--- a/.config/msmtp/config
+++ b/.config/msmtp/config
@@ -45,5 +45,13 @@ from sabatesm@capellades.cat
user dibasp\sabatesm
passwordeval "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.mbsyncpasssusede.gpg"
+# uoc.edu
+account uoc
+host smtp.gmail.com
+port 587
+from mssola@uoc.edu
+user mssola
+passwordeval "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.mbsyncpassuoc.gpg"
+
# Set a default account
account default : gmail
diff --git a/.emacs.d/init.org b/.emacs.d/init.org
index 56d732d..e12b72a 100644
--- a/.emacs.d/init.org
+++ b/.emacs.d/init.org
@@ -1215,6 +1215,12 @@ I'm using [[https://build.opensuse.org/package/show/server:mail/maildir-utils][t
=mu= only takes care of the indexing part, but the retrieval of emails is handled via =mbsync= which I take from [[https://build.opensuse.org/package/show/server:mail/isync][obs://server:mail]] and that is configured with [[https://github.com/mssola/dotfiles/blob/master/.mbsyncrc][this file]]. The sending is done through the =smtpmail-send-it= function, which is built in GNU Emacs. This part is not optimal since it blocks the GNU Emacs instance whenever we are sending en email. I plan to look into =msmtp= as soon as possible.
+Before loading it: =mu= 1.6 introduced =gnus= as the new message viewer, which is quite a drastic change. I'm still adjusting to it, but for now let's keep the good old viewer:
+
+#+BEGIN_SRC elisp
+(setq mu4e-view-use-old t)
+#+END_SRC
+
#+BEGIN_SRC elisp
(unless (file-directory-p "/usr/share/emacs/site-lisp/mu4e")
(message "Skipping mu4e because it's not installed."))
@@ -1222,8 +1228,8 @@ I'm using [[https://build.opensuse.org/package/show/server:mail/maildir-utils][t
(when (file-directory-p "/usr/share/emacs/site-lisp/mu4e")
(require 'mu4e)
- (when (version< mu4e-mu-version "1.4.0")
- (warn "You need at least mu 1.4.0 to get things working..."))
+ (when (version< mu4e-mu-version "1.6.0")
+ (warn "You need at least mu 1.6.0 to get things working..."))
(when (featurep 'mu4e)
#+END_SRC
@@ -1313,6 +1319,24 @@ Now it's time to define the different contexts that I have. Defining contexts th
(mu4e-refile-folder . "/gmail/All")
(mu4e-trash-folder . "/gmail/Trash")))
+ ;; uoc.edu
+ ,(make-mu4e-context
+ :name "uoc"
+ :enter-func (lambda ()
+ (mu4e-message "Switching to uoc.edu")
+ (setq mu4e-compose-signature (mssola-mu4e-signature "gmail"))
+ (setq mu4e-sent-messages-behavior 'delete))
+ :match-func (lambda (msg)
+ (when msg
+ (mu4e-message-maildir-matches msg "^/uoc")))
+ :vars '(
+ (user-mail-address . "mssola@uoc.edu")
+ (mu4e-reply-to-address . "mssola@uoc.edu")
+ (mu4e-drafts-folder . "/uoc/Drafts")
+ (mu4e-sent-folder . "/uoc/Sent")
+ (mu4e-refile-folder . "/uoc/All")
+ (mu4e-trash-folder . "/uoc/Trash")))
+
;; City hall
,(make-mu4e-context
:name "ajuntament"
@@ -1397,8 +1421,8 @@ You can setup bookmarks, which are a way to perform a search with a single key c
#+BEGIN_SRC elisp
(setq mu4e-bookmarks
- '(("maildir:/gmail/inbox OR maildir:/susecom/inbox OR maildir:/susede/inbox OR maildir:/ajuntament/inbox OR maildir:/cgtsuse/inbox" "Inbox Folders" ?n)
- ("maildir:/gmail/Sent OR maildir:/susecom/Elements\\ enviats OR maildir:/susede/Sent OR maildir:/ajuntament/Elements\\ enviats OR maildir:/cgtsuse/inbox/Sent" "Sent Folders" ?s)
+ '(("maildir:/gmail/inbox OR maildir:/susecom/inbox OR maildir:/susede/inbox OR maildir:/ajuntament/inbox OR maildir:/cgtsuse/inbox OR maildir:/uoc/inbox" "Inbox Folders" ?n)
+ ("maildir:/gmail/Sent OR maildir:/susecom/Elements\\ enviats OR maildir:/susede/Sent OR maildir:/ajuntament/Elements\\ enviats OR maildir:/cgtsuse/inbox/Sent OR maildir:/uoc/Sent" "Sent Folders" ?s)
("flag:unread AND NOT flag:trashed" "Unread messages" ?u)
("date:today..now" "Today's messages" ?t)))
#+END_SRC
@@ -1450,19 +1474,6 @@ The headers to show in the headers list a pair of a field and its width, with `n
(:subject . nil)))
#+END_SRC
-Add as a header action to toggle gnus mode for the view mode. I'm doing this because this is way better to visualize attached .eml emails.
-
-#+BEGIN_SRC elisp
-(defun mssola-toggle-gnus-mode (_msg)
- "Toggle gnus on view mode from now on."
- (if mu4e-view-use-gnus
- (setq mu4e-view-use-gnus nil)
- (setq mu4e-view-use-gnus t)))
-
-(add-to-list 'mu4e-headers-actions
- '("gnus mode toggle" . mssola-toggle-gnus-mode) t)
-#+END_SRC
-
Show images:
#+BEGIN_SRC elisp
diff --git a/.mbsyncrc b/.mbsyncrc
index ee53d69..1ce574d 100644
--- a/.mbsyncrc
+++ b/.mbsyncrc
@@ -174,4 +174,57 @@ Patterns * !Calendar
Create Both
Sync All
Expunge Both
-SyncState * \ No newline at end of file
+SyncState *
+
+##
+# uoc.edu
+
+IMAPAccount uoc
+Host imap.gmail.com
+User mssola@uoc.edu
+PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mbsyncpassuoc.gpg"
+SSLType IMAPS
+AuthMechs Login
+CertificateFile /etc/ssl/ca-bundle.pem
+
+# Use the account specified above as the remote storage.
+IMAPStore uoc-remote
+Account uoc
+
+# Let's use ~/.mail as the prefix for the local storage.
+MaildirStore uoc-local
+Path ~/.mail/uoc/
+Inbox ~/.mail/uoc/inbox
+SubFolders Verbatim
+
+Channel uoc-inbox
+Master :uoc-remote:
+Slave :uoc-local:
+Patterns "INBOX"
+Create Both
+Expunge Both
+Sync All
+SyncState *
+
+Channel uoc-all
+Master :uoc-remote:"[Gmail]/Tot el correu"
+Slave :uoc-local:"All"
+Create Both
+Expunge Both
+Sync All
+SyncState *
+
+Channel uoc-sent
+Master :uoc-remote:"[Gmail]/Enviats"
+Slave :uoc-local:"Sent"
+Create Both
+Expunge Both
+Sync All
+SyncState *
+
+# And finally group everything here.
+
+Group uoc
+Channel uoc-inbox
+Channel uoc-all
+Channel uoc-sent \ No newline at end of file