From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wang Lei Newsgroups: gmane.emacs.help Subject: Re: Help with Gnus and Gmail Date: Mon, 12 Oct 2009 20:51:27 +0800 Message-ID: <4ad3261d.9513f30a.66b5.6889@mx.google.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1255351889 8472 80.91.229.12 (12 Oct 2009 12:51:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2009 12:51:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 12 14:51:16 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MxKMs-0001dv-UQ for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2009 14:51:15 +0200 Original-Received: from localhost ([127.0.0.1]:55077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxKMs-000862-Dk for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2009 08:51:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxKMP-00084y-Oj for help-gnu-emacs@gnu.org; Mon, 12 Oct 2009 08:50:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxKMK-000826-Uh for help-gnu-emacs@gnu.org; Mon, 12 Oct 2009 08:50:45 -0400 Original-Received: from [199.232.76.173] (port=38326 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxKMK-00081y-Pq for help-gnu-emacs@gnu.org; Mon, 12 Oct 2009 08:50:40 -0400 Original-Received: from mail-px0-f202.google.com ([209.85.216.202]:57589) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxKMK-0007CC-5q for help-gnu-emacs@gnu.org; Mon, 12 Oct 2009 08:50:40 -0400 Original-Received: by pxi40 with SMTP id 40so9355415pxi.24 for ; Mon, 12 Oct 2009 05:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=QxsSQro/LCDeQSWp3L4s43MhtQy1k1cypn6+mksldh8=; b=r4Qj06j9KC8MLDDr3cw9hgFprTq7vDLOEdFLVMRuH0gmc59PRoaVABWdeVzCda+xQi Ekp8rGHIivSnvJMALGRfqjND6HqZeqrashYZPfZjY+ojIZPVU9pByenBC3cKwHCtl3EU i5vpb/qgK0jpcEkcqpZyQM8y8EPc9lltXsjMg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=e005XjgljIuqAIR3LxU+vQNJZXGVbzheohESa8q/H2rID8tpX2u2hzjvu7/Z0qtFCW ORrOKzo4nar2i+wHn4YXS2WZ1CIlj4TKm4AykPw6pF3oR2I28eohbPBa/M2GwebQ4cZU N7gpPuKVK6XLT491KX8DXUaJ5N/yCvLGUGtKQ= Original-Received: by 10.115.99.4 with SMTP id b4mr9907598wam.88.1255351838293; Mon, 12 Oct 2009 05:50:38 -0700 (PDT) Original-Received: from mary ([115.171.160.230]) by mx.google.com with ESMTPS id 21sm1085412pzk.15.2009.10.12.05.50.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Oct 2009 05:50:37 -0700 (PDT) In-Reply-To: (Mario Castel's message of "Sat, 10 Oct 2009 12:40:27 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68880 Archived-At: --=-=-= Content-Transfer-Encoding: 8bit Mario Castelán Castro 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. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=gnus Content-Transfer-Encoding: quoted-printable Content-Description: gnus ;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 "=E7= =A5=9D=E4=B8=80=E5=88=87=E9=A1=BA=E5=88=A9=EF=BC=8C\n xxx"))) ("Working" (auto-expire . t) (posting-style (name "yyy") (address "yyy@gmail.com") (signature "Rega= rds,\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 gn= us-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-is= o-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" "se= cret")) 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.co= m" "secret"))) (setq smtpmail-auth-credentials '(("smtp.gmail.com" 587 "yyy@gmail.com"= "secret"))))))) (add-hook 'message-setup-hook 'change-smtpmail-auth-credentials) --=-=-= > > Thanks in advance. -- Regards, Lei --=-=-=--