1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- ;; Password xoauth2 stuff
- (use-package auth-source-xoauth2 :ensure t)
- (require 'gnus-secrets "~/.gnus-secrets.el.gpg")
- (setq auth-source-xoauth2-creds 'my-xoauth2-get-secrets)
- (add-to-list 'smtpmail-auth-supported 'xoauth2)
- (auth-source-xoauth2-enable)
- ;;; Sending related stuff
- ;; Save sent file to same group where located (using GCC-field)
- (setq gnus-message-archive-method '(nnimap ""))
- (setq gnus-message-archive-group
- '((lambda (group)
- (cond
- ;; Store personal mail messages in the same group I started out in
- ((string-match "nnimap.*" group) group)
- ;; Store everything else in misc until I can sort it out
- (t "mail.misc")))))
- ;;; Level stuff (for speed etc.)
- ;; Read
- ;; https://www.gnu.org/software/emacs/manual/html_node/gnus/Group-Levels.html
- ;; and
- ;; https://emacs.stackexchange.com/questions/34537/how-to-prevent-gnus-from-querying-the-server-during-startup
- (setq gnus-activate-level 5) ; Default 6, groups with level above this
- ; won't be activated. Use 'S l' on a
- ; group to give it a new level (if you
- ; want to make it activated or not). Use
- ; e.g. '6 g' to refresh all groups level
- ; 6 or below.
- (setq gnus-check-new-newsgroups nil) ; don't check server for new
- ; stuff. Use 'U' in group buffer
- ; to add new groups.
- ;;; Highlighting: smallest set of conditions first
- (with-eval-after-load 'gnus-group
- (add-to-list 'gnus-group-highlight
- '((and mailp (>= level 4) (<= level 6))
- . gnus-group-mail-3))
- (add-to-list 'gnus-group-highlight
- '((and mailp (= unread 0) (>= level 4) (<= level 6))
- . gnus-group-mail-3-empty)))
- ;;; Interface stuff
- (setq gnus-summary-line-format "%U%R %&user-date; %B%-31,31s %4k %uB\n"
- ;; Default with %f ('Name, To header or Newsgroups header')
- ;; replaced by %uB (BBDB Name + Known poster indicator '+')
- gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
- gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
- gnus-summary-gather-subject-limit 'fuzzy
- gnus-fetch-old-headers t
- gnus-article-sort-functions '((not gnus-article-sort-by-date))
- gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date)
- gnus-subthread-sort-functions '(gnus-thread-sort-by-date)
- gnus-sum-thread-tree-false-root ""
- gnus-sum-thread-tree-indent " "
- gnus-sum-thread-tree-leaf-with-other "├► "
- gnus-sum-thread-tree-root ""
- gnus-sum-thread-tree-single-leaf "╰► "
- gnus-sum-thread-tree-vertical "│")
- ;; Make it so a read article marks duplicated read when seen them. So
- ;; articles in the backup server are marked as read (and total-expire
- ;; moves them to Trash) when reading them elsewhere. WARNING: reading
- ;; in the duplicate server marks them read elsewhere too.
- (setq gnus-suppress-duplicates t)
- ;; Also make it so that when on auto-expiry, only unread messages that
- ;; are read will be automatically marked as expired. I.e. something
- ;; explicitly marked as read 'd' will not be marked as expired under
- ;; auto-expire.
- (remove-hook 'gnus-mark-article-hook
- 'gnus-summary-mark-read-and-unread-as-read)
- (add-hook 'gnus-mark-article-hook
- 'gnus-summary-mark-unread-as-read)
- ;;; Security stuff
- (setq mm-verify-option "always"
- gnus-buttonized-mime-types '("multipart/signed") ; show verified key etc
- ;; mm-sign-option 'guided ; for always selecting signing key from a menu
- mml-secure-openpgp-encrypt-to-self t
- mml-secure-smime-encrypt-to-self t
- mml-secure-openpgp-sign-with-sender t
- mml-secure-smime-sign-with-sender t
- gnus-message-replysignencrypted t)
- (add-hook 'gnus-message-setup-hook 'mml-secure-message-sign-pgpmime) ; Always sign
|