all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Please excuse this XEmacs user's desperation: smtpmail.el over SSL
@ 2010-03-30  2:02 edburns
  2010-03-30  3:25 ` edburns
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: edburns @ 2010-03-30  2:02 UTC (permalink / raw)
  To: help-gnu-emacs

I know this is GNU emacs, not XEmacs, but I've never had the chutzpa
to migrate.  I'm very sorry.  Please excuse me.  If anyone can help me
here, I would really be grateful.  I've spent many hours in edebug
mode and still am no closer to a solution than when I started.


Hello distinguished lisp programmers,
I have asked Mr. Simon Josefsson to help with this but have
received no reply in over a week of waiting.  I sincerely
hope you can help me.
When Oracle bought my employer, Sun Microsystems, naturally
they migrated all the users to Oracle's mail server.  The
configuration I had working no longer works.
Oracle's mail server wants AUTH LOGIN over an SSL
connection.  I have a plain vanilla XEmacs 21.4.22
installation (with mail-lib version 1.80, VM version
8.0.12-devo-585), which I'm starting with xemacs --vanilla
&.  Then, I'm evaluating a region including the following
expressions.
(setq starttls-use-gnutls t)
(setq starttls-gnutls-program "gnutls-cli")
(setq send-mail-function 'smtpmail-send-it
      message-send-mail-function 'smtpmail-send-it
      smtpmail-starttls-credentials
      '(("stbeehive.oracle.com" 465 nil nil))
      smtpmail-auth-credentials
      (expand-file-name "~/.authinfo")
      smtpmail-default-smtp-server "stbeehive.oracle.com"
      smtpmail-smtp-server "stbeehive.oracle.com"
      smtpmail-smtp-service 465
      smtpmail-debug-info t)
(require 'smtpmail)
FYI: gnutl-cli is on my path
bash-3.00$ gnutls-cli-debug --version
gnutls-cli (GnuTLS) 2.2.0
However we don't even get that far.  I'm finding that XEmacs
hangs within smtpmail.el at this line:
(defun smtpmail-open-stream (process-buffer host port)
  (let ((cred (smtpmail-find-credentials
         smtpmail-starttls-credentials host port)))
    (if (null (and cred (condition-case ()
          ;; XEmacs change
          (with-boundp '(starttls-use-gnutls
             starttls-gnutls-program
             starttls-program)
            (require 'starttls)
            (call-process (if starttls-use-gnutls
            starttls-gnutls-program
                starttls-program)))
        (error nil))))
  ;; The normal case.
=>  (open-network-stream "SMTP" process-buffer host port)
      (let* ((cred-key (smtpmail-cred-key cred))
       (cred-cert (smtpmail-cred-cert cred))
host is stbeehive.oracle.com
port is 465
Can anyone help me here?  I mean, open-network-stream is just opening
a simple TCP connection.  That happens before SSL is established,
right?

Can anyone please help?

Sincerely,

Ed Burns


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over  SSL
  2010-03-30  2:02 Please excuse this XEmacs user's desperation: smtpmail.el over SSL edburns
@ 2010-03-30  3:25 ` edburns
  2010-03-30 13:30 ` Christian Dietrich
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: edburns @ 2010-03-30  3:25 UTC (permalink / raw)
  To: help-gnu-emacs

> Can anyone please help?

I'm so desperate for help that I'll send the first person who gets me
up and running a free copy of my book "Secrets of the Rockstar
Programmers" <http://ridingthecrest.com>.

Please help!

Thanks,

Ed


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over SSL
  2010-03-30  2:02 Please excuse this XEmacs user's desperation: smtpmail.el over SSL edburns
  2010-03-30  3:25 ` edburns
@ 2010-03-30 13:30 ` Christian Dietrich
  2010-03-30 15:19   ` edburns
  2010-03-30 16:33 ` Andreas Politz
  2010-03-31 13:39 ` Ted Zlatanov
  3 siblings, 1 reply; 11+ messages in thread
From: Christian Dietrich @ 2010-03-30 13:30 UTC (permalink / raw)
  To: help-gnu-emacs

