From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: smtpmail and ~/.authinfo Date: Sun, 21 Aug 2011 02:12:17 -0400 Message-ID: References: <83ippsqsz8.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1313907151 28808 80.91.229.12 (21 Aug 2011 06:12:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 21 Aug 2011 06:12:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 21 08:12:27 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qv1Gl-0001x7-6D for ged-emacs-devel@m.gmane.org; Sun, 21 Aug 2011 08:12:27 +0200 Original-Received: from localhost ([::1]:59916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qv1Gk-0005y2-I6 for ged-emacs-devel@m.gmane.org; Sun, 21 Aug 2011 02:12:26 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qv1Gf-0005vY-QX for emacs-devel@gnu.org; Sun, 21 Aug 2011 02:12:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qv1Gb-0006Mk-Ig for emacs-devel@gnu.org; Sun, 21 Aug 2011 02:12:21 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:46891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qv1Gb-0006Mg-Fw for emacs-devel@gnu.org; Sun, 21 Aug 2011 02:12:17 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Qv1Gb-000872-0E; Sun, 21 Aug 2011 02:12:17 -0400 In-reply-to: (message from Lars Magne Ingebrigtsen on Sun, 21 Aug 2011 06:39:12 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143471 Archived-At: > From: Lars Magne Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Sun, 21 Aug 2011 06:39:12 +0200 > > Eli Zaretskii writes: > > > It turned out that ~/.authinfo _must_ have Unix EOLs, or else sending > > mail with smtpmail not work. This happens because auth-source-search > > is called from smtpmail inside a form that let-binds > > coding-system-for-read to `binary'. That binding is there for reasons > > that have nothing to do with auth-source-search, and a cursory search > > finds no similar bindings in other users of auth-source-search. > > Yes, that sounds like an accident. Perhaps that let binding should be > narrowed dramatically? You should know: you put it there ;-) The log message for revision 104742, where these bindings were introduced, doesn't say much. Can you tell why did you need them (for Windows, no less)? > > It should be easy to fix this, but I need to know what can be in Netrc > > files to do this correctly. Can these files include non-ASCII > > characters, or do all fields in these files have to be strict 7-bit > > ASCII? > > There can basically be anything in the files, I think, and the encoding > is local. But it's unusual to put non-ASCII into the file for most > protocols, since so many protocols developed their auth schemes before > anybody had considered the problem of coding systems. > > > Also, is there any need to do something special with non-ASCII > > characters (if they are allowed) when communicating with the SMTP > > server, like encode them in some particular way? > > It... varies. :-) SMTP allows using several AUTH methods, and I'm > actually not sure whether any of them actually specify what charset to > use. DIGEST-MD5 does, I think? But smtpmail.el doesn't support it, > anyway. > > I think AUTH PLAIN, for instance, is basically essentially a binary > thing, where you're allowed to use any blob of bytes as user name and > password. Except NULs. This tells me that TRT is to bind coding-system-for-read to raw-text for auth-source-search to do its thing. But I'm still uncertain what should be the binding in the rest of smtpmail-via-smtp.