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
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
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.
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
> (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
> 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 :
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
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?
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
[...]
> Then it *did* step into the starttls-open-stream method.
>
So it's working, or what ?
-ap
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