edburns <edburns@gmail.com> schrieb:
> I know this is GNU emacs, not XEmacs, but I've never had the chutzpa
> to migrate.  I'm very sorry.  Please excuse me.  If anyone can help me
> here, I would really be grateful.  I've spent many hours in edebug
> mode and still am no closer to a solution than when I started.
>=>  (open-network-stream "SMTP" process-buffer host port)

This line seems to just opening the TCP Connection, Can you `message'
the host/port or see it in the debugger (I never tried edebug, but i
think i shoul). Can you connect there with netcat/telnet?

> Can anyone help me here?  I mean, open-network-stream is just opening
> a simple TCP connection.  That happens before SSL is established,
> right?

Work around:
If you have ssh connection to an server were sendmail is working
properly:

Set the sendmailprogramm to `ssh host /usr/sbin/sendmail'. Works for
me perfectly.

greetz didi
-- 
No documentation is better than bad documentation
-- Das Ausdrucken dieser Mail wird urheberrechtlich verfolgt.


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over  SSL
  2010-03-30 13:30 ` Christian Dietrich
@ 2010-03-30 15:19   ` edburns
  0 siblings, 0 replies; 11+ messages in thread
From: edburns @ 2010-03-30 15:19 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 30, 9:30 am, Christian Dietrich <stettber...@peer.zerties.org>
wrote:
> edburns <edbu...@gmail.com> schrieb:
>
> > I know this is GNU emacs, not XEmacs, but I've never had the chutzpa
> > to migrate.  I'm very sorry.  Please excuse me.  If anyone can help me
> > here, I would really be grateful.  I've spent many hours in edebug
> > mode and still am no closer to a solution than when I started.
> >=>  (open-network-stream "SMTP" process-buffer host port)
>
> This line seems to just opening the TCP Connection, Can you `message'
> the host/port or see it in the debugger (I never tried edebug, but i
> think i shoul). Can you connect there with netcat/telnet?
>
> > Can anyone help me here?  I mean, open-network-stream is just opening
> > a simple TCP connection.  That happens before SSL is established,
> > right?
>
> Work around:
> If you have ssh connection to an server were sendmail is working
> properly:
>
> Set the sendmailprogramm to `ssh host /usr/sbin/sendmail'. Works for
> me perfectly.

Ahh, if it were that simple.  While sendmail is installed at /usr/sbin/
sendmail,
it is configured to route through Sun's MTA, not Oracles.  Besides, it
said
something about "requires valid sender domain".

Anyone else?  Anything new?  Free book!

Ed


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over SSL
  2010-03-30  2:02 Please excuse this XEmacs user's desperation: smtpmail.el over SSL edburns
  2010-03-30  3:25 ` edburns
  2010-03-30 13:30 ` Christian Dietrich
@ 2010-03-30 16:33 ` Andreas Politz
  2010-03-30 16:41   ` Andreas Politz
  2010-03-31 13:39 ` Ted Zlatanov
  3 siblings, 1 reply; 11+ messages in thread
From: Andreas Politz @ 2010-03-30 16:33 UTC (permalink / raw)
  To: help-gnu-emacs

edburns <edburns@gmail.com> writes:

> (defun smtpmail-open-stream (process-buffer host port)
>   (let ((cred (smtpmail-find-credentials
>          smtpmail-starttls-credentials host port)))
===>   (if (null (and cred (condition-case ()
>           ;; XEmacs change
>           (with-boundp '(starttls-use-gnutls
>              starttls-gnutls-program
>              starttls-program)
>             (require 'starttls)
>             (call-process (if starttls-use-gnutls
>             starttls-gnutls-program
>                 starttls-program)))
>         (error nil))))
>   ;; The normal case.
> =>  (open-network-stream "SMTP" process-buffer host port)
>       (let* ((cred-key (smtpmail-cred-key cred))
>        (cred-cert (smtpmail-cred-cert cred))
> host is stbeehive.oracle.com
> port is 465
> Can anyone help me here?  I mean, open-network-stream is just opening
> a simple TCP connection.  That happens before SSL is established,
> right?
>

Either `cred' is unbound at this point, or there is an error inside 
the condition-case.  So the questions are :

