unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Unwarranted invocation of starttls
@ 2012-01-01 17:11 Eli Zaretskii
  2012-01-01 18:51 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-01-01 17:11 UTC (permalink / raw)
  To: emacs-devel

My Emacs was not configured and built (on Windows) with GnuTLS.  Nor
do I need it to send email via my ISP's mail server.  Nevertheless, as
soon as I tried to send email after installing the GnuTLS DLLs and
executables, Emacs said it is invoking STARTTLS to communicate to my
SMTP server.  Of course, this failed.

Why is GnuTLS being invoked, and what should I add to my configuration
files to avoid that and still have GnuTLS installed (for building and
testing)?

TIA



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

* Re: Unwarranted invocation of starttls
  2012-01-01 17:11 Unwarranted invocation of starttls Eli Zaretskii
@ 2012-01-01 18:51 ` Lars Magne Ingebrigtsen
  2012-01-01 18:57   ` Lars Magne Ingebrigtsen
  2012-01-01 19:08   ` Eli Zaretskii
  0 siblings, 2 replies; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-01-01 18:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> My Emacs was not configured and built (on Windows) with GnuTLS.  Nor
> do I need it to send email via my ISP's mail server.  Nevertheless, as
> soon as I tried to send email after installing the GnuTLS DLLs and
> executables, Emacs said it is invoking STARTTLS to communicate to my
> SMTP server.  Of course, this failed.

What was the message exactly?  Emacs shouldn't try to use STARTTLS if
Emacs doesn't have STARTTLS capability, of course, so I'm wondering
where the message is coming from.  Could it be from starttls.el, for
some reason or other?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: Unwarranted invocation of starttls
  2012-01-01 18:51 ` Lars Magne Ingebrigtsen
@ 2012-01-01 18:57   ` Lars Magne Ingebrigtsen
  2012-01-01 19:11     ` Eli Zaretskii
  2012-01-01 19:08   ` Eli Zaretskii
  1 sibling, 1 reply; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-01-01 18:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

But to answer the question you asked :-),

(setq smtpmail-stream-type 'plain)

but I still wonder why it thinks your Emacs can use STARTTLS even though
it can't.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: Unwarranted invocation of starttls
  2012-01-01 18:51 ` Lars Magne Ingebrigtsen
  2012-01-01 18:57   ` Lars Magne Ingebrigtsen
@ 2012-01-01 19:08   ` Eli Zaretskii
  2012-01-03 18:57     ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-01-01 19:08 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Sun, 01 Jan 2012 19:51:02 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > My Emacs was not configured and built (on Windows) with GnuTLS.  Nor
> > do I need it to send email via my ISP's mail server.  Nevertheless, as
> > soon as I tried to send email after installing the GnuTLS DLLs and
> > executables, Emacs said it is invoking STARTTLS to communicate to my
> > SMTP server.  Of course, this failed.
> 
> What was the message exactly?

Opening STARTTLS connection to `MY-SERVER-NAME:25'

> Emacs shouldn't try to use STARTTLS if Emacs doesn't have STARTTLS
> capability, of course, so I'm wondering where the message is coming
> from.

I think the reason is that installing GnuTLS binaries installs
gnutls-cli executable on PATH.  At least, if I remove all the
executables and leave only the shared libraries, the problem goes
away.

> Could it be from starttls.el, for some reason or other?

Looks like that, yes.



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

* Re: Unwarranted invocation of starttls
  2012-01-01 18:57   ` Lars Magne Ingebrigtsen
@ 2012-01-01 19:11     ` Eli Zaretskii
  2012-01-03 18:58       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-01-01 19:11 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Sun, 01 Jan 2012 19:57:01 +0100
> 
> But to answer the question you asked :-),
> 
> (setq smtpmail-stream-type 'plain)

Thanks, this did the trick.

Perhaps we should mention this in NEWS (assuming this is not a bug
that we will fix ;-).  Users who get binary distributions that were
configured to use GnuTLS might bump into this like I did.

> but I still wonder why it thinks your Emacs can use STARTTLS even though
> it can't.

Let me know how I can help.



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

* Re: Unwarranted invocation of starttls
  2012-01-01 19:08   ` Eli Zaretskii
@ 2012-01-03 18:57     ` Lars Magne Ingebrigtsen
  2012-01-03 19:41       ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-01-03 18:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> What was the message exactly?
>
> Opening STARTTLS connection to `MY-SERVER-NAME:25'

