Skip to content

Instantly share code, notes, and snippets.

@sverrejoh
Created July 25, 2014 11:44
Show Gist options
  • Select an option

  • Save sverrejoh/f4c26414f6fab39a538d to your computer and use it in GitHub Desktop.

Select an option

Save sverrejoh/f4c26414f6fab39a538d to your computer and use it in GitHub Desktop.
(setq user-mail-address "sverrej@opera.com")
(setq user-full-name "Sverre Johansen")
;(load-library "smtpmail")
(load-library "nnimap")
(load-library "starttls")
; NOV format instead of plain HEAD
(setq nnimap-nov-is-evil nil)
(setq mail-self-blind t)
;; Table
(add-hook 'mail-mode-hook 'turn-on-orgtbl)
(setq opera-imap-server '(nnimap "imap.opera.com"
(nnimap-address "imap.opera.com")
(nnimap-server-port 993)
(nnimap-logout-timeout 1.0)
(nnimap-authinfo-file "~/.imap-authinfo")
(nnimap-stream tls)))
;; IMAP
(setq gnus-select-method opera-imap-server)
;;; archive settings
(setq gnus-message-archive-method opera-imap-server)
(setq gnus-message-archive-group "OUT.mail")
;; ;; SMTP
;; (setq smtpmail-starttls-credentials '(("smtp.opera.com" 587 nil nil))
;; smtpmail-smtp-server "smtp.opera.com"
;; smtpmail-default-smtp-server "smtp.opera..com"
;; send-mail-function 'smtpmail-send-it
;; message-send-mail-function 'smtpmail-send-it
;; smtpmail-smtp-service 587
;; smtpmail-auth-credentials
;; '(("smtp.opera.com"
;; 587
;; "sverrej"
;; "PASSWORD")))
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-starttls-credentials '(("smtp.opera.com" 587 nil nil))
smtpmail-auth-credentials '(("smtp.opera.com"
587
"sverrej@opera.com"
"PASSWORD"))
smtpmail-default-smtp-server "smtp.opera.com"
smtpmail-smtp-server "smtp.opera.com"
smtpmail-smtp-service 587
smtpmail-local-domain "opera.com")
(add-hook 'gnus-topic-mode-hook 'gnus-topic-mode)
;; Splitting
; Only apply first rule
(setq nnimap-split-crosspost nil)
;Split from
(setq nnimap-split-inbox '("INBOX"))
; Rules
(setq nnimap-split-rule
'(("INBOX.Lists/\\1" "^List-Id:.*<\\(.*\\)>")
("INBOX.webapp-system.list.opera.com.BOUNCE"
"^Subject:.*[Webapp-system] Warning: could not send message.*")
("INBOX.Lists.my-drift" "^To:.*my-drift@opera.com.*")
("INBOX.Lists.my-drift" "^To:.*root@b8.opera.com.*")
("INBOX.Lists.my-drift" "^Cc:.*my-drift@opera.com.*")
("INBOX.BTS" "From:.*<jira@bugs.opera.com>")
("INBOX.git-commits" "X-Git-Refname:.*")
("INBOX.unmatched" "")))
;; Summary line
;(setq gnus-summary-line-format "%d %U%R%z%(%[%-15,15f%]%) %B%S\n")
(setq gnus-summary-line-format "%(%&user-date;%-9=%U%R%z%[%-15,15f%] %B%S%)\n")
;(setq gnus-summary-line-format ":%U%R %B|%-20,20f|%S %-60=|%&user-date; \n")
;; Fetch only part of the article if we can. I saw this in someone
;; else's .gnus
(setq gnus-read-active-file 'some)
;; Tree view for groups. I like the organisational feel this has.
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
;; Use proper IDs to make threading
(setq gnus-summary-thread-gathering-function
'gnus-gather-threads-by-references)
;; Thow threads in context
(setq gnus-fetch-old-headers 'some)
(add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
(defun gnus-user-format-function-d (headers)
(let ((time (gnus-group-timestamp gnus-tmp-group)))
(if time
(format-time-string "%b %d %H:%M" time)
"")))
(setq gnus-group-line-format "%M%S%5y(%T):%B% %(%-40,40g%) %ud\n")
(setq gnus-treat-display-smileys nil)
(setq gnus-treat-fill-long-lines nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment