From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel Subject: Re: [yazicivo@ttnet.net.tr: Locale Dependent Downcasing in smtpmail] Date: Tue, 03 Apr 2007 11:33:14 +0200 Message-ID: <873b3hssyt.fsf@mocca.josefsson.org> References: <87wt0uhee5.fsf@ttnet.net.tr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175592820 16527 80.91.229.12 (3 Apr 2007 09:33:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2007 09:33:40 +0000 (UTC) Cc: yazicivo@ttnet.net.tr, emacs-devel@gnu.org, Kenichi Handa To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 03 11:33:33 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HYfOO-00064D-HF for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2007 11:33:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYfRW-0008H6-9U for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2007 05:36:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYfRS-0008Gk-09 for emacs-devel@gnu.org; Tue, 03 Apr 2007 05:36:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYfRQ-0008GY-JT for emacs-devel@gnu.org; Tue, 03 Apr 2007 05:36:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYfRQ-0008GV-BJ for emacs-devel@gnu.org; Tue, 03 Apr 2007 05:36:40 -0400 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HYfOG-0005qT-B7; Tue, 03 Apr 2007 05:33:24 -0400 Original-Received: from mocca.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id l339XEQw030039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Apr 2007 11:33:16 +0200 OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:22:070403:handa@m17n.org::n8uPayHB/CtMt2a5:0dRk X-Hashcash: 1:22:070403:eliz@gnu.org::jVhGvOk7mFuphDox:5tVG X-Hashcash: 1:22:070403:yazicivo@ttnet.net.tr::Ug7PbYd0ZeYF1t6j:5fmY X-Hashcash: 1:22:070403:emacs-devel@gnu.org::j6gkqJXhO0KEBWzg:I0c+ In-Reply-To: (Eli Zaretskii's message of "Tue\, 03 Apr 2007 12\:24\:52 +0300") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux) X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on yxa.extundo.com X-Virus-Status: Clean X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68979 Archived-At: Eli Zaretskii writes: >> From: Kenichi Handa >> Date: Tue, 03 Apr 2007 17:06:07 +0900 >> Cc: rms@gnu.org, emacs-devel@gnu.org >> >> To avoid such an ad-hoc fix, I must know the purpose of >> downcasing here. Do we need just "tr A-Z a-z"? Or, do we >> have to downcase also non-ASCII chars? > > I think the purpose is quite obvious from this fragment: ... > My interpretation of this is that smtpmail sends EHLO/HELO command to > the SMTP server, and then examines the response, which specifies the > features supported by the server as a list of strings separated by > whitespace. For each such feature, we downcase and intern it, and > then check whether the resulting symbol is a member of the list of > features known to smtpmail, it adds the feature to the > supported-extensions list. Thus, downcasing needs to support only the > words in the above list of known extensions (verb, xvrb, 8bitmime, > etc.), which are pure-ASCII words. > > IOW, "tr A-Z a-z" should be enough. > > Simon, am I right? Yes, I agree. The reason is to allow servers to specify the verbs in lower case, and for things to work anyway. The relevant part from RFC 2821 is: ehlo-line = ehlo-keyword *( SP ehlo-param ) ehlo-keyword = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-") ; additional syntax of ehlo-params depends on ; ehlo-keyword I note that for future compatibility, we could treat this as UTF-8 but I believe it will cause more failures than it is worth. There are no advantages today in doing that, and nobody can tell whether there will be any advantages from it ever. So the safest is likely to leave this as ASCII-only. /Simon