Gnus development mailing list
 help / color / mirror / Atom feed
* smtpmail and starttls
@ 2005-04-28 14:37 Andrew Raines
  2005-04-29  8:35 ` Simon Josefsson
  2005-04-29 18:08 ` STARTTLS and win32 (was: smtpmail and starttls) Andrew Raines
  0 siblings, 2 replies; 10+ messages in thread
From: Andrew Raines @ 2005-04-28 14:37 UTC (permalink / raw)


I'm using Gnus 5.11 on Emacs 21.3.50/win32 (2005-01-30), with
the OEM smtpmail.elc.  When submitting a message to an SMTP
server advertising STARTTLS, smtpmail never issues the verb
in response.  I've poked around in smtpmail-via-smtp, and if
I comment out one line (below), smtpmail issues the verb, but
then Emacs hangs while trying to call starttls.exe.

  (if (and do-starttls
           (smtpmail-find-credentials smtpmail-starttls-credentials host port)
           (member 'starttls supported-extensions)
 --->    ;;   (numberp (process-id process)))

My starttls.exe binary is in c:\WINDOWS, which is in
exec-path, which should be findable by Emacs:

   (executable-find "starttls") <--- C-j
   "c:/WINDOWS/starttls.exe"

Does anybody use smtpmail and STARTTLS on windows-nt
successfully?

My relevant .gnus.el portion:

   (setq smtpmail-smtp-service 587
         send-mail-function 'smtpmail-send-it
         message-send-mail-function 'smtpmail-send-it
         smtpmail-debug-info t
         smtpmail-smtp-server "smtp.raines.ws"
         smtpmail-starttls-credentials '(("smtp.raines.ws" 587 nil nil)))

Thanks for any help.

-- 
    aaraines@pobox.com (Andrew A. Raines)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: smtpmail and starttls
  2005-04-28 14:37 smtpmail and starttls Andrew Raines
@ 2005-04-29  8:35 ` Simon Josefsson
  2005-04-29 15:12   ` Andrew Raines
  2005-04-29 18:08 ` STARTTLS and win32 (was: smtpmail and starttls) Andrew Raines
  1 sibling, 1 reply; 10+ messages in thread
From: Simon Josefsson @ 2005-04-29  8:35 UTC (permalink / raw)


Andrew Raines <aaraines@pobox.com> writes:

> I'm using Gnus 5.11 on Emacs 21.3.50/win32 (2005-01-30), with
> the OEM smtpmail.elc.  When submitting a message to an SMTP
> server advertising STARTTLS, smtpmail never issues the verb
> in response.  I've poked around in smtpmail-via-smtp, and if
> I comment out one line (below), smtpmail issues the verb, but
> then Emacs hangs while trying to call starttls.exe.
>
>   (if (and do-starttls
>            (smtpmail-find-credentials smtpmail-starttls-credentials host port)
>            (member 'starttls supported-extensions)
>  --->    ;;   (numberp (process-id process)))
>
> My starttls.exe binary is in c:\WINDOWS, which is in
> exec-path, which should be findable by Emacs:
>
>    (executable-find "starttls") <--- C-j
>    "c:/WINDOWS/starttls.exe"
>
> Does anybody use smtpmail and STARTTLS on windows-nt
> successfully?

Interesting, can you find out what (process-id process) return at that
point?  Perhaps process-id's on Windows aren't numbers?  The test is
intended to see if the process is a external process (starttls) or
internal network connection (plain tcp).



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: smtpmail and starttls
  2005-04-29  8:35 ` Simon Josefsson
@ 2005-04-29 15:12   ` Andrew Raines
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Raines @ 2005-04-29 15:12 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Andrew Raines <aaraines@pobox.com> writes:

[...]

>>   (if (and do-starttls
>>            (smtpmail-find-credentials smtpmail-starttls-credentials host port)
>>            (member 'starttls supported-extensions)
>>  --->    ;;   (numberp (process-id process)))

[...]

> Interesting, can you find out what (process-id process)
> return at that point?

Debugger entered--returning value: nil
  process-id(#<process SMTP>)
* (numberp (process-id process))
  (progn (debug) (numberp (process-id process)))
  (and do-starttls (smtpmail-find-credentials ...)))))

-- 
    aaraines@pobox.com (Andrew A. Raines)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* STARTTLS and win32 (was: smtpmail and starttls)
  2005-04-28 14:37 smtpmail and starttls Andrew Raines
  2005-04-29  8:35 ` Simon Josefsson
@ 2005-04-29 18:08 ` Andrew Raines
  1 sibling, 0 replies; 10+ messages in thread
From: Andrew Raines @ 2005-04-29 18:08 UTC (permalink / raw)


Andrew Raines <aaraines@pobox.com> writes:

> Does anybody use smtpmail and STARTTLS on windows-nt
> successfully?

I fixed my earlier problem of smtpmail not issuing STARTTLS
to TLS-enabled hosts (by removing the starttls.el from
~/elisp and using the one with CVS Emacs's Gnus; thanks for
the response, Simon), but the above question still stands.

Neither starttls.exe or gnutls-cli.exe successfully returns a
TLS-enabled connection.  Using either one (via
starttls-use-gnutls) causes Emacs to hang waiting for a
response.  I can see both being *run* by looking at the Task
Manager.  Emacs just doesn't seem to care.

I'd appreciate input from anyone who has this working.

-- 
    aaraines@pobox.com (Andrew A. Raines)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: smtpmail and starttls
  2003-11-08  1:38                           ` Simon Josefsson
@ 2003-11-14  2:18                             ` John Owens
  0 siblings, 0 replies; 10+ messages in thread
From: John Owens @ 2003-11-14  2:18 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:
> John Owens <owens.aa@ece.ucdavis.edu> writes:
>> Simon Josefsson <jas@extundo.com> writes:
>>> John Owens <owens.aa@ece.ucdavis.edu> writes:
>>>
>>>> I am trying to get smtpmail with queueing working with starttls. This
>>>> is on OS X 10.3, for the record.
>>>
>>> Which CVS revision of smtpmail.el?  Here's what I use, and I think it
>>> works.
>>
>> Just got the latest from CVS (looks like 1.61). Same behavior.
>>
>> What additional information can I provide to help debug this further?
>
> Using edebug to step through `smtpmail-open-stream' would give the
> best information.  (See trouble shooting section of Gnus manual.)

OK, here's what's being debugged (again I'm changing edu to ude
					below): 

(I'm marking all the places edebug stops with a [#] and the values 
emitted there below the elisp function.)

(defun smtpmail-open-stream (process-buffer host port)
  (let ((cred (smtpmail-find-credentials
	       smtpmail-starttls-credentials [1] host [2] port [3])[4]))
    (if (null (and cred [5] (condition-case ()
			    (progn
			      (require 'starttls)
			      (call-process
			       starttls-program))
                          (error nil)))[6])[7]
	;; The normal case.
	(open-network-stream "SMTP" process-buffer [8] host [9] port [10])
      (let* ((cred-key (smtpmail-cred-key cred))
	     (cred-cert (smtpmail-cred-cert cred))
	     (starttls-extra-args
	      (when (and (stringp cred-key) (stringp
					     cred-cert)
                         (file-regular-p
			  (setq cred-key
				(expand-file-name cred-key)))
			 (file-regular-p
			  (setq cred-cert
				(expand-file-name cred-cert))))
		(list "--key-file" cred-key "--cert-file"
		      cred-cert))))
        (starttls-open-stream "SMTP" process-buffer host port)))))

[1]: (("strat.ece.ucdavis.ude" 587 "" ""))
[2]: "strat.ece.ucdavis.ude"
[3]: "smtp"
[4]: nil
[5]: nil
[6]: nil
[7]: t
[8]: #<buffer *trace of SMTP session to strat.ece.ucdavis.ude*>
[9]: "strat.ece.ucdavis.ude"
[10]: "smtp"

Then the following:

File error: "make client process failed", "connection refused", :name, "SMTP", :buffer, #<buffer *trace of SMTP session to strat.ece.ucdavis.ude*>, :host, "strat.ece.ucdavis.ude", :service, "smtp"

Again, my settings are here:

http://article.gmane.org/gmane.emacs.gnus.general/54720/match=owens

but now I have "" instead of nil in the last two items in the list of
smtpmail-starttls-credentials.  

JDO




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: smtpmail and starttls
  2003-11-07 17:33                         ` John Owens
@ 2003-11-08  1:38                           ` Simon Josefsson
  2003-11-14  2:18                             ` John Owens
  0 siblings, 1 reply; 10+ messages in thread
From: Simon Josefsson @ 2003-11-08  1:38 UTC (permalink / raw)
  Cc: ding

John Owens <owens.aa@ece.ucdavis.edu> writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> John Owens <owens.aa@ece.ucdavis.edu> writes:
>>
>>> I am trying to get smtpmail with queueing working with starttls. This
>>> is on OS X 10.3, for the record.
>>
>> Which CVS revision of smtpmail.el?  Here's what I use, and I think it
>> works.
>
> Just got the latest from CVS (looks like 1.61). Same behavior.
>
> What additional information can I provide to help debug this further?

Using edebug to step through `smtpmail-open-stream' would give the
best information.  (See trouble shooting section of Gnus manual.)

> I don't have a starttls certificate or key in the way that you do, but
> other than that my settings are similar. (I have:
>
>      smtpmail-starttls-credentials
>       '(("strat.ece.ucdavis.ude" 587 nil nil))

After looking more carefully at my setup, I noticed the key/cert files
I specified no longer exists (I moved them away in a upgrade or two
ago).  I'm sending this message using:

 '(smtpmail-starttls-credentials (quote (("localhost" 2500 "" ""))))

I'm not sure how to get the entries to be nil with customize.

(Port 2500 is ssh-port forwarded to 587 on my mail server.)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: smtpmail and starttls
  2003-11-07 16:50                       ` Simon Josefsson
  2003-11-07 17:33                         ` John Owens
@ 2003-11-07 20:12                         ` John Owens
  1 sibling, 0 replies; 10+ messages in thread
From: John Owens @ 2003-11-07 20:12 UTC (permalink / raw)
  Cc: John Owens, ding

Simon Josefsson writes:
    John Owens <owens.aa@ece.ucdavis.edu> writes:
    
    > I am trying to get smtpmail with queueing working with starttls. This
    > is on OS X 10.3, for the record.
    
    Which CVS revision of smtpmail.el?  Here's what I use, and I think it
    works.
    
    jas@latte:~$ grep -e smtp -e starttls .emacs
     '(message-send-mail-function (quote smtpmail-send-it))
     '(send-mail-function (quote smtpmail-send-it))
     '(smtpmail-debug-info t)
     '(smtpmail-smtp-server "localhost")
     '(smtpmail-smtp-service 2500)
     '(smtpmail-starttls-credentials (quote (("localhost" 2500 "~/.smtp-yxa-key" "~/.smtp-yxa-crt"))))
    jas@latte:~$

It was about time I got a whole new distribution, so I got gnus 5.10.3
from cvs and a brand new emacs from cvs (21.3.50) and sent mail via
smtpmail that way too. The smtpmail has a 2003 copyright now, and I'm
getting the same errors.

JDO



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: smtpmail and starttls
  2003-11-07 16:50                       ` Simon Josefsson
@ 2003-11-07 17:33                         ` John Owens
  2003-11-08  1:38                           ` Simon Josefsson
  2003-11-07 20:12                         ` John Owens
  1 sibling, 1 reply; 10+ messages in thread
From: John Owens @ 2003-11-07 17:33 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> John Owens <owens.aa@ece.ucdavis.edu> writes:
>
>> I am trying to get smtpmail with queueing working with starttls. This
>> is on OS X 10.3, for the record.
>
> Which CVS revision of smtpmail.el?  Here's what I use, and I think it
> works.

Just got the latest from CVS (looks like 1.61). Same behavior.

What additional information can I provide to help debug this further?

I don't have a starttls certificate or key in the way that you do, but
other than that my settings are similar. (I have:

     smtpmail-starttls-credentials
      '(("strat.ece.ucdavis.ude" 587 nil nil))

JDO




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: smtpmail and starttls
  2003-11-07  6:39                     ` smtpmail and starttls John Owens
@ 2003-11-07 16:50                       ` Simon Josefsson
  2003-11-07 17:33                         ` John Owens
  2003-11-07 20:12                         ` John Owens
  0 siblings, 2 replies; 10+ messages in thread
From: Simon Josefsson @ 2003-11-07 16:50 UTC (permalink / raw)
  Cc: ding

John Owens <owens.aa@ece.ucdavis.edu> writes:

> I am trying to get smtpmail with queueing working with starttls. This
> is on OS X 10.3, for the record.

Which CVS revision of smtpmail.el?  Here's what I use, and I think it
works.

jas@latte:~$ grep -e smtp -e starttls .emacs
 '(message-send-mail-function (quote smtpmail-send-it))
 '(send-mail-function (quote smtpmail-send-it))
 '(smtpmail-debug-info t)
 '(smtpmail-smtp-server "localhost")
 '(smtpmail-smtp-service 2500)
 '(smtpmail-starttls-credentials (quote (("localhost" 2500 "~/.smtp-yxa-key" "~/.smtp-yxa-crt"))))
jas@latte:~$




^ permalink raw reply	[flat|nested] 10+ messages in thread

* smtpmail and starttls
  2003-11-01  3:08                   ` Ted Zlatanov
@ 2003-11-07  6:39                     ` John Owens
  2003-11-07 16:50                       ` Simon Josefsson
  0 siblings, 1 reply; 10+ messages in thread
From: John Owens @ 2003-11-07  6:39 UTC (permalink / raw)


I am trying to get smtpmail with queueing working with starttls. This
is on OS X 10.3, for the record.

The server is saying STARTTLS but it doesn't seem to be doing anything
on my client. I have credentials (no certs) set for starttls but
nothing for auth (since I want starttls).

I've altered the machine names just to avoid any spam below (replace
ude with edu).

Any suggestions anyone may have would be appreciated.

JDO

==========

220 strat.ece.ucdavis.ude ESMTP Sendmail 8.12.8/8.12.8; Fri, 31 Oct
2003 18:19:46 -0800
EHLO fanta.ece.ucdavis.ude
250-strat.ece.ucdavis.ude Hello fanta.ece.ucdavis.ude [169.237.74.29],
pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-STARTTLS
250-DELIVERBY
250 HELP
VERB
250 2.0.0 Verbose mode
MAIL FROM:<jowens@ece.ucdavis.ude> SIZE=323
250 2.1.0 <jowens@ece.ucdavis.ude>... Sender ok
RCPT TO:<jowens@graphics.stanford.ude>
550 5.7.1 <jowens@graphics.stanford.ude>... Relaying denied. Proper
authentication required.
QUIT
221 2.0.0 strat.ece.ucdavis.ude closing connection

==========

(setq user-full-name "John Owens"
      user-mail-address "jowens@ece.ucdavis.ude"
      smtpmail-default-smtp-server "strat.ece.ucdavis.ude"
      smtpmail-smtp-server "strat.ece.ucdavis.ude"
      smtpmail-smtp-service 587
      smtpmail-starttls-credentials
      '(("strat.ece.ucdavis.ude" 587 nil nil))
      starttls-program "/usr/local/bin/starttls"
      mail-host-address "ece.ucdavis.ude"
      smtpmail-local-domain nil
      smtpmail-sendto-domain nil
      smtpmail-smtp-service "smtp"
      smtpmail-code-conv-from nil
      smtpmail-queue-mail t
      send-mail-function 'smtpmail-send-it
      message-send-mail-function 'smtpmail-send-it
      smtpmail-debug-info t ; only to debug problems
      smtpmail-debug-verb t ; only to debug problems
      vm-frame-per-composition     nil
      )

==========

[fanta:~] jowens% which starttls
/usr/local/bin/starttls
[fanta:~] jowens% starttls
starttls (starttls) 0.9
Copyright (C) 1999 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Usage: starttls [options] host port

Options:

 --cert-file [file]      specify certificate file
 --key-file [file]       specify private key file
 --verify [level]        set verification level
[fanta:~] jowens% find /usr/local -name starttls\* -print
/usr/local/bin/starttls
/usr/local/share/emacs/21.3.50/lisp/gnus/starttls.el
/usr/local/share/emacs/21.3.50/lisp/gnus/starttls.elc
/usr/local/share/emacs/site-lisp/starttls.el
/usr/local/share/emacs/site-lisp/starttls.elc




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-04-29 18:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-28 14:37 smtpmail and starttls Andrew Raines
2005-04-29  8:35 ` Simon Josefsson
2005-04-29 15:12   ` Andrew Raines
2005-04-29 18:08 ` STARTTLS and win32 (was: smtpmail and starttls) Andrew Raines
  -- strict thread matches above, loose matches on Subject: below --
2003-10-30 13:58 bogofilter config Jake Colman
2003-10-30 15:23 ` Ted Zlatanov
2003-10-30 15:35   ` Jake Colman
2003-10-30 15:40     ` Jake Colman
2003-10-30 15:54       ` Ted Zlatanov
2003-10-30 16:56         ` Jake Colman
2003-10-31 16:30           ` Ted Zlatanov
2003-10-31 17:32             ` Jake Colman
2003-10-31 18:51               ` Ted Zlatanov
2003-10-31 19:51                 ` Jake Colman
2003-11-01  3:08                   ` Ted Zlatanov
2003-11-07  6:39                     ` smtpmail and starttls John Owens
2003-11-07 16:50                       ` Simon Josefsson
2003-11-07 17:33                         ` John Owens
2003-11-08  1:38                           ` Simon Josefsson
2003-11-14  2:18                             ` John Owens
2003-11-07 20:12                         ` John Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).