From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/14344 Path: news.gmane.org!not-for-mail From: Joseph Gay Newsgroups: gmane.emacs.gnus.user Subject: Re: Multiple sources and accounts with GNUS Date: Mon, 20 Dec 2010 16:24:19 -0600 Message-ID: <87zks0ytf0.fsf@geneva.hpsy.me> References: <87r5dco6vm.fsf@savara.sat.thregr.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1292884820 1031 80.91.229.12 (20 Dec 2010 22:40:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Dec 2010 22:40:20 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Mon Dec 20 23:40:16 2010 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PUoOt-0001So-Hv for gegu-info-gnus-english@m.gmane.org; Mon, 20 Dec 2010 23:40:15 +0100 Original-Received: from localhost ([127.0.0.1]:33001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUoOt-00034S-0l for gegu-info-gnus-english@m.gmane.org; Mon, 20 Dec 2010 17:40:15 -0500 Original-Received: from [140.186.70.92] (port=51798 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUoOq-00033r-41 for info-gnus-english@gnu.org; Mon, 20 Dec 2010 17:40:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUoOo-00081c-RD for info-gnus-english@gnu.org; Mon, 20 Dec 2010 17:40:11 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:55512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUoOo-00081W-HX for info-gnus-english@gnu.org; Mon, 20 Dec 2010 17:40:10 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PUoOi-0001Jg-TO for info-gnus-english@gnu.org; Mon, 20 Dec 2010 23:40:04 +0100 Original-Received: from adsl-89-29-117.mgm.bellsouth.net ([98.89.29.117]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Dec 2010 23:40:04 +0100 Original-Received: from gilleylen by adsl-89-29-117.mgm.bellsouth.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Dec 2010 23:40:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: adsl-89-29-117.mgm.bellsouth.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:XGNLAwtKMlCmqBwHC65HKH/yn4U= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:14344 Archived-At: Yuri D'Elia writes: > Hi everyone. After a long period with mutt (which indeed sucks less but > doesn't do news) and sylpheed/claws (which just sucks), I'm back to > GNUS. I'm a sadist underneath - I know. > > So far I was able to setup all the receiving accounts successfully (a > couple of nnimap accounts, gmane via nntp, nnmaildir for local spools, > etc), but I'm having trouble to send outgoing e-mails to different > accounts depending on the current group. > > I'm fine with the default of using sendmail, but for a couple of IMAP > groups I need to use a specific SMTP server with credentials. > > Could I use 'gnus-parameters' for that, and change > 'message-send-mail-function' depending on the group? Any pointer or > small example in how to do this? > > Thanks. Yuri, I recently set up multiple SMTP accounts and got it working to my satisfaction. I thought I'd share a couple of links that I found useful. Here's one that describes usage of msmtp as mentioned in other followups: http://cataclysmicmutation.com/blog /2010/11/19/multiple-gmail-accounts-in-gnus.html I didn't end up going that route, but I am pretty sure it would work nicely. Here's approximately what I ended up doing: http://www.mostlymaths.net /2010/12/emacs-30-day-challenge-using-gnus-to.html This is a configuration found on emacswiki whereby the SMTP credentials are set based on the from address. The problem I ran into was that auth-source picks credentials solely based on machine name and protocol, and since both my SMTP accounts are on the same machine, it always picked the first set of credentials. I did something rather ugly, which was to use the full domain name for one auth entry, and the aliased domain name for the other, in which case auth-source treats them as two separate machines. This also necessitated using the --insecure option for gnutls as the certificate check fails for the full domain because it was registered using the aliased domain. So, after all that, I probably should have used msmtp, but now it works a charm. One other tip: if you use auth-source, don't set nnimap-authinfo-file or point the smtp credentials at an authinfo file; gnus should use auth-source to handle all of that, with the end result being that you won't have to type your authinfo symmetric phrase in a million times. I hope some of that will be useful from a fellow masochist.