unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Help with Gnus and Gmail
@ 2009-10-10 17:40 Mario Castelán Castro
  2009-10-12  6:22 ` Nevo
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mario Castelán Castro @ 2009-10-10 17:40 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

october 10th 2009 for help-gnu-emacs

Hi all, i just are trying to read mail in emacs, i are trying Gnus for
that, after do what http://www.emacswiki.org/emacs/GnusGmail says i
have the following in my .emacs:

(require 'gnus)
(setq user-mail-address "mariocastelancastro@gmail.com")
(setq user-full-name "Mario Xerxes Castelan Castro")
(add-to-list 'gnus-secondary-select-methods
	     '(nnimap "gmail"
	     	      (nnimap-address "imap.gmail.com")
		      (nnimap-server-port 993)
		      (nnimap-stream
		      ssl)))

When i open Gnus with M-x gnus it says "unable to open server
nntp+news go offline?", i type n, later "nntp (news) open error:
''. Continue?", i type y, "Gnus auto-save file exist.  Do you want to
read it?" i type n. Then a buffer than says: "*: nndraft:queue :
nndraft:drafts" appears and i are unable to read mail or do
anyting. ¿Wath i are doing wrong?.

Thanks in advance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrQxsUACgkQZ4DA0TLic4hugACfco6bPyP0uwdcm7/ofdsroDmI
laEAnjXG49n5rIBNGzyqqHcVFkqOYFaM
=XxMC
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with Gnus and Gmail
  2009-10-10 17:40 Help with Gnus and Gmail Mario Castelán Castro
@ 2009-10-12  6:22 ` Nevo
  2009-10-12 10:23 ` Alberto Luaces
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Nevo @ 2009-10-12  6:22 UTC (permalink / raw)
  To: Mario Castelán Castro; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

hi,   You can try to enable imap log by (setq imap-log t).
  Besides, can you check your message buffer that if gmail is really
connected already. If so, then you can do S-s ,input "nnimap+gmail:" plus
TAB, then you will get a list of available mail groups :) hope this works
for you

Nevo

2009/10/11 Mario Castelán Castro <mariocastelancastro@gmail.com>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> october 10th 2009 for help-gnu-emacs
>
> Hi all, i just are trying to read mail in emacs, i are trying Gnus for
> that, after do what http://www.emacswiki.org/emacs/GnusGmail says i
> have the following in my .emacs:
>
> (require 'gnus)
> (setq user-mail-address "mariocastelancastro@gmail.com")
> (setq user-full-name "Mario Xerxes Castelan Castro")
> (add-to-list 'gnus-secondary-select-methods
>             '(nnimap "gmail"
>                      (nnimap-address "imap.gmail.com")
>                      (nnimap-server-port 993)
>                      (nnimap-stream
>                      ssl)))
>
> When i open Gnus with M-x gnus it says "unable to open server
> nntp+news go offline?", i type n, later "nntp (news) open error:
> ''. Continue?", i type y, "Gnus auto-save file exist.  Do you want to
> read it?" i type n. Then a buffer than says: "*: nndraft:queue :
> nndraft:drafts" appears and i are unable to read mail or do
> anyting. ¿Wath i are doing wrong?.
>
> Thanks in advance.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkrQxsUACgkQZ4DA0TLic4hugACfco6bPyP0uwdcm7/ofdsroDmI
> laEAnjXG49n5rIBNGzyqqHcVFkqOYFaM
> =XxMC
> -----END PGP SIGNATURE-----
>
>
>

[-- Attachment #2: Type: text/html, Size: 2315 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with Gnus and Gmail
  2009-10-10 17:40 Help with Gnus and Gmail Mario Castelán Castro
  2009-10-12  6:22 ` Nevo
