Re: wl-fcc not working with smtpmail-send-it
Kazuhiro Ito <[email protected]> Tue, 27 Mar 2018 17:36:59 +0900
| Newsgroups | gmane.mail.wanderlust.general |
|---|---|
| Message-ID | <86370lgbis.wl--xmue__19388.4768792943$1522139768$gmane$org@d1.dion.ne.jp> |
> Hmmm, I had spent many days (!) unsuccessfully trying to make that work in the > past. Another attempt now, the function seems to be getting my settings > correctly (starttls, 587, PLAIN) but here is what I'm getting in the log: > > > 220 gmx.com (mrgmx002) Nemesis ESMTP Service ready > 250-gmx.com Hello jimisX1.blahfqdn [171.23.129.33] > 250-AUTH LOGIN PLAIN > 250-SIZE 69920427 > 250 STARTTLS > 220 OK > 250-gmx.com Hello jimisX1.blahfqdn [171.23.129.33] > 250-AUTH LOGIN PLAIN > 250 SIZE 69920427 > > Process SMTP deleted > EHLO jimisX1.blahfqdn > 503 Bad sequence of commands > HELO jimisX1.blahfqdn > 503 Bad sequence of commands > QUIT > 221 gmx.com Service closing transmission channel Wanderlust's default SMTP client unintendedly sends EHLO command twice after STARTTLS command if built-in GnuTLS library is used. As far as I tested, your SMTP server does not accept sequential EHLO command. Furthermore, 503 response for EHLO command is RFC violation and your SMTP server rejects the second EHLO command even after RSET command. Please try attached patch for FLIM. But I think your server shoud be fixed primally. -- Kazuhiro Ito
diff.diff
(application/octet-stream, 1.8 KB)
diff --git a/smtp.el b/smtp.el
index ef83d2c..03f1c5a
--- a/smtp.el
+++ b/smtp.el
@@ -266,7 +266,8 @@ to connect to. SERVICE is name of the service desired."
(eval-and-compile
(autoload 'starttls-open-stream "starttls")
- (autoload 'starttls-negotiate "starttls"))
+ (autoload 'starttls-negotiate "starttls")
+ (autoload 'gnutls-negotiate "gnutls"))
(defun smtp-open-connection (buffer server service)
"Open a SMTP connection for a service to a host.
@@ -276,9 +277,7 @@ of the host to connect to. SERVICE is name of the service desired."
(let ((process
(binary-funcall
(cond
- ((and smtp-use-starttls smtp-use-gnutls)
- 'smtp-open-gnutls-starttls-stream)
- (smtp-use-starttls
+ ((and smtp-use-starttls (null smtp-use-gnutls))
'starttls-open-stream)
(t
smtp-open-connection-function))
@@ -391,7 +390,7 @@ BUFFER may be a buffer or a buffer name which contains mail message."
(smtp-primitive-ehlo package)
(smtp-response-error
(smtp-primitive-helo package)))
- (if (and smtp-use-starttls (null smtp-use-gnutls))
+ (if smtp-use-starttls
(if (assq 'starttls
(smtp-connection-extensions-internal
(smtp-find-connection (current-buffer))))
@@ -551,7 +550,11 @@ BUFFER may be a buffer or a buffer name which contains mail message."
(setq response (smtp-read-response connection))
(if (/= (car response) 220)
(smtp-response-error response))
- (starttls-negotiate (smtp-connection-process-internal connection))))
+ (if smtp-use-gnutls
+ (gnutls-negotiate
+ :process (smtp-connection-process-internal connection)
+ :hostname (smtp-connection-server-internal connection))
+ (starttls-negotiate (smtp-connection-process-internal connection)))))
(defun smtp-primitive-mailfrom (package)
(let* ((connection