(setq
user-mail-address "jbranso@dismail.de"
user-full-name "Joshua Branson")
Gnus has a concept of a main account and secondary accounts. Your main account is Gnus default account. It might be worth it, to just not use gnus-select-method
, and instead create accounts in gnus-secondary-select-methods.
;; (setq gnus-select-method
;; '(nnimap "imap.dismail.de"
;; (nnir-search-engine notmuch)
;; (nnimap-stream ssl)))
(setq gnus-secondary-select-methods
'(
;; I would like to use gnus as my maildir, but imap works just fine for now.
;; (nnmaildir "dismail.de"
;; (nnir-search-engine notmuch)
;; (nnir-notmuch-additional-switches "search")
;; (directory "~/.mail/dismail/"))
;; (nnmaildir "fastmail" (directory "~/.mail/"))
(nntp "news.gwene.org")
(nntp "news.gmane.io")
;; this makes gnus startup super slow!!! (nnmaildir
;; "dismail.de" (directory "~/.mail/dismail.de/"))
(nnimap "gnucode.me"
(nnimap-stream ssl)
(nnimap-address "imap.gnucode.me")
;; for now I have to NOT set this us as joshua@gnucode.me, because auth_username_format
;; seems to delete the domain name after login.
(nnimap-user "joshua"))
;; this is the right config, but I'm not certain how to set up a dovecot username and password
(nnimap "localDismail"
(nnimap-address "localhost")
(nnimap-stream network)
(nnimap-server-port 143)
;;(nnimap-user "jbranso@dismail.de")
)))
#+BEGIN_SRC emacs-lisp :tangle no (setq gnus-posting-styles '( ;; My default fastmail posting style (".*" (signature "Joshua Branson") (address "jbranso@dismail.de")) ;; when I post to my normal account. ))
#+END_SRC
;;(require 'smtpmail)
;; smtp hotmail uses STARTTLS
(setq message-send-mail-function 'smtpmail-send-it
;;smtpmail-starttls-credentials '(("smtp-mail.outlook.com" 587 nil nil))
;;smtpmail-auth-credentials '(("smtp-mail.outlook.com" 587 "example@hotmail.com" nil))
;;smtpmail-default-smtp-server "smtp-mail.outlook.com"
smtpmail-smtp-server "smtp.dismail.de"
smtpmail-smtp-service 587)
;;just testing this out
(setq sendmail-program "msmtp")
(setq bbdb-user-mail-names "jbranso@dismail.de")
Gnus will recognize these email addresses as mine.
#+BEGIN_SRC emacs-lisp (setq bbdb-user-mail-address-re (regexp-opt '("jbranso@dismail.de")) message-dont-reply-to-names bbdb-user-mail-address-re gnus-ignored-from-addresses bbdb-user-mail-address-re) #+END_SRC
The normal action taken when expiring articles is to delete them. However, in some circumstances it might make more sense to move them to other groups instead of deleting them. The variable ‘nnmail-expiry-target’ (and the ‘expiry-target’ group parameter) controls this. The variable supplies a default value for all groups, which can be overridden for specific groups by the group parameter. default value is ‘delete’, but this can also be a string (which should be the name of the group the message should be moved to), or a function (which will be called in a buffer narrowed to the message in question, and with the name of the group being moved from as its parameter) which should return a target—either a group name or ‘delete’.
Here’s an example for specifying a group name. This example is pretty bad. It will move all expired articles to my hotmail deleted group.
;; (setq nnmail-expiry-target "Deleted")
Gnus provides a function ‘nnmail-fancy-expiry-target’ which will expire mail to groups according to the variable ‘nnmail-fancy-expiry-targets’. Here’s an example:
(setq nnmail-expiry-target 'nnmail-fancy-expiry-target
nnmail-fancy-expiry-targets
'((to-from "example@hotmail.com" "Deleted")
("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
("from" ".*" "Deleted")))
With this setup, any mail that has ‘IMPORTANT’ in its Subject header and was sent in the year ‘YYYY’ and month ‘MMM’, will get expired to the group ‘nnfolder:IMPORTANT.YYYY.MMM’. If its From or To header contains the string ‘example@school.edu’, it will get expired to ‘Deleted’, which is my hotmail trash folder.. All other mail will get expired to ‘nnfolder:Archive-YYYY’.
(provide 'init-gnus-secret)