Ah, right, that's definitely from starttls.el.  This means that 1) your
SMTP server has announced that it offers STARTTLS, and 2)
`open-network-stream' has determined that don't have built-in TLS
support, and 3) that it thinks that you do have external TLS support of
some kind.

> I think the reason is that installing GnuTLS binaries installs
> gnutls-cli executable on PATH.  At least, if I remove all the
> executables and leave only the shared libraries, the problem goes
> away.

`starttls-available-p' probably returned non-nil for you, I guess?  It
would be interesting to find out why it didn't work, then.  Could you
put the gnutls-cli program back into your path and edebug through
`starttls-open-stream-gnutls' (I think) to see what goes wrong?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: Unwarranted invocation of starttls
  2012-01-01 19:11     ` Eli Zaretskii
@ 2012-01-03 18:58       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-01-03 18:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> (setq smtpmail-stream-type 'plain)
>
> Thanks, this did the trick.
>
> Perhaps we should mention this in NEWS (assuming this is not a bug
> that we will fix ;-).  Users who get binary distributions that were
> configured to use GnuTLS might bump into this like I did.

I think we should fix the bug.  :-)  But we should probably mention this
in NEWS, anyway...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: Unwarranted invocation of starttls
  2012-01-03 18:57     ` Lars Magne Ingebrigtsen
@ 2012-01-03 19:41       ` Eli Zaretskii
  2012-01-03 19:45         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-01-03 19:41 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Tue, 03 Jan 2012 19:57:35 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> What was the message exactly?
> >
> > Opening STARTTLS connection to `MY-SERVER-NAME:25'
> 
> Ah, right, that's definitely from starttls.el.  This means that 1) your
> SMTP server has announced that it offers STARTTLS, and 2)
> `open-network-stream' has determined that don't have built-in TLS
> support, and 3) that it thinks that you do have external TLS support of
> some kind.
> 
> > I think the reason is that installing GnuTLS binaries installs
> > gnutls-cli executable on PATH.  At least, if I remove all the
> > executables and leave only the shared libraries, the problem goes
> > away.
> 
> `starttls-available-p' probably returned non-nil for you, I guess?  It
> would be interesting to find out why it didn't work, then.  Could you
> put the gnutls-cli program back into your path and edebug through
> `starttls-open-stream-gnutls' (I think) to see what goes wrong?

Does TLS work on Windows with gnutls-cli.exe?  I though it didn't,
because that mode of operation depended on signals that Windows
doesn't support.  That's why we switched to linking against libgnutls,
no?

Or am I confused?



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

* Re: Unwarranted invocation of starttls
  2012-01-03 19:41       ` Eli Zaretskii
@ 2012-01-03 19:45         ` Lars Magne Ingebrigtsen
  2012-01-04 11:05           ` Ted Zlatanov
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-01-03 19:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Does TLS work on Windows with gnutls-cli.exe?  I though it didn't,
> because that mode of operation depended on signals that Windows
> doesn't support.

Oh, yeah, that rings a bell.  

If this is the case, the simple fix here is to have
`starttls-available-p' return nil on Windows.

Does anybody remember whether starttls.el is supposed to work under
Windows or not?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: Unwarranted invocation of starttls
  2012-01-03 19:45         ` Lars Magne Ingebrigtsen
@ 2012-01-04 11:05           ` Ted Zlatanov
  2012-01-04 19:39             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Ted Zlatanov @ 2012-01-04 11:05 UTC (permalink / raw)
  To: emacs-devel

On Tue, 03 Jan 2012 20:45:57 +0100 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Eli Zaretskii <eliz@gnu.org> writes:
>> Does TLS work on Windows with gnutls-cli.exe?  I though it didn't,
>> because that mode of operation depended on signals that Windows
>> doesn't support.

LMI> Oh, yeah, that rings a bell.  

LMI> If this is the case, the simple fix here is to have
LMI> `starttls-available-p' return nil on Windows.

LMI> Does anybody remember whether starttls.el is supposed to work under
LMI> Windows or not?

It can work, with a lot of fiddling, but is unreliable and causes many
issues that are hard to replicate, timeouts especially.  I don't know of
anyone happily using it on W32 and think disabling it on W32 is a good
choice.

Ted




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

* Re: Unwarranted invocation of starttls
  2012-01-04 11:05           ` Ted Zlatanov
