1999-12-01 Kenichi OKADA <okada@opaopa.org>
- * SLIM-VERSION: Fix.
+ * smtp.el (smtp-auth-anonymous): New function.
+ (smtp-authentication-method-alist): Add anonymous.
+
+1999-12-01 Kenichi OKADA <okada@opaopa.org>
+
+ * SLIM-VERSION: Fix.
* smtp.el: Fix Author.
* sasl.el (sasl-cram-md5): Update to delete
- insecure sequences at plain.
+ insecure sequences.
1999-11-28 Kenichi OKADA <okada@opaopa.org>
1999-10-23 Kenichi OKADA <okada@opaopa.org>
* smtp.el (smtp-auth-cram-md5): Update to delete
- insecure sequences at plain.
- (smtp-auth-login): Update to delete
- insecure sequences at plain.
+ insecure sequences.
+ (smtp-auth-login): Ditto.
1999-11-23 Kenichi OKADA <okada@opaopa.org>
'((cram-md5 smtp-auth-cram-md5)
(plain smtp-auth-plain)
(login smtp-auth-login)
+ (anonymous smtp-auth-anonymous)
))
(defcustom smtp-connection-type nil
(smtp-send-command
process
(setq secure-word (unwind-protect
- (sasl-plain "" smtp-authentication-user secure-word)
- (fillarray secure-word 0))
+ (sasl-plain "" smtp-authentication-user secure-word)
+ (fillarray secure-word 0))
secure-word (unwind-protect
- (base64-encode-string secure-word)
- (fillarray secure-word 0))
+ (base64-encode-string secure-word)
+ (fillarray secure-word 0))
secure-word (unwind-protect
- (concat "AUTH PLAIN " secure-word)
- (fillarray secure-word 0))))
+ (concat "AUTH PLAIN " secure-word)
+ (fillarray secure-word 0))))
(fillarray secure-word 0)
(setq response (smtp-read-response process))
(if (or (null (car response))
(smtp-send-command
process
(setq secure-word (unwind-protect
- (base64-encode-string secure-word)
- (fillarray secure-word 0))))
+ (base64-encode-string secure-word)
+ (fillarray secure-word 0))))
(fillarray secure-word 0)
(setq response (smtp-read-response process))
(if (or (null (car response))
(not (integerp (car response)))
(>= (car response) 400))
(throw 'done (car (cdr response))))))
+
+(defun smtp-auth-anonymous (process &optional token)
+ (let (response)
+ (smtp-send-command
+ process "AUTH ANONYMOUS")
+ (setq response (smtp-read-response process))
+ (if (or (null (car response))
+ (not (integerp (car response)))
+ (>= (car response) 400))
+ (throw 'done (car (cdr response))))
+ (smtp-send-command process
+ (base64-encode-string
+ (or token
+ user-mail-address
+ "")))
+ (setq response (smtp-read-response process))
+ (if (or (null (car response))
+ (not (integerp (car response)))
+ (>= (car response) 400))
+ (throw 'done (car (cdr response))))))
(provide 'smtp)