[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Locale Dependent Downcasing in smtpmail]
From: |
Eli Zaretskii |
Subject: |
Re: address@hidden: Locale Dependent Downcasing in smtpmail] |
Date: |
Tue, 03 Apr 2007 12:24:52 +0300 |
> 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:
(smtpmail-send-command process (format "EHLO %s" (smtpmail-fqdn)))
(if (or (null (car (setq response-code
(smtpmail-read-response process))))
(not (integerp (car response-code)))
(>= (car response-code) 400))
(progn
;; HELO
(smtpmail-send-command
process (format "HELO %s" (smtpmail-fqdn)))
(if (or (null (car (setq response-code
(smtpmail-read-response process))))
(not (integerp (car response-code)))
(>= (car response-code) 400))
(throw 'done nil)))
(dolist (line (cdr (cdr response-code)))
(let ((name (mapcar (lambda (s) (intern (downcase s)))
(split-string (substring line 4) "[ ]"))))
(and (eq (length name) 1)
(setq name (car name)))
(and name
(cond ((memq (if (consp name) (car name) name)
'(verb xvrb 8bitmime onex xone
expn size dsn etrn
enhancedstatuscodes
help xusr
auth=login auth starttls))
(setq supported-extensions
(cons name supported-extensions)))
(smtpmail-warn-about-unknown-extensions
(message "Unknown extension %s" name)))))))
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?
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Chong Yidong, 2007/04/01
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Kenichi Handa, 2007/04/02
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Volkan YAZICI, 2007/04/03
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Kenichi Handa, 2007/04/03
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Werner LEMBERG, 2007/04/03
- Re: address@hidden: Locale Dependent Downcasing in smtpmail],
Eli Zaretskii <=
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Simon Josefsson, 2007/04/03
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Volkan YAZICI, 2007/04/03
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Eli Zaretskii, 2007/04/03
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], David Kastrup, 2007/04/03
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Andreas Schwab, 2007/04/03
- Message not available
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], David Kastrup, 2007/04/03
- Message not available
- Message not available
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], David Kastrup, 2007/04/03
- Re: address@hidden: Locale Dependent Downcasing in smtpmail], Chong Yidong, 2007/04/03
- with-case-table / ascii-case-table (was: address@hidden: Locale Dependent Downcasing in smtpmail]), Reiner Steib, 2007/04/03
- Re: with-case-table / ascii-case-table, Chong Yidong, 2007/04/04