@ 2012-01-04 19:39             ` Lars Magne Ingebrigtsen
  2012-01-04 20:27               ` Ted Zlatanov
  2012-01-04 21:30               ` Eli Zaretskii
  0 siblings, 2 replies; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-01-04 19:39 UTC (permalink / raw)
  To: emacs-devel

Ted Zlatanov <tzz@lifelogs.com> writes:

> It can work, with a lot of fiddling, but is unreliable and causes many
> issues that are hard to replicate, timeouts especially.  I don't know of
> anyone happily using it on W32 and think disabling it on W32 is a good
> choice.

If it can work, isn't there a way to make it work reliably?  Where does
it fail, usually?

But if this is the case, I can add a test like

(memq system-type '(windows-nt ms-dos))

to `starttls-available-p'...  Opinions?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: Unwarranted invocation of starttls
  2012-01-04 19:39             ` Lars Magne Ingebrigtsen
@ 2012-01-04 20:27               ` Ted Zlatanov
  2012-01-04 21:30               ` Eli Zaretskii
  1 sibling, 0 replies; 14+ messages in thread
From: Ted Zlatanov @ 2012-01-04 20:27 UTC (permalink / raw)
  To: emacs-devel

On Wed, 04 Jan 2012 20:39:27 +0100 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> It can work, with a lot of fiddling, but is unreliable and causes many
>> issues that are hard to replicate, timeouts especially.  I don't know of
>> anyone happily using it on W32 and think disabling it on W32 is a good
>> choice.

LMI> If it can work, isn't there a way to make it work reliably?  Where does
LMI> it fail, usually?

I don't know the answer to either question, you'll have to search
through the Gnus bugs for the last 10 years.

LMI> But if this is the case, I can add a test like

LMI> (memq system-type '(windows-nt ms-dos))

LMI> to `starttls-available-p'...  Opinions?

Works For Me.

Ted




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

* Re: Unwarranted invocation of starttls
  2012-01-04 19:39             ` Lars Magne Ingebrigtsen
  2012-01-04 20:27               ` Ted Zlatanov
@ 2012-01-04 21:30               ` Eli Zaretskii
  2012-01-05  5:04                 ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-01-04 21:30 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 04 Jan 2012 20:39:27 +0100
> 
> Ted Zlatanov <tzz@lifelogs.com> writes:
> 
> > It can work, with a lot of fiddling, but is unreliable and causes many
> > issues that are hard to replicate, timeouts especially.  I don't know of
> > anyone happily using it on W32 and think disabling it on W32 is a good
> > choice.
> 
> If it can work, isn't there a way to make it work reliably?  Where does
> it fail, usually?
> 
> But if this is the case, I can add a test like
> 
> (memq system-type '(windows-nt ms-dos))
> 
> to `starttls-available-p'...  Opinions?

Looks right to me, thanks.



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

* Re: Unwarranted invocation of starttls
  2012-01-04 21:30               ` Eli Zaretskii
@ 2012-01-05  5:04                 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-01-05  5:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> But if this is the case, I can add a test like
>> 
>> (memq system-type '(windows-nt ms-dos))
>> 
>> to `starttls-available-p'...  Opinions?
>
> Looks right to me, thanks.

Ok; added to the Gnus repository, so it'll show up in Emacs after the
sync.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

end of thread, other threads:[~2012-01-05  5:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-01 17:11 Unwarranted invocation of starttls Eli Zaretskii
2012-01-01 18:51 ` Lars Magne Ingebrigtsen
2012-01-01 18:57   ` Lars Magne Ingebrigtsen
2012-01-01 19:11     ` Eli Zaretskii
2012-01-03 18:58       ` Lars Magne Ingebrigtsen
2012-01-01 19:08   ` Eli Zaretskii
2012-01-03 18:57     ` Lars Magne Ingebrigtsen
2012-01-03 19:41       ` Eli Zaretskii
2012-01-03 19:45         ` Lars Magne Ingebrigtsen
2012-01-04 11:05           ` Ted Zlatanov
2012-01-04 19:39             ` Lars Magne Ingebrigtsen
2012-01-04 20:27               ` Ted Zlatanov
2012-01-04 21:30               ` Eli Zaretskii
2012-01-05  5:04                 ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).