public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* emacs-24.3.1 crashes on talking to Google
@ 2013-08-27 16:53 Zdzislaw Meglicki
  2013-08-27 23:07 ` Ken Brown
       [not found] ` <CAPUpn4gZ2HUSYAmJ4-61xsTxpXxmVwM=pmHrmwqnuu07SKJ1qw@mail.gmail.com>
  0 siblings, 2 replies; 8+ messages in thread
From: Zdzislaw Meglicki @ 2013-08-27 16:53 UTC (permalink / raw)
  To: cygwin

I have a fresh installation of Cygwin and Emacs on Windows 8 Pro, which run on AMD A8-5500 (quadcore, 64bit). The versions are as follows:

Emacs 24.3.1
Cygwin 1.7.24

I have two problems with emacs. First, when I start it under X11, but not under KDE, it spews a message about not being able to connect to the desktop but comes up eventually after a while. It crashes eventually too, even if I don't do anything with it and chews up a lot of CPU while still alive. The w32 version works better and this is my default now. However, both versions, X11 and w32, crash on sending mail through Google. This worked nicely with older versions of Cygwin and emacs, which I used to run on Vista and Windows 7.

My .emacs settings for sending mail through Google, currently commented out, are as follows:

;; (setq starttls-use-gnutls t)
;; (setq send-mail-function 'smtpmail-send-it
;;       message-send-mail-function 'smtpmail-send-it
;;       smtpmail-starttls-credentials
;;       '(("smtp.gmail.com" 587 nil nil))
;;       smtpmail-auth-credentials
;;       (expand-file-name "~/.authinfo")
;;       smtpmail-default-smtp-server "smtp.gmail.com"
;;       smtpmail-smtp-server "smtp.gmail.com"
;;       smtpmail-smtp-service 587
;;       smtpmail-debug-info t)
;; (require 'smtpmail)

Should I change something here? My fetchmail gets e-mail from Google too and this works fine. But I had to install my own version of fetchmail because the one provided with Cygwin didn't support SSL.
     
Greetings,
Gustav
Zdzislaw (Gustav) Meglicki
http://perth.ovpit.indiana.edu/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: emacs-24.3.1 crashes on talking to Google
  2013-08-27 16:53 emacs-24.3.1 crashes on talking to Google Zdzislaw Meglicki
@ 2013-08-27 23:07 ` Ken Brown
       [not found] ` <CAPUpn4gZ2HUSYAmJ4-61xsTxpXxmVwM=pmHrmwqnuu07SKJ1qw@mail.gmail.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Ken Brown @ 2013-08-27 23:07 UTC (permalink / raw)
  To: cygwin

On 8/27/2013 12:53 PM, Zdzislaw Meglicki wrote:
> I have a fresh installation of Cygwin and Emacs on Windows 8 Pro, which run on AMD A8-5500 (quadcore, 64bit). The versions are as follows:
>
> Emacs 24.3.1
> Cygwin 1.7.24
>
> I have two problems with emacs. First, when I start it under X11, but
> not under KDE, it spews a message about not being able to connect to
> the desktop but comes up eventually after a while. It crashes

What's the exact error message?

And can you reproduce this starting with 'emacs -Q'?  If not, then there 
might be something in your .emacs or X initialization files that are 
making emacs think it should try to connect to the desktop.

> eventually too, even if I don't do anything with it and chews up a
> lot of CPU while still alive. The w32 version works better and this
> is my default now. However, both versions, X11 and w32, crash on
> sending mail through Google. This worked nicely with older versions
> of Cygwin and emacs, which I used to run on Vista and Windows 7.

>
> My .emacs settings for sending mail through Google, currently commented out, are as follows:
>
> ;; (setq starttls-use-gnutls t)
> ;; (setq send-mail-function 'smtpmail-send-it
> ;;       message-send-mail-function 'smtpmail-send-it
> ;;       smtpmail-starttls-credentials
> ;;       '(("smtp.gmail.com" 587 nil nil))
> ;;       smtpmail-auth-credentials
> ;;       (expand-file-name "~/.authinfo")
> ;;       smtpmail-default-smtp-server "smtp.gmail.com"
> ;;       smtpmail-smtp-server "smtp.gmail.com"
> ;;       smtpmail-smtp-service 587
> ;;       smtpmail-debug-info t)
> ;; (require 'smtpmail)

It looks like you're using at least one obsolete variable.  I suggest 
you start by reading the emacs documentation on smtpmail, especially the 
section on authentication.  I glanced at it and noticed the following: 
"Either or both of the login and password fields may be absent, in which 
case Emacs prompts for the information when you try to send mail.  (This 
replaces the old `smtpmail-auth-credentials' variable used prior to 
Emacs 24.1.)"

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: emacs-24.3.1 crashes on talking to Google
       [not found] ` <CAPUpn4gZ2HUSYAmJ4-61xsTxpXxmVwM=pmHrmwqnuu07SKJ1qw@mail.gmail.com>
@ 2013-08-28 12:43   ` Zdzislaw Meglicki
  0 siblings, 0 replies; 8+ messages in thread
From: Zdzislaw Meglicki @ 2013-08-28 12:43 UTC (permalink / raw)
  To: David Carricajo, cygwin

The version of the Cygwin fetchmail is 6.3.22+NLS. Running ldd on it shows:
 
   ntdll.dll, KERNEL32.DLL, KERNELBASE.dll, cygwin1.dll, cygintl-8.dll, 
   cygiconv-2.dll
 
When I run it against my .fetchmailrc, it complains about the "ssl" line and says
that it's not enabled.
 
The version of my own fetchmail, the one I compiled myself, is 6.3.26+SSL+NLS.
Running ldd on it shows all the above plus
 
   cygcrypto-1.0.0.dll, cygssl-1.0.0.dll, cygz.dll
 
But, as I said, I do not have a problem with fetchmail. The problem, as I described
in my message, is with emacs *sending* mail through Google. On making an attempt
it crashes. I can't even view diagnostics. 
 
On the other hand, my emacs can send mail through a simple non-SSL SMTP server
I run on another machine. So, it's something with how the latest emacs communicates
with Google that's broken. Posting through Google worked like a charm under
emacs-21.?.? The current emacs version is 
 
   emacs 24.3.1 (x86_64-unknown-cygwin)
 
I posted my .emacs configuration for sending mail through google in my previous
message, but here it is again for completeness:
 
 (setq starttls-use-gnutls t)
 (setq send-mail-function 'smtpmail-send-it       
       message-send-mail-function 'smtpmail-send-it
       smtpmail-starttls-credentials
       '(("smtp.gmail.com" 587 nil nil))
       smtpmail-auth-credentials
       (expand-file-name "~/.authinfo")
       smtpmail-default-smtp-server "smtp.gmail.com"
       smtpmail-smtp-server "smtp.gmail.com"
       smtpmail-smtp-service 587
       smtpmail-debug-info t)
 (require 'smtpmail)
 
===========================================================

On Wednesday, August 28, 2013 5:23 AM David Carrricajo <> wrote:

On Tue, Aug 27, 2013 at 6:53 PM, Zdzislaw Meglicki <> wrote:


>Should I change something here? My fetchmail gets e-mail from Google 
>too and this works fine. But I had to install my own version of fetchmail 
>because the one provided with Cygwin didn't support SSL.
>

Which version? from version 5 fetchmail does support SSL


>Greetings,
>Gustav
>http://perth.ovpit.indiana.edu/gustav


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: emacs-24.3.1 crashes on talking to Google
@ 2013-08-30 17:54 Zdzislaw Meglicki
  0 siblings, 0 replies; 8+ messages in thread
From: Zdzislaw Meglicki @ 2013-08-30 17:54 UTC (permalink / raw)
  To: cygwin, kbrown

Ken Brown writeth thusly:

   > I don't use Windows 8, but I just checked on Windows 7, and it works for me.

Under Windows 7, it works for me too. I have another machine with Cygwin, 
emacs-24.2.1 and Windows 7, and there is no problem talking to Google there.

The new installation on Windows 8 runs emacs-24.3.1.

Perhaps Windows 8 blocks connections to 587 on other machines?

Greetings,
Gustav
http://perth.ovpit.indiana.edu/gustav

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: emacs-24.3.1 crashes on talking to Google
  2013-08-29 14:27 Zdzislaw Meglicki
@ 2013-08-29 21:35 ` Ken Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Ken Brown @ 2013-08-29 21:35 UTC (permalink / raw)
  To: cygwin



On 8/29/2013 10:27 AM, Zdzislaw Meglicki wrote:
> Ken asks:
> 
>> This is not specific to Cygwin.  If it belongs anywhere, it should be in the emacs manual.
>> I just looked at the section "Emacs speaks SMTP" in the smtpmail documentation, and
>> the instructions look pretty clear to me.  What happens if you follow those instructions,
>> replacing "mail.example.org" with "smtp.gmail.com"?  If there's anything Cygwin-specific
>> that goes wrong, then I'll try to fix it or add something to
>>
>>     /usr/share/doc/emacs/README.Cygwin,
>>
>> whatever is appropriate.
>   
> I tried every trick and... it still crashes: the moment you try to send mail through Google
> with emacs.
>   
> My latest .emacs code looked as follows:
>   
> (require 'smtpmail)
> (require 'auth-source)
> (setq message-send-mail-function 'smtpmail-send-it)
> (setq send-mail-function 'smtpmail-send-it)
> (setq smtpmail-stream-type 'starttls)
> (setq smtpmail-default-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-service 587)
>   
> The crash occurs with or without smtpmail-stream-type set. The authentication
> lives on the ~/.authinfo file, which looks as follows:
>   
> machine smtp.gmail.com login <my-login> password <my-password>
>   
> of course, with <my-login> and <my-password> filled with the correct info.
>   
> There is some confusing information on-line and also in the emacs manual
> about whether the ~/.authinfo file should be generated by emacs on asking
> for the login and password on connection, or whether it should be written by
> the user prior to invoking emacs. If I don't have this file, emacs does not ask
> me for the login and password, but it crashes anyway.
>   
> Here's my question to the community: can anyone send e-mail through Google
> SMTP from emacs-24.3.1 on the latest 64-bit Windows-8/Cygwin?

I don't use Windows 8, but I just checked on Windows 7, and it works for me.  I created a ~/.authinfo file with the following contents:

machine smtp.googlemail.com login <my-login> port 587 password <my-passwd>

And I put the following in my ~/.emacs:

(require 'smtpmail)
(setq smtpmail-smtp-server "smtp.googlemail.com")
(setq smtpmail-smtp-service 587)
(setq send-mail-function 'smtpmail-send-it)

[I used "smtp.googlemail.com" because that's the smtp server in my Thunderbird gmail account.]

With these settings I can send mail successfully.  I do get the following in the *Messages* buffer after sending mail:

Sending via mail...
gnutls.c: [1] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data

Sending email 
Sending email done
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
Sending...done

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: emacs-24.3.1 crashes on talking to Google
@ 2013-08-29 14:27 Zdzislaw Meglicki
  2013-08-29 21:35 ` Ken Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Zdzislaw Meglicki @ 2013-08-29 14:27 UTC (permalink / raw)
  To: cygwin, kbrown

Ken asks:

> This is not specific to Cygwin.  If it belongs anywhere, it should be in the emacs manual.  
> I just looked at the section "Emacs speaks SMTP" in the smtpmail documentation, and 
> the instructions look pretty clear to me.  What happens if you follow those instructions, 
> replacing "mail.example.org" with "smtp.gmail.com"?  If there's anything Cygwin-specific 
> that goes wrong, then I'll try to fix it or add something to 
>
>   /usr/share/doc/emacs/README.Cygwin, 
>
> whatever is appropriate. 
 
I tried every trick and... it still crashes: the moment you try to send mail through Google
with emacs.
 
My latest .emacs code looked as follows:
 
(require 'smtpmail)
(require 'auth-source)
(setq message-send-mail-function 'smtpmail-send-it)
(setq send-mail-function 'smtpmail-send-it)
(setq smtpmail-stream-type 'starttls)
(setq smtpmail-default-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-service 587)
 
The crash occurs with or without smtpmail-stream-type set. The authentication
lives on the ~/.authinfo file, which looks as follows:
 
machine smtp.gmail.com login <my-login> password <my-password>
 
of course, with <my-login> and <my-password> filled with the correct info.
 
There is some confusing information on-line and also in the emacs manual
about whether the ~/.authinfo file should be generated by emacs on asking
for the login and password on connection, or whether it should be written by
the user prior to invoking emacs. If I don't have this file, emacs does not ask
me for the login and password, but it crashes anyway.
 
Here's my question to the community: can anyone send e-mail through Google
SMTP from emacs-24.3.1 on the latest 64-bit Windows-8/Cygwin? I think the
TLS/SSL libraries are fine, because fetchmail works.
 
Greetings,
Gustav
http://perth.ovpit.indiana.edu/gustav

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: emacs-24.3.1 crashes on talking to Google
  2013-08-28 13:50 Zdzislaw Meglicki
@ 2013-08-28 15:15 ` Ken Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Ken Brown @ 2013-08-28 15:15 UTC (permalink / raw)
  To: cygwin

On 8/28/2013 9:50 AM, Zdzislaw Meglicki wrote:
> Ken Brown wrote:
>
>     > What's the exact error message?
>     > And can you reproduce this starting with 'emacs -Q'?
>
> Yes, the error shows when emacs is started with -Q. Here it is:
>
> $ emacs-x11 -Q
> ** (emacs-x11:32728): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply.
> Possible causes include: the remote application did not send a reply,
> the message bus security policy blocked the reply, the reply timeout expired,
> or the network connection was broken.

This is a harmless warning, which sometimes occurs.  (I don't know when 
or why.  It comes from atk.  You can apparently suppress it with "export 
NO_AT_BRIDGE=1".  See

   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15154#11

> Then Ken wrote:
>
>     > It looks like you're using at least one obsolete variable.
>     > I suggest you start by reading the emacs documentation
>     > on smtpmail, especially the section on authentication.
>
> Indeed. I see many changes compared to emacs-21. Not only is
> smtpmail-auth-credentials obsolete. smtpmail-starttls-credentials
> is obsolete too. Yes, this part of my .emacs code will have to be
> rewritten.
>
> A suggestion to Emacs/Cygwin maintainers/developers: please, give
> us an example of a working up-to-date .emacs code for making emacs
> send e-mail through Google. It's a popular way of doing it nowadays.

This is not specific to Cygwin.  If it belongs anywhere, it should be in 
the emacs manual.  I just looked at the section "Emacs speaks SMTP" in 
the smtpmail documentation, and the instructions look pretty clear to 
me.  What happens if you follow those instructions, replacing 
"mail.example.org" with "smtp.gmail.com"?  If there's anything 
Cygwin-specific that goes wrong, then I'll try to fix it or add 
something to /usr/share/doc/emacs/README.Cygwin, whatever is appropriate.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: emacs-24.3.1 crashes on talking to Google
@ 2013-08-28 13:50 Zdzislaw Meglicki
  2013-08-28 15:15 ` Ken Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Zdzislaw Meglicki @ 2013-08-28 13:50 UTC (permalink / raw)
  To: cygwin, kbrown

Ken Brown wrote:
 
   > What's the exact error message?
   > And can you reproduce this starting with 'emacs -Q'?
 
Yes, the error shows when emacs is started with -Q. Here it is:
 
$ emacs-x11 -Q
** (emacs-x11:32728): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. 
Possible causes include: the remote application did not send a reply, 
the message bus security policy blocked the reply, the reply timeout expired, 
or the network connection was broken.

Then Ken wrote:
 
   > It looks like you're using at least one obsolete variable. 
   > I suggest you start by reading the emacs documentation 
   > on smtpmail, especially the section on authentication.
 
Indeed. I see many changes compared to emacs-21. Not only is
smtpmail-auth-credentials obsolete. smtpmail-starttls-credentials
is obsolete too. Yes, this part of my .emacs code will have to be
rewritten.
 
A suggestion to Emacs/Cygwin maintainers/developers: please, give
us an example of a working up-to-date .emacs code for making emacs 
send e-mail through Google. It's a popular way of doing it nowadays.
 
Greetings to all,
Gustav
http://perth.ovpit.indiana.edu/gustav

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2013-08-30 17:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-27 16:53 emacs-24.3.1 crashes on talking to Google Zdzislaw Meglicki
2013-08-27 23:07 ` Ken Brown
     [not found] ` <CAPUpn4gZ2HUSYAmJ4-61xsTxpXxmVwM=pmHrmwqnuu07SKJ1qw@mail.gmail.com>
2013-08-28 12:43   ` Zdzislaw Meglicki
2013-08-28 13:50 Zdzislaw Meglicki
2013-08-28 15:15 ` Ken Brown
2013-08-29 14:27 Zdzislaw Meglicki
2013-08-29 21:35 ` Ken Brown
2013-08-30 17:54 Zdzislaw Meglicki

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).