@ 2009-10-12 10:23 ` Alberto Luaces
  2009-10-12 12:51 ` Wang Lei
       [not found] ` <mailman.8594.1255351848.2239.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 6+ messages in thread
From: Alberto Luaces @ 2009-10-12 10:23 UTC (permalink / raw)
  To: help-gnu-emacs

Hello Mario,

I suspect that for now, you only want to read your mail through
gmail. If that is the case, you have to change the line that reads 

(add-to-list 'gnus-secondary-select-methods

for this one:

(setq gnus-select-method

since gmail would be your primary source of "news". If you wanted to add
more accounts later (mail, news, rss,...) you would have to specify each
one of them with the "add-to-list" formula, since they would be
secondary sources of news.

Regards,

Alberto 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with Gnus and Gmail
  2009-10-10 17:40 Help with Gnus and Gmail Mario Castelán Castro
  2009-10-12  6:22 ` Nevo
  2009-10-12 10:23 ` Alberto Luaces
@ 2009-10-12 12:51 ` Wang Lei
       [not found] ` <mailman.8594.1255351848.2239.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 6+ messages in thread
From: Wang Lei @ 2009-10-12 12:51 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]

Mario Castelán Castro <mariocastelancastro@gmail.com> writes:

> october 10th 2009 for help-gnu-emacs
>
> Hi all, i just are trying to read mail in emacs, i are trying Gnus for
> that, after do what http://www.emacswiki.org/emacs/GnusGmail says i
> have the following in my .emacs:
>
> (require 'gnus)
> (setq user-mail-address "mariocastelancastro@gmail.com")
> (setq user-full-name "Mario Xerxes Castelan Castro")
> (add-to-list 'gnus-secondary-select-methods
> 	     '(nnimap "gmail"
> 	     	      (nnimap-address "imap.gmail.com")
> 		      (nnimap-server-port 993)
> 		      (nnimap-stream
> 		      ssl)))
>
> When i open Gnus with M-x gnus it says "unable to open server
> nntp+news go offline?", i type n, later "nntp (news) open error:
> ''. Continue?", i type y, "Gnus auto-save file exist.  Do you want to
> read it?" i type n. Then a buffer than says: "*: nndraft:queue :
> nndraft:drafts" appears and i are unable to read mail or do
> anyting. ¿Wath i are doing wrong?.
Hi, Mario.

I think "unable to open server nntp+news go offline" because nntp+news is the default method of gnus. Check out your variable gnus-select-method. If you haven't subscribed newsgroup and want gnus to get mail as default. You can try

(setq gnus-select-method '(nnml ""))

I use the nnml as the backend. This is part of my config, hope useful.

(setq gnus-select-method '(nnml ""))
(setq mail-sources '((imap :server "imap.gmail.com"
               :port 993
               :user "xxx@gmail.com"
               :password "secret"
               :authentication 'login
               :stream ssl
               :fetchflag "\\Seen")
             (imap :server "imap.gmail.com"
                    :port 993
                    :user "yyy@gmail.com"
               :password "secret"
               :authentication 'login
                    :stream ssl
                    :fetchflag "\\Seen")))

And, this is the full configuration.


[-- Attachment #2: gnus --]
[-- Type: text/plain, Size: 5548 bytes --]

;Global
(setq gnus-startup-file "~/.newsrc"
      gnus-default-directory "~/mail/"
      gnus-home-directory "~/mail/"
      gnus-article-save-directory "~/mail/save/"
      gnus-kill-files-directory "~/mail/trash/"
      gnus-agent-directory "~/mail/agent/"
      gnus-cache-directory "~/mail/cache/"
      mail-source-directory "~/mail/incoming/"
      nnmail-message-id-cache-file "~/mail/.nnmail-cache"
      nnml-newsgroups-file "~/mail/newsgroup"
      message-directory "~/mail/"
      message-auto-save-directory "~/mail/drafts/")
(setq gnus-save-newsrc-file nil
      gnus-read-newsrc-file nil
      gnus-use-dribble-file nil
      gnus-interactive-exit nil
      gnus-save-killed-list nil)

;Get
(setq gnus-select-method '(nnml ""))
(setq mail-sources '((imap :server "imap.gmail.com"
	       :port 993
	       :user "xxx@gmail.com"
	       :password "secret"
	       :authentication 'login
	       :stream ssl
	       :fetchflag "\\Seen")
	     (imap :server "imap.gmail.com"
		    :port 993
		    :user "yyy@gmail.com"
	       :password "secret"
	       :authentication 'login
		    :stream ssl
		    :fetchflag "\\Seen")))
(setq nnmail-split-methods
      '(("Emacs" "^To:.*help-gnu-emacs\\|^Cc:.*help-gnu-emacs")
    ("Kernel-zh" "^To:.*Linux-kernel\\|^Cc:.*Linux-kernel")
    ("Sawfish" "^To:.*sawfish-list\\|^Cc:.*sawfish-list")
    ("Living" "^To:.*xxx")
    ("Working" "^To:.*yyy")
    ("NotHere" "")))

;Group
(setq gnus-group-line-format "\t%M%S%p%P%4y / %4t: %B%*%(%-10g%)%O\t%ud\n"
      gnus-check-new-newsgroups nil)
(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 "(%d/%m/%Y %H:%M)" time)
      "")))
(setq gnus-parameters
      '(("Emacs"
     (subscribed . t)
     (expiry-wait . 7)
     (broken-reply-to . t)
     (to-address . "help-gnu-emacs@gnu.org")
     (admin-address . "help-gnu-emacs-request@gnu.org")
     (posting-style (address "yyy@gmail.com") (signature "Regards,\nyyy")))
    ("Sawfish"
     (subscribed . t)
     (expiry-wait . 15)
     (broken-reply-to . t)
     (to-address . "sawfish-list@gnome.org")
     (admin-address . "sawfish-list-request@gnome.org")
     (posting-style (address "yyy@gmail.com") (signature "Regards,\nyyy")))
    ("Kernel-zh"
     (subscribed . t)
     (expiry-wait . 7)
     (broken-reply-to . t)
     (to-address . "Linux-kernel@kernel-zh.org")
     (admin-address . "Linux-kernel-request@kernel-zh.org")
     (posting-style (name "yyy") (address "yyy@gmail.com") (signature "yyy")))
    ("Living"
     (auto-expire . t)
     (posting-style (name "xxx") (address "xxx@gmail.com") (signature "祝一切顺利,\n    xxx")))
    ("Working"
     (auto-expire . t)
     (posting-style (name "yyy") (address "yyy@gmail.com") (signature "Regards,\nyyy")))))

;Summary
(setq gnus-face-0 'gnus-server-offline
      gnus-face-1 'gnus-server-agent
      gnus-face-2 'gnus-server-opened
      gnus-user-date-format-alist '(((gnus-seconds-today) . "Today  %2H:%2M")
		    (t . "%b %d %2H:%2M"))
      gnus-summary-line-format "%U%R%1{|%}%2{%-10&user-date;%}%1{|%}%0{%-24,24n%}%1{|%}%B%s\n"
      gnus-show-threads t
      gnus-thread-hide-subtree t
      gnus-thread-sort-functions '((not gnus-thread-sort-by-number) (not gnus-thread-sort-by-date))
      gnus-article-sort-functions '((not gnus-article-sort-by-number) (not gnus-article-sort-by-date))
      gnus-sum-thread-tree-root "* "
      gnus-sum-thread-tree-single-indent "* "
      gnus-sum-thread-tree-leaf-with-other "|-> "
      gnus-sum-thread-tree-vertical "|"
      gnus-sum-thread-tree-single-leaf "`-> ")

