From: arnaud.oqube@gmail.com
To: ding@gnus.org
Subject: Trouble setting up Gnus
Date: Thu, 19 Jul 2012 09:24:20 +0200 [thread overview]
Message-ID: <87d33s2oyj.fsf@gmail.com> (raw)
Hello,
I have been using Gnus for several years in the 2000's but then switched
to web-based clients, having to work behind closed walls in corporate
settings where strange MUAs (eg. anything not Outlook) are not well
appreciated.
I am back again trying to setting up Gnus as my mail reader and I
encounter some annoying things I cannot explain. My setting is rather
simple:
- I use offlineimap to fetch data for 2 accounts (Gmail + Office365)
- I configured Gnus to read this mails using mmmaildir.
Here are a list of concerns:
- when I open gnus, although I added 'gnus-topic-mode as a hook, groups
do not appear classified by topics but in plain list form,
- again when I open gnus, groups' status does not appear to have been
saved and I got all my groups in the following format:
*: INBOX.linkedin
*: INBOX.kanbandev
*: INBOX.jsdoc
*: INBOX.js
*: INBOX.ieee-acm
- groups are never updated in the group buffer. I need enter them and
explicitly do M-g to update
- bbdb does nothing, although I configured it to insinuate gnus: My
.bbdb is never updated (maybe not gnus related)
Thanks in advance for any help.
Here is my gnus configuration:
;; bbdb
(require 'bbdb)
;; mostly from http://www.mostlymaths.net/2010/12/emacs-30-day-challenge-glimpse-of-bbdb.html
(bbdb-initialize 'gnus 'message)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
(add-hook 'gnus-startup-hook 'gnus-topic-mode)
(setq bbdb-send-mail-style 'gnus)
(setq bbdb-complete-name-full-completion t)
(setq bbdb-completion-type 'primary-or-name)
(setq bbdb-complete-name-allow-cycling t)
(setq
bbdb-offer-save 1
bbdb-use-pop-up t
bbdb-electric-p t
bbdb-popup-target-lines 1
bbdb-use-pop-up nil
)
;; GNUS
(require 'gnus)
(setq gnus-select-method
'(nnmaildir "GMail"
(directory "~/Mail/")
(directory-files nnheader-directory-files-safe)
(get-new-mail nil)))
(define-key gnus-group-mode-map (kbd "vo")
'(lambda ()
(interactive)
(shell-command "offlineimap&" "*offlineimap*" nil)))
(setq gnus-user-date-format-alist
'(((gnus-seconds-today) . "Today, %H:%M")
((+ 86400 (gnus-seconds-today)) . "Yesterday, %H:%M")
(604800 . "%A %H:%M") ;;that's one week
((gnus-seconds-month) . "%A %d")
((gnus-seconds-year) . "%B %d")
(t . "%B %d '%y"))) ;;this one is used when no other does match
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
gnus-summary-line-format "%U%R%z %~(pad-right 20)&user-date; %~(pad-right 8)k %I%(%[%4L: %-23,23f%]%) %s\n"
gnus-summary-mode-line-format "Gnus: %p [%A / Sc:%4z] %Z"
gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date))
;; using W3M to display HTML messages - from http://norman.walsh.name/2011/03/10/w3m
(setq gnus-mime-display-multipart-related-as-mixed nil)
(setq mm-text-html-renderer 'w3m)
(setq mm-inline-text-html-with-images t)
(setq mm-inline-text-html-with-w3m-keymap nil)
;; Make Gnus NOT ignore [Gmail] mailboxes
(setq gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
(setq mm-attachment-override-types '("image/.*"))
(setq mm-discouraged-alternatives '("text/html" "text/richtext"))
(setq message-alternative-emails
(regexp-opt '(...)))
;; from http://emacswiki.org/emacs/MultipleSMTPAccounts
;; using other method from http://www.mostlymaths.net/2010/12/emacs-30-day-challenge-using-gnus-to.html
(require 'smtpmail)
(setq send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it
mail-from-style nil
user-full-name "Arnaud Bailly"
smtpmail-debug-info t
smtpmail-debug-verb t)
(defun set-smtp
(mech user server port)
"Set related SMTP variables for supplied parameters."
(setq smtpmail-smtp-server server
smtpmail-smtp-service port
smtpmail-auth-credentials "~/.authinfo.gpg"
smtpmail-auth-supported (list mech)
smtpmail-starttls-credentials nil)
(message "Setting SMTP server to `%s:%s' for user `%s'."
server port user))
(defun set-smtp-ssl
(user server port &optional key cert)
"Set related SMTP and SSL variables for supplied parameters."
(setq starttls-use-gnutls t
starttls-gnutls-program "gnutls-cli"
starttls-extra-arguments nil
smtpmail-smtp-server server
smtpmail-smtp-service port
smtpmail-auth-credentials "~/.authinfo.gpg"
smtpmail-starttls-credentials (list (list server port key cert)))
(message
"Setting SMTP server to `%s:%s' for user `%s'. (SSL enabled.)" server port user))
(defun change-smtp ()
"Change the SMTP server according to the current from line."
(save-excursion
(loop with from = (save-restriction
(message-narrow-to-headers)
(message-fetch-field "from"))
for (auth-mech user server port) in smtp-accounts
when (string-match user from)
do (cond
((memq auth-mech '(cram-md5 plain login))
(return (apply 'set-smtp (list auth-mech user server port))))
((eql auth-mech 'ssl)
(return (apply 'set-smtp-ssl (list user server port))))
(t (error "Unrecognized SMTP auth. mechanism: '%s'." auth-mech)))
finally (error "Cannot infer SMTP information."))))
;; The previous function will complain if you fill the from field with
;; an account not present in smtp-accounts.
(defvar %smtpmail-via-smtp (symbol-function 'smtpmail-via-smtp))
(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
(with-current-buffer smtpmail-text-buffer
(change-smtp))
(funcall (symbol-value '%smtpmail-via-smtp) recipient
smtpmail-text-buffer))
;; activate demon to fetch new mail
(gnus-demon-init)
(gnus-demon-add-handler 'gnus-demon-scan-news 5 t)
;; speeding up gnus
;; http://www.gnu.org/software/emacs/manual/html_node/gnus/_005b9_002e2_005d.html
(gnus-compile)
(setq gc-cons-threshold 3500000)
(setq gnus-use-correct-string-widths nil)
(bbdb-insinuate-message)
--
Arnaud
next reply other threads:[~2012-07-19 7:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 7:24 arnaud.oqube [this message]
2012-07-19 14:14 ` Tassilo Horn
2012-07-19 14:30 ` arnaud.oqube
2012-07-19 15:02 ` Tassilo Horn
2012-07-19 15:36 ` arnaud.oqube
2012-07-19 21:05 ` Steinar Bang
2012-07-23 8:27 ` Gnus working better with nnimap arnaud.oqube
2012-07-19 14:23 ` Trouble setting up Gnus Christopher Schmidt
2012-07-19 14:26 ` Christopher Schmidt
2012-07-19 14:55 ` Adam Sjøgren
2012-07-19 21:07 ` Steinar Bang
2012-07-20 12:22 ` Adam Sjøgren
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=87d33s2oyj.fsf@gmail.com \
--to=arnaud.oqube@gmail.com \
--cc=ding@gnus.org \
/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).