[mew-int 2149] Re: bug in mew-smtp-command-auth-plain

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
Thu May 18 18:07:13 JST 2006


Werner,

> To make mew work with the SMTP host I use, it was necessary to change
> mew-smpt-command-auth-plain as follows.
> 
>   (defun mew-smtp-command-auth-plain (pro pnm) 
>     (let* ((user (mew-smtp-get-auth-user pnm))
>            (prompt (format "SMTP PLAIN password (%s): " user))
>            (passwd (mew-smtp-input-passwd prompt pnm))
>            (plain (mew-base64-encode-string
>              (format "%s\0%s\0%s" user user passwd))))
>       (mew-smtp-process-send-string pro "AUTH PLAIN %s" plain)
>       (mew-smtp-set-status pnm "auth-plain")))

I have been thinking this problem for a long time.

I'm ashamed that I didn't know which spec defines SMTP AUTH PLAIN. But
I finally found it. It is RFC 2595. According to it, SMTP AUTH PLAIN
is defined as follows:

	message = [authorize-id] NUL authenticate-id NUL password

Thus, specifying <authorize-id> is valid.

I defined a variable named mew-smtp-auth-plain-authorize-id to specify
the <authorize-id>. Its document says:

	*If nil, SMTP AUTH PLAIN is created as follow:
		NUL authenticate-id NUL password
	If non-nil, it is created as follow:
		authorize-id NUL authenticate-id NUL password
	For more information, see RFC 2595.

This variable can also be defined in mew-config-alist.

--Kazu



More information about the Mew-int mailing list