From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79565 Path: news.gmane.org!not-for-mail From: Johnny Newsgroups: gmane.emacs.gnus.general Subject: Multiple gmail accounts and SMTP (again) Date: Sun, 24 Jul 2011 21:55:36 +0100 Message-ID: <87r55fqtyv.fsf@DeuxExMachina.config> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1311541169 1038 80.91.229.12 (24 Jul 2011 20:59:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 24 Jul 2011 20:59:29 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27861@lists.math.uh.edu Sun Jul 24 22:59:23 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ql5lh-0004lQ-0t for ding-account@gmane.org; Sun, 24 Jul 2011 22:59:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Ql5lT-0005P4-PU; Sun, 24 Jul 2011 15:59:07 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Ql5lS-0005Ol-8I for ding@lists.math.uh.edu; Sun, 24 Jul 2011 15:59:06 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Ql5lR-0005H9-1U for ding@lists.math.uh.edu; Sun, 24 Jul 2011 15:59:06 -0500 Original-Received: from mailout-eu.gmx.com ([213.165.64.42]) by quimby.gnus.org with smtp (Exim 4.72) (envelope-from ) id 1Ql5lO-0002eu-OU for ding@gnus.org; Sun, 24 Jul 2011 22:59:02 +0200 Original-Received: (qmail invoked by alias); 24 Jul 2011 20:58:56 -0000 Original-Received: from 78-86-131-176.zone2.bethere.co.uk (EHLO DeuxExMachina.config) [78.86.131.176] by mail.gmx.com (mp-eu001) with SMTP; 24 Jul 2011 22:58:56 +0200 X-Authenticated: #57368918 X-Provags-ID: V01U2FsdGVkX19dMTs6r8Bd0T710+vpOaBTJnWfRiC2S19+461ah7 qjCI4hzifHykUg User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79565 Archived-At: I am attempting to set up a second gmail account, and have some trouble in getting the outgoing mail to behave nicely. Summarising, I want to send mail from either gmail-account with "From" address set accordingly. Below, a ramble about my attempts so far. In setting up the IMAP part, I defined the virtual server names and used those in authinfo to successfully differentiate between the accounts: In .gnus.el: (nnimap "gmail1" (nnimap-address "imap.gmail.com") (nnimap-server-port 993) (nnimap-stream ssl) (nnimap-list-pattern inbox-) ) (nnimap "gmail2" (nnimap-address "imap.gmail.com") (nnimap-server-port 993) (nnimap-stream ssl) (nnimap-list-pattern inbox-) ) And then in .authinfo: machine gmail1 login gmail1@gmail.com password gmail1pass port 993 machine gmail2 login gmail2@gmail.com password gmail2pass port 993 This makes the IMAP work well. All good so far. (For SMTP, I am using the emacs-wiki setup, as described here: http://www.emacswiki.org/emacs/MultipleSMTPAccounts) I then attempted to use virtual server names for SMTP as well, i.e.: In .gnus.el: (setq smtp-accounts '( (ssl "gmail1" "smtp.gmail.com" "587" "gmail1@gmail.com" nil) (ssl "gmail2" "smtp.gmail.com" "587" "gmail2@gmail.com" nil))) And in authinfo: machine gmail1 login gmail1@gmail.com password gmail1pass port 587 machine gmail2 login gmail2@gmail.com password gmail2pass port 587 This breaks the sendmail/authinfo functionality such that I have to enter credentials every time sending mail from either account. If I instead replace the 2 lines above in authinfo with: machine smtp.gmail.com login gmail1@gmail.com password gmail1pass port 587 This makes mailing from both addresses work. I /think/ the setup makes gmail2 use gmail1's SMTP credentials to send the mail (note that I didn't have to do any changes in .gnus.el on the gmail2 credentials), and indeed, when it is received, the posting-styles for gmail2 is used, but the senders mail address has been changed to gmail1, which I do not fancy at all. Any ideas on how to enable using either gmail as sender? Cheers -- Johnny