From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Opportunistic STARTTLS in smtpmail.el Date: Fri, 03 Jun 2011 23:48:50 +0200 Organization: Programmerer Ingebrigtsen Message-ID: References: <874o5mky4o.fsf@lifelogs.com> <8762ptue8r.fsf@lifelogs.com> <87k4e8ucw3.fsf@lifelogs.com> <87liyofwxp.fsf@lifelogs.com> <874o5cfui5.fsf@lifelogs.com> <87liyndz5l.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1307137772 1878 80.91.229.12 (3 Jun 2011 21:49:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Jun 2011 21:49:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 03 23:49: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 1QScFC-00061O-MP for ged-emacs-devel@m.gmane.org; Fri, 03 Jun 2011 23:49:26 +0200 Original-Received: from localhost ([::1]:37845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QScFB-0007Vc-Ha for ged-emacs-devel@m.gmane.org; Fri, 03 Jun 2011 17:49:25 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QScEt-0007VC-Hj for emacs-devel@gnu.org; Fri, 03 Jun 2011 17:49:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QScEr-0003ht-NY for emacs-devel@gnu.org; Fri, 03 Jun 2011 17:49:07 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:35651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QScEr-0003hf-0B for emacs-devel@gnu.org; Fri, 03 Jun 2011 17:49:05 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QScEp-0005pV-He for emacs-devel@gnu.org; Fri, 03 Jun 2011 23:49:03 +0200 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Jun 2011 23:49:03 +0200 Original-Received: from larsi by cm-84.215.51.58.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Jun 2011 23:49:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 33 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.51.58.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEVTD0QGAwUDAQLkH8II BAfdRcgLBgsDAgNFhl5qAAACU0lEQVQ4jV2UTY+kIBCG6WAzV3FJc26yiVcSJp41TTzPYd2zRMJ5 MZuuv79VoD0zW51omsf6eF9EFpP38hWKLhqUSiwhmCb8izcEXuIVpEfAmGArC1I9BK7ICijDlQiy dc4GXJ0m1ROIznH8BTUTH+RdBqqLgDHLOAszJ9BMVCorAuOyXJdfiteSlzKYP8HH25+6boW6Tb6A MLJlWS6fwHs/+zkxf8WM64dkcS3ARx9fAENq+SAwUQauJzYV8IGiqL1tCkgIwprYmhotVWkSaV1R Rjjsy2Np3vgYSwp7WbtVoGKk9gXkJ79Mcx0XrYlJEdBaypbbyE8z5zTQWKwzPfzgzh4CJ+lXEQho gLwxd4QN0m88ViAlF1td5wMauNkC0OXb+TxvVgQPnDn9BwaPlozunQSigvbV2saIzd2QCsBHhvHI ESH7uQKcb7QWpZw6CBR3lZwbK3V7ClGzPTIw3MVkjjnYa/AHCPSS8WH/WzaQjB+PHsZAbm3H3SFf cJfKuMagEqbRrtMYm8q4e5+7/t7d+CnTibIfnYF+N73pP0lTbAdjsu7A9Poglldg6HGzY8FcpTDW 0KYzUwMB/Kydha8ZGLi9vfL7fS2dhT8zetA647gCgZUTWX+APWs49vA901nFWmwnALp/irTiWAPI SO7NlJE1RsZTnONmybpMZxDBXRswADvc8XUEmXWeVCQAGcUAoANPJwwoOu8vHSTF9JvtsDJkKb8C rIkbRhXKcf4KWteRKvowfAd8KObAjT4j38CbUbgO7bL8foFMnkE9Rlgp/QMeT+1UKI6M6wAAAABJ RU5ErkJggg== Mail-Copies-To: never X-Now-Playing: Various's _Horse Meat Disco (1)_: "Gino Soccio - It's Alright" User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:INs1vtEVfZfHdCE2i9IDUPL6rGU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:140151 Archived-At: Stefan Monnier writes: > Oh, right, it should be smtpmail-use-auth. I don't think that's necessary. Here's my vision of how this would work for a person using Emacs 24 to send an email for the first time. 1) smtpmail would see that there's no host setup, so it would prompt the user for the SMTP host and store it via customize. 2) smtpmail connects to the server, and possibly does STARTTLS III) It sees whether the server says that it accepts AUTH or not. If it does, smtpmail then asks auth-source for credentials. There will be none there, probably d) smtpmail does MAIL FROM, RCPT TO and DATA, and sees whether that was successful. If it is, we're done. 5) If we get a 5xx relay denied, we then ask auth-source to query the user for user name and password, and then gives the server the AUTH, and try again. If it's successful, we're done. If not, we give up. Subsequent mails will be similar, only that we will know that we have auth, so we do AUTH immediately. I think we can pretty much get away with zero conf here. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/