a) What is the value of `cred' ?
b) What happens (error or not) if you remove the condition-case
  from this function ?

> Can anyone please help?
>

-ap

> Sincerely,
>
> Ed Burns


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over SSL
  2010-03-30 16:33 ` Andreas Politz
@ 2010-03-30 16:41   ` Andreas Politz
  2010-04-01 19:46     ` edburns
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Politz @ 2010-03-30 16:41 UTC (permalink / raw)
  To: help-gnu-emacs

Andreas Politz <politza@fh-trier.de> writes:

> Either `cred' is unbound at this point, or there is an error inside 
> the condition-case.  So the questions are :
>
> a) What is the value of `cred' ?
> b) What happens (error or not) if you remove the condition-case
>   from this function ?
>

In case this was unclear, change it like this :


(if (null (and cred
               ;;(condition-case ()
           ;; XEmacs change
           (with-boundp '(starttls-use-gnutls
              starttls-gnutls-program
              starttls-program)
             (require 'starttls)
             (call-process (if starttls-use-gnutls
             starttls-gnutls-program
                 starttls-program)))
         ;;(error nil))
               ))
   ;; The normal case.



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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over SSL
  2010-03-30  2:02 Please excuse this XEmacs user's desperation: smtpmail.el over SSL edburns
                   ` (2 preceding siblings ...)
  2010-03-30 16:33 ` Andreas Politz
@ 2010-03-31 13:39 ` Ted Zlatanov
  2010-04-01 19:46   ` edburns
  3 siblings, 1 reply; 11+ messages in thread
From: Ted Zlatanov @ 2010-03-31 13:39 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, 29 Mar 2010 19:02:05 -0700 (PDT) edburns <edburns@gmail.com> wrote: 

e> (setq starttls-use-gnutls t)
e> (setq starttls-gnutls-program "gnutls-cli")
e> (setq send-mail-function 'smtpmail-send-it
e>       message-send-mail-function 'smtpmail-send-it
e>       smtpmail-starttls-credentials
e>       '(("stbeehive.oracle.com" 465 nil nil))
e>       smtpmail-auth-credentials
e>       (expand-file-name "~/.authinfo")
e>       smtpmail-default-smtp-server "stbeehive.oracle.com"
e>       smtpmail-smtp-server "stbeehive.oracle.com"
e>       smtpmail-smtp-service 465
e>       smtpmail-debug-info t)
e> (require 'smtpmail)

Can you connect to the server with gnutls-cli from the command line?

If yes, can you use open-network-stream to do the same from within
Emacs?

Ted


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over  SSL
  2010-03-30 16:41   ` Andreas Politz
@ 2010-04-01 19:46     ` edburns
  2010-04-02  4:42       ` Andreas Politz
  0 siblings, 1 reply; 11+ messages in thread
From: edburns @ 2010-04-01 19:46 UTC (permalink / raw)
  To: help-gnu-emacs


EB> (defun smtpmail-open-stream (process-buffer host port)
EB>   (let ((cred (smtpmail-find-credentials
EB>          smtpmail-starttls-credentials host port)))

AP> ===>   (if (null (and cred (condition-case ()

AP> Either `cred' is unbound at this point, or there is an error
inside
AP> the condition-case.  So the questions are :

AP> a) What is the value of `cred' ?

Value: ("stbeehive.oracle.com" 465 nil nil)

In edebug, after obtaining the value of cred, I continued to press the
space bar until point reached the character in smtp.el shown here

=> (starttls-open-stream "SMTP" process-buffer host port)))))
-----------------------------------------------------------^

At that point, this appeared in the minibuffer

Result: #<network connection "SMTP" (465 . "stbeehive.oracle.com")
state: run>

The next press of the spacebar (edebug-step-mode) moved the cursor to
here:

=> (starttls-open-stream "SMTP" process-buffer host port)))))
------------------------------------------------------------^

and xemacs froze for about 30 seconds and then I see this message in
the
minibuffer.

Process not open for writing: #<network connection "SMTP" (465 .
"stbeehive.oracle.com") state: exit>

The start of the expression that I suppose was responsible for the
freeze is the (let) itself, that is the body of the smtpmail-open-
stream
(defun).

AP> b) What happens (error or not) if you remove the condition-case
AP>   from this function ?

Symbol's function definition is void: with-boundp

So I googled around and found a definition of with-boundp at
<http://membled.com/lib/xemacs-21.5-b27/lisp/bytecomp-runtime.el>.  I
copied this into smtpmail.el, made sure it was bound and re-ran the
mail
send.

Then it *did* step into the starttls-open-stream method.

Is it possible that the version of smtpmail.el included with version
1.80 of mail-lib (which I got using the package mechanism as the
latest
version) is not supported with my version of xemacs: 21.4.22.  By the
way, xemacs 21.4.22 *is* the lastest stable version?

TZ> Can you connect to the server with gnutls-cli from the command
line?

I tried this right away, in fact.  I'm not sure what to expect.  I
certainly did not get the SMTP banner, which I see when using
Thunderbird NSPR logging to be:

220 default ESMTP Oracle Beehive Gateway; .....

I just see that it hangs.

Should I see the SMTP banner?


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over  SSL
  2010-03-31 13:39 ` Ted Zlatanov
@ 2010-04-01 19:46   ` edburns
  2010-04-05 14:30     ` Ted Zlatanov
  0 siblings, 1 reply; 11+ messages in thread
From: edburns @ 2010-04-01 19:46 UTC (permalink / raw)
  To: help-gnu-emacs


> Can you connect to the server with gnutls-cli from the command line?
>
> If yes, can you use open-network-stream to do the same from within
> Emacs?
>
> Ted


TZ> Can you connect to the server with gnutls-cli from the command
line?

I tried this right away, in fact.  I'm not sure what to expect.  I
certainly did not get the SMTP banner, which I see when using
Thunderbird NSPR logging to be:

220 default ESMTP Oracle Beehive Gateway; .....

I just see that it hangs.

Should I see the SMTP banner?


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over SSL
  2010-04-01 19:46     ` edburns
@ 2010-04-02  4:42       ` Andreas Politz
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Politz @ 2010-04-02  4:42 UTC (permalink / raw)
  To: help-gnu-emacs

edburns <edburns@gmail.com> writes:

[...]
> Then it *did* step into the starttls-open-stream method.
>
So it's working, or what ?

-ap


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

* Re: Please excuse this XEmacs user's desperation: smtpmail.el over SSL
  2010-04-01 19:46   ` edburns
@ 2010-04-05 14:30     ` Ted Zlatanov
  0 siblings, 0 replies; 11+ messages in thread
From: Ted Zlatanov @ 2010-04-05 14:30 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 1 Apr 2010 12:46:36 -0700 (PDT) edburns <edburns@gmail.com> wrote: 

TZ> Can you connect to the server with gnutls-cli from the command line?

e> I tried this right away, in fact.  I'm not sure what to expect.  I
e> certainly did not get the SMTP banner, which I see when using
e> Thunderbird NSPR logging to be:

e> 220 default ESMTP Oracle Beehive Gateway; .....

e> I just see that it hangs.

e> Should I see the SMTP banner?

If you can't use gnutls-cli from the command line, it probably won't
work from smtpmail.el or anywhere else.

If it hangs, you're probably not connecting.  You should see the 220
message at least.  So Thunderbird is doing something different.  Check
the *exact* protocol it uses and the port.

Ted


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

end of thread, other threads:[~2010-04-05 14:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30  2:02 Please excuse this XEmacs user's desperation: smtpmail.el over SSL edburns
2010-03-30  3:25 ` edburns
2010-03-30 13:30 ` Christian Dietrich
2010-03-30 15:19   ` edburns
2010-03-30 16:33 ` Andreas Politz
2010-03-30 16:41   ` Andreas Politz
2010-04-01 19:46     ` edburns
2010-04-02  4:42       ` Andreas Politz
2010-03-31 13:39 ` Ted Zlatanov
2010-04-01 19:46   ` edburns
2010-04-05 14:30     ` Ted Zlatanov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.