From: Peter Davis <pfd@pfdstudio.com>
To: lists.emacs.gnus@xavier.maillard.im
Cc: ding@gnus.org
Subject: Re: Gnus as my Fastmail main client
Date: Tue, 10 Nov 2015 09:27:40 -0500 [thread overview]
Message-ID: <6sw6c7ziymdj4z.fsf@pfdstudio.com> (raw)
lists.emacs.gnus@xavier.maillard.im writes:
> I subscribed to Fastmail service and I'd like to use Gnus to access my
> messages. I do not want to start over from scratch (I lost all my .gnus
> setup years ago) so I am looking for a ready-to-use-fastmail-setup for
> Gnus. Does anybody have this ?
Below is the setup I use for Fastmail. At one point, I think I had trouble using the Fastmail smtp, so that's commented out and this
uses GMail instead. I don't remember the details, but it might be worth getting the Fastmail smtp working again. I left in some
other stuff I had commented out, in case it's useful.
(set-background-color "white")
;; @see http://www.gnu.org/software/emacs/manual/html_node/gnus/Expiring-Mail.html
;; press 'E' to expire email
(setq nnmail-expiry-target "INBOX.Trash")
(setq nnmail-expiry-wait 'immediate)
;; (setq gnus-fetch-old-headers t)
;; (setq gnus-select-method '(nnimap "mail.messagingengine.com" (nnimap-stream ssl) (nnimap-expunge-on-close ask)))
(setq user-mail-address "...")
(setq user-full-name "...")
;; (setq gnus-select-method
;; '(nnimap "gmail"
;; (nnimap-address "imap.gmail.com")
;; (nnimap-server-port 993)
;; (nnimap-stream ssl)))
(setq gnus-select-method
'(nnimap "Fastmail" ; primary email
(nnimap-address "mail.messagingengine.com")
(nnimap-server-port 993)
(nnimap-authenticator login)
(nnimap-expunge-on-close 'never)
(nnimap-stream ssl)
))
;; (setq gnus-select-method
;; '(nnimap "gmail"
;; (nnimap-address "imap.gmail.com")
;; (nnimap-server-port 993)
;; (nnimap-stream ssl)))
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
smtpmail-auth-credentials '(("smtp.gmail.com" 587
"..." nil))
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
starttls-use-gnutls t
gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
;; (setq send-mail-function 'smtpmail-send-it)
;; (setq message-send-mail-function 'smtpmail-send-it)
;; (setq smtpmail-default-smtp-server "smtps-proxy.messagingengine.com")
;; (setq smtpmail-auth-credentials '(("smtps-proxy.messagingengine.com" "80" "..." "")))
;; (setq smtpmail-starttls-credentials '(("smtps-proxy.messagingengine.com" "80" nil nil)))
(setq gnus-article-browse-delete-temp t)
(setq gnus-fetch-old-headers t)
(setq message-sendmail-envelope-from 'header)
(setq send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "smtps-proxy.messagingengine.com"
smtpmail-smtp-server "smtps-proxy.messagingengine.com"
;; smtpmail-smtp-service 80
;; smtpmail-starttls-credentials '(("smtps-proxy.messagingengine.com" 80 nil nil)))
smtpmail-starttls-credentials '(("smtps-proxy.messagingengine.com" nil nil nil)))
(setq smtpmail-stream-type 'tls)
(setq fill-flowed-display-column nil)
(add-hook 'gnus-article-mode-hook
(lambda ()
(setq
truncate-lines nil
word-wrap t)))
(setq gnus-posting-styles
'((".*"
(name "...")
(address "...")
(BCC "..."))))
(setq gnus-html-frame-width 180)
(defun my-message-mode-setup ()
(setq fill-column 132)
(turn-on-auto-fill))
(add-hook 'message-mode-hook 'my-message-mode-setup)
;;switch to gnus group buffer or start gnus
(defun my-switch-to-gnus-group-buffer ()
"Switch to gnus group buffer if it exists, otherwise start gnus"
(interactive)
(if (or (not (fboundp 'gnus-alive-p))
(not (gnus-alive-p)))
(gnus)
(switch-to-buffer "*Group*")))
(global-set-key (kbd "C-c n") 'my-switch-to-gnus-group-buffer)
;; Set up summary buffer to show tree view, dates
;; (dolist (c '((?\207 . ?q) (?\216 . ?x) (?\212 . ?t) (?\203 . ?m)))
;; (aset standard-display-table (car c)
;; (vector (create-glyph (concat "\e(0" "\e[35m" ; magenta
;; (char-to-string (cdr c))
;; "\e[0m" "\e(B")))))
;; (let ((val 129))
;; (while (< val 160)
;; (aset standard-display-table val (vector (create-glyph val)))
;; (setq val (1+ val))))
;; (setq gnus-summary-line-format "%U%u&thread;%R%d %-5,5L %-20,20n %B%-80,80S\n"
;; gnus-sum-thread-tree-vertical "\216"
;; gnus-sum-thread-tree-root ""
;; gnus-sum-thread-tree-false-root ""
;; gnus-sum-thread-tree-indent " "
;; gnus-sum-thread-tree-single-indent ""
;; gnus-sum-thread-tree-leaf-with-other "\212\207>"
;; gnus-sum-thread-tree-single-leaf "\203\207>")
;; (defun gnus-user-format-function-thread (dummy)
;; (propertize gnus-tmp-thread-tree-header-string 'gnus-face t))
;; (let ((val 129))
;; (while (< val 160)
;; (aset standard-display-table val (vector (create-glyph val)))
;; (setq val (1+ val))))
;; (setq gnus-summary-line-format "%U%R%d %-5,5L %-20,20n %B%-80,80S\n"
;; gnus-sum-thread-tree-vertical "\232"
;; gnus-sum-thread-tree-root ""
;; gnus-sum-thread-tree-false-root ""
;; gnus-sum-thread-tree-indent " "
;; gnus-sum-thread-tree-single-indent ""
;; gnus-sum-thread-tree-leaf-with-other "\226\223>"
;; gnus-sum-thread-tree-single-leaf "\217\223>")
(setq-default
gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n"
gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
gnus-thread-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 "│")
;;;
;; Scrolling like mutt for group, summary, and article buffers.
;;
;; Being able to scroll the current buffer view by one line with a
;; single key, rather than having to guess a random number and recenter
;; with `C-u NUM C-l' is _very_ convenient. Mutt binds scrolling by one
;; line to '<' and '>', and it's something I often miss when working
;; with Gnus buffers. Thanks to the practically infinite customizability
;; of Gnus, this doesn't have to be an annoyance anymore.
;; (defun keramida-mutt-like-scrolling ()
;; "Set up '<' and '>' keys to scroll down/up one line, like mutt."
;; ;; mutt-like scrolling of summary buffers with '<' and '>' keys.
;; (local-set-key (kbd ">") 'scroll-up-line)
;; (local-set-key (kbd "<") 'scroll-down-line))
;; (add-hook 'gnus-group-mode-hook 'keramida-mutt-like-scrolling)
;; (add-hook 'gnus-summary-mode-hook 'keramida-mutt-like-scrolling)
;; (add-hook 'gnus-article-prepare-hook 'keramida-mutt-like-scrolling)
;; BBDB
;; (require 'bbdb)
;; (bbdb-initialize 'gnus 'message)
;; (require 'gnus-registry)
;; (gnus-registry-initialize)
(defun pd/alter-group-map ()
(local-set-key "h" "jINBOX"))
;; From Peter Münster <pmlists@free.fr>
(defun pm/alter-summary-map ()
(local-set-key "d" [?M ?M ?e ?e down ?g])
(local-set-key "vj" "BmINBOX.Junk Mail"))
(defun pm/alter-article-map ()
(local-set-key "d" "MMeen"))
(add-hook 'gnus-group-mode-hook 'pd/alter-group-map)
(add-hook 'gnus-summary-mode-hook 'pm/alter-summary-map)
(add-hook 'gnus-article-mode-hook 'pm/alter-article-map)
;; insert x-face
(defun mail-insert-x-face ()
(save-excursion
(goto-char (point-min))
(search-forward mail-header-separator)
(beginning-of-line nil)
(insert "X-Face: ")
(insert-file "~/xface.dat")))
(add-hook 'message-send-hook 'mail-insert-x-face)
(setq message-required-headers ())
(setq message-required-mail-headers
(nconc message-required-headers
(list '(Face . (lambda ()
(gnus-face-from-file "~/Dropbox/pd-logo-face.png"))))))
next reply other threads:[~2015-11-10 14:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 14:27 Peter Davis [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-11-10 6:03 lists.emacs.gnus
2015-11-10 20:14 ` Tassilo Horn
2015-11-11 7:57 ` Xavier Maillard
2015-11-11 20:02 ` Tassilo Horn
2015-11-11 20:48 ` lists.emacs.gnus
2015-11-12 4:36 ` Xavier Maillard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6sw6c7ziymdj4z.fsf@pfdstudio.com \
--to=pfd@pfdstudio.com \
--cc=ding@gnus.org \
--cc=lists.emacs.gnus@xavier.maillard.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).