From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.help Subject: Re: How to add multiple email accounts inside gnus Date: Tue, 03 Nov 2015 22:32:19 +0300 Message-ID: References: <8737wnorpb.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446579172 7457 80.91.229.3 (3 Nov 2015 19:32:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Nov 2015 19:32:52 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Zed Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 03 20:32:40 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZthJs-0008G6-CS for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Nov 2015 20:32:36 +0100 Original-Received: from localhost ([::1]:50583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZthJr-0004dM-S1 for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Nov 2015 14:32:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZthJg-0004dH-Uf for help-gnu-emacs@gnu.org; Tue, 03 Nov 2015 14:32:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZthJd-00052F-N6 for help-gnu-emacs@gnu.org; Tue, 03 Nov 2015 14:32:24 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZthJd-00052B-I7 for help-gnu-emacs@gnu.org; Tue, 03 Nov 2015 14:32:21 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 06E5C21BF9 for ; Tue, 3 Nov 2015 14:32:21 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 03 Nov 2015 14:32:21 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=WFYWl dfq2m5kS/hJr4u2+2TOMcA=; b=OK8acEPi4joukVjsJQSYPVQxtUqkG4IcWBGwW sMMq6RlkTWjt2ab9sj9PZzLuSwOGiBBz8UeRtFUSHFu1drDIAznxwQOzks/+qk11 Ho9dMzsbSdhbics0wwDrBVWLSRdtV9sezbk6pVXtQFWfryOOXrTcyG9iOrYWKnkf bZaOFk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=WFYWldfq2m5kS/hJr4u2+2TOMcA=; b=KBsND P+4R+1t8yDnmrBWzyB2plt61kstnz0sbm2VSBA2pQA6JV7KWU5jlMckaIdCyLrWS T0FdOyYsfh5ztMt9gXES8JiUjsb2ooi4i2DcSQ6XtFtMrsWOAx7d2orqdmJbrYuD pcgIvGysRhYRtzt7XtZZ4aZ8bZKnlmn/SGpMOE= X-Sasl-enc: 6Pcxn1hdmeDHLX6IxeYYwSqDC4D8iYF2Fsy+pPpF5Q3O 1446579140 Original-Received: from fgunbin.local (unknown [94.25.218.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 50C34C016DB; Tue, 3 Nov 2015 14:32:20 -0500 (EST) In-Reply-To: <8737wnorpb.fsf@gmail.com> (Zed's message of "Tue, 03 Nov 2015 11:36:48 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107915 Archived-At: Hi, On 03/11/2015 11:36 -0700, Zed wrote: > I have set up the gnus with one gmail account (as follows) > > (setq gnus-select-method > '(nnimap "gmail" > (nnimap-address "imap.gmail.com") ; it could also be imap.googlemail.com if that's your server. > (nnimap-server-port 993) > (nnimap-stream ssl))) > > (setq smtpmail-default-smtp-server "smtp.gmail.com") > (setq smtpmail-smtp-server "smtp.gmail.com") > (setq smtpmail-smtp-service 587) > (setq sendmail-program "C:/cygwin64/usr/sbin/msmtp") > > (setq message-send-mail-function 'message-send-mail-with-sendmail) > (setq message-sendmail-extra-arguments '("-a" "gmail")) > > > but is it possible to add other accounts such as hotmail as well? Also, > I am not sure how to attach different accounts for different newsgroup? > > I googled the question for quite a well, but by adding address of > gnus-posting-styles only changes the signature but not the email > adress? > > Thanks! Sending mail: (setq message-send-mail-function 'message-smtpmail-send-it) (setq gnus-posting-styles '((".*" (address "me@server1.com") ("X-Message-SMTP-Method" "smtp smtp.server1.com 587")) ("nnml:some-group" (address "me@server2.com") ("X-Message-SMTP-Method" "smtp smtp.server2.com 587")))) This will add correct (internal) header when replying automatically, but to use this when composing new message you have to go to the appropriate group's line in Group buffer and type `C-u m' - this way this group's posting style will be used. For receiving my setup is a bit unusual - I download all email from imap server. (setq gnus-select-method '(nnnil "")) (setq gnus-secondary-select-methods '((nnml ""))) (setq mail-sources '((imap :server "imap.server1.com" :user "me@server1.com" :stream tls) (imap :server "imap.servers2.com" :user "me@server2.com" :stream tls))) ~/.authinfo: machine imap.server1.com login me@server1.com password secret1 machine imap.server2.com login me@server2.com password secret2 Filipp