;Message
(setq gnus-visible-headers "From:\\|Subject:\\|Date:\\|Organization:\\|To:\\|Cc:\\|Reply-To:"
      message-fill-column nil
      message-kill-buffer-on-exit t
      gnus-treat-display-smileys nil
      gnus-treat-display-face nil
      mm-inline-large-images t)
(setq gnus-default-charset 'utf-8
      mm-coding-system-priorities '(utf-8)
      gnus-group-name-charset-group-alist '((".*" . chinese-iso-8bit))
      gnus-summary-show-article-charset-alist '((1 . utf-8) (2 . chinese-iso-8bit) (3 . gbk) (4 . big5))
      gnus-newsgroup-ignored-charsets '(unknown-8bit x-unknown iso-8859-1))

(eval-after-load "mm-decode"
  '(progn
     (add-to-list 'mm-discouraged-alternatives "text/html")
     (add-to-list 'mm-discouraged-alternatives "text/richtext")))

;Send
(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 "smtp.gmail.com"
      smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-smtp-service 587
      smtpmail-auth-credentials '(("smtp.gmail.com" 587 "yyy@gmail.com" "secret"))
      smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)))

(defun change-smtpmail-auth-credentials ()
  "Change the smtpmail-starttls-credentials according to current from line."
  (save-excursion
    (let ((from (save-restriction
	  (message-narrow-to-headers)
	  (message-fetch-field "from"))))
      (if (string-match "xxx@gmail.com" from)
      (setq smtpmail-auth-credentials '(("smtp.gmail.com" 587 "xxx@gmail.com" "secret")))
    (setq smtpmail-auth-credentials '(("smtp.gmail.com" 587 "yyy@gmail.com" "secret")))))))
(add-hook 'message-setup-hook 'change-smtpmail-auth-credentials)

[-- Attachment #3: Type: text/plain, Size: 42 bytes --]


>
> Thanks in advance.

-- 
Regards,
Lei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with Gnus and Gmail
       [not found] ` <mailman.8594.1255351848.2239.help-gnu-emacs@gnu.org>
@ 2009-12-26  5:00   ` galen_boyer
  2009-12-26  6:48     ` galen_boyer
  0 siblings, 1 reply; 6+ messages in thread
From: galen_boyer @ 2009-12-26  5:00 UTC (permalink / raw)
  To: help-gnu-emacs

Wang Lei <f3d27b@gmail.com> writes:

> Mario Castelán Castro <mariocastelancastro@gmail.com> writes:
>

[...]

>
> (setq gnus-select-method '(nnml ""))
>
> I use the nnml as the backend. This is part of my config, hope useful.
>
> (setq gnus-select-method '(nnml ""))
> (setq mail-sources '((imap :server "imap.gmail.com"
>                :port 993
>                :user "xxx@gmail.com"
>                :password "secret"
>                :authentication 'login
>                :stream ssl
>                :fetchflag "\\Seen")
>              (imap :server "imap.gmail.com"
>                     :port 993
>                     :user "yyy@gmail.com"
>                :password "secret"
>                :authentication 'login
>                     :stream ssl
>                     :fetchflag "\\Seen")))

I followed this advice.

I put my login info only into the .gnus.el (username and password changed)

     (setq gnus-select-method '(nnml ""))
     (setq mail-sources '((imap :server "imap.gmail.com"
                    :port 993
                    :user "myusername@gmail.com"
                    :password "secret"
                    :authentication 'login
                    :stream ssl)))

The above was the only thing in the .gnus.el.  I then started a fresh
Emacs and then started Gnus.

Here is the *messages* buffer directly after logging into GNUS (minus
the messages from starting Emacs:

     Loading gnus...done
     Loading gnus-start...done
     Loading gnus-agent...done
     Loading bbdb-gnus...done
     Reading c:/Users/nrp0219342/Home/.newsrc.eld...
     Ignoring disappeared server `nnimap:gmail'
     Reading active file via nnml...
     nnml: Reading incoming mail from imap...
     Loading cl-macs...done
     Loading byte-opt...done
     Loading imap...done
     imap: Connecting to imap.gmail.com...
     imap: Opening SSL connection with `openssl s_client -quiet -ssl3 -connect %s:%p'...done
     Waiting for response from imap.gmail.com...done
     imap: Plaintext authentication...
     Loading utf7...done
     nnml: Reading incoming mail (no new mail)...done
     Reading active file via nnml...done
     Generating the cache active file...done
     No new newsgroups
     Checking new news...
     Opening nnml server on -ephemeral...done
     Checking new news...done


What is fishy is the "Ignoring disappeared server" line.

After Gnus is started, I do not see an imap group and the servers buffer
does not have an imap server anywhere.  My imap email account has unread
messages in it.

Suggestions?

Thanks.

-- 
Galen Boyer

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with Gnus and Gmail
  2009-12-26  5:00   ` galen_boyer
@ 2009-12-26  6:48     ` galen_boyer
  0 siblings, 0 replies; 6+ messages in thread
From: galen_boyer @ 2009-12-26  6:48 UTC (permalink / raw)
  To: help-gnu-emacs

galen_boyer@yahoo.com writes:

> Wang Lei <f3d27b@gmail.com> writes:
>
>> Mario Castelán Castro <mariocastelancastro@gmail.com> writes:
>>
>
> [...]
>
>>
>> (setq gnus-select-method '(nnml ""))
>>
>> I use the nnml as the backend. This is part of my config, hope useful.
>>
>> (setq gnus-select-method '(nnml ""))
>> (setq mail-sources '((imap :server "imap.gmail.com"
>>                :port 993
>>                :user "xxx@gmail.com"
>>                :password "secret"
>>                :authentication 'login
>>                :stream ssl
>>                :fetchflag "\\Seen")
>>              (imap :server "imap.gmail.com"
>>                     :port 993
>>                     :user "yyy@gmail.com"
>>                :password "secret"
>>                :authentication 'login
>>                     :stream ssl
>>                     :fetchflag "\\Seen")))
>
> I followed this advice.
>
> I put my login info only into the .gnus.el (username and password changed)
>
>      (setq gnus-select-method '(nnml ""))
>      (setq mail-sources '((imap :server "imap.gmail.com"
>                     :port 993
>                     :user "myusername@gmail.com"
>                     :password "secret"
>                     :authentication 'login
>                     :stream ssl)))

[...]

The emacs wiki has a nice write-up that solved it for me.
http://www.emacswiki.org/emacs/GnusGmail

Here is my .gnus.el entry now:

(setq gnus-select-method '(nntp "freenews.netfront.net"))
(add-to-list 'gnus-secondary-select-methods 
             '(nnimap "gmail"
                      (nnimap-address "imap.gmail.com")
                      (nnimap-server-port 993)
                      (nnimap-stream ssl)))

I used the .authinfo file for username/password.  This was nicely laid
out in the wiki as well.

The last thing was the the Sent Mail and other folders weren't visible
until the default setting for gnus-ignored-newsgroups was modified, as
the wiki said as well.

(setq gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\(\\|$\\)\\|^[\"]\"[#'()]")

-- 
Galen Boyer

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-26  6:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-10 17:40 Help with Gnus and Gmail Mario Castelán Castro
2009-10-12  6:22 ` Nevo
2009-10-12 10:23 ` Alberto Luaces
2009-10-12 12:51 ` Wang Lei
     [not found] ` <mailman.8594.1255351848.2239.help-gnu-emacs@gnu.org>
2009-12-26  5:00   ` galen_boyer
2009-12-26  6:48     ` galen_boyer

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 read-only IMAP folder(s) and NNTP newsgroup(s).