emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Locale Dependent Downcasing in smtpmail]


From: Simon Josefsson
Subject: Re: address@hidden: Locale Dependent Downcasing in smtpmail]
Date: Tue, 03 Apr 2007 11:33:14 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Kenichi Handa <address@hidden>
>> Date: Tue, 03 Apr 2007 17:06:07 +0900
>> Cc: address@hidden, address@hidden
>> 
>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]