From 07c8ed5d7cb459fb99f4be5e1e75acb4dfeee021 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 9 May 2022 11:46:30 +0300 Subject: [PATCH] Add my Dazz email account to Gnus --- .emacs.d/esy.org | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.emacs.d/esy.org b/.emacs.d/esy.org index 679eac1..48e198f 100644 --- a/.emacs.d/esy.org +++ b/.emacs.d/esy.org @@ -234,6 +234,9 @@ For a list of available frame parameters, see [[info:elisp#Frame Parameters][eli (setq beacon-color "magenta" show-paren-context-when-offscreen t) (add-to-list 'lin-mode-hooks 'package-menu-mode-hook) + (add-to-list 'lin-mode-hooks 'gnus-summary-mode-hook) + (add-to-list 'lin-mode-hooks 'gnus-group-mode-hook) + (add-to-list 'lin-mode-hooks 'gnus-server-mode-hook) (global-diff-hl-mode) (lin-global-mode 1) (beacon-mode 1) @@ -613,6 +616,9 @@ For a list of available frame parameters, see [[info:elisp#Frame Parameters][eli (defconst esy/user-mail-address-swipl "eshel@swi-prolog.org" "My SWI-Prolog email address.") + + (defconst esy/user-mail-address-dazz "eshel@dazz.io" + "My Dazz email address.") #+end_src ** Sending mail from multiple SMTP accounts @@ -633,14 +639,18 @@ For a list of available frame parameters, see [[info:elisp#Frame Parameters][eli "Configure `message-mode' specific customizations." (require 'smtpmail-multi) (setq smtpmail-multi-accounts - `((esy . ,(esy/smtpmail-multi-make-accout + `((daz . ,(esy/smtpmail-multi-make-accout + esy/user-mail-address-dazz + "smtp.gmail.com")) + (esy . ,(esy/smtpmail-multi-make-accout esy/user-mail-address-gmail "smtp.gmail.com")) (swp . ,(esy/smtpmail-multi-make-accout esy/user-mail-address-swipl "mail.swi-prolog.com")))) (setq smtpmail-multi-associations - `((,(esy/smtpmail-multi-make-rx esy/user-mail-address-gmail) esy) + `((,(esy/smtpmail-multi-make-rx esy/user-mail-address-dazz) daz) + (,(esy/smtpmail-multi-make-rx esy/user-mail-address-gmail) esy) (,(esy/smtpmail-multi-make-rx esy/user-mail-address-swipl) swp))) (setq send-mail-function #'smtpmail-multi-send-it) (setq message-send-mail-function #'smtpmail-multi-send-it)) @@ -662,7 +672,12 @@ For a list of available frame parameters, see [[info:elisp#Frame Parameters][eli gnus-select-method '(nnimap "gmail" (nnimap-address "imap.gmail.com") (nnimap-server-port "imaps") - (nnimap-stream ssl))) + (nnimap-stream ssl)) + gnus-secondary-servers '((nnimap "dazz" + (nnimap-address "imap.gmail.com") + (nnimap-server-port "imaps") + (nnimap-stream ssl) + (nnimap-authinfo-file "~/.authinfo")))) (defun esy/customize-gnus-mode () "Configure Gnus specific customizations." @@ -675,7 +690,9 @@ For a list of available frame parameters, see [[info:elisp#Frame Parameters][eli "text/x-patch" "text/html" "text/calendar") - gnus-posting-styles `((".*mail.swi-prolog.com.*" + gnus-posting-styles `((".*dazz.*" + (address ,esy/user-mail-address-dazz)) + (".*mail.swi-prolog.com.*" (address ,esy/user-mail-address-swipl)) (".*" (address ,esy/user-mail-address-gmail))) -- 2.39.5