VM (View Mail) for Emacs

imap error due to stunnel/ gnutls again

Reported by mere user on 2011-07-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Low
Uday Reddy

Bug Description

Hi Uday, I upgraded mac os x to lion and ran into this problem again:

Starting IMAP over SSL session Sat Jul 23 18:37:42 2011
-- connecting to email.xx:993

* OK The Microsoft Exchange IMAP4 service is ready.
-- connected for movemail
VM CAPABILITY
Process IMAP over SSL finished

this time I am unable to downgrade stunnel. I tried installing it via macports and
using the latest tar file. both lead to the above error. any suggestions on how
I can further debug the issue?

many thanks... cheers, E

p.s. too bad about the group. trying to post to gmane via the web page,
      I get an error that the lines are longer than 80 characters or such. strange...

> this time I am unable to downgrade stunnel. I tried installing it via
> macports and using the latest tar file. both lead to the above error.
> any suggestions on how I can further debug the issue?

You can try the built-in SSL of Emacs 24. If you pull the latest revision
on the VM trunk or the 8.2.x branch, and set vm-stunnel-program to nil, you
will get it. Whether it will work or not, I can't say.

> p.s. too bad about the group. trying to post to gmane via the web page, I
> get an error that the lines are longer than 80 characters or such.
> strange...

But why use the web page? You can read it in your news reader. Or you can
subscribe to the mailing list.

Cheers,
Uday

Changed in vm:
status: New → In Progress
importance: Undecided → Wishlist
assignee: nobody → Uday Reddy (reddyuday)
milestone: none → 8.2.0
tags: added: compatibility
Uday Reddy (reddyuday) wrote :

mere user writes:

> this time I am unable to downgrade stunnel. I tried installing it via
> macports and using the latest tar file. both lead to the above error.
> any suggestions on how I can further debug the issue?

Note that VM succeeded in connecting to the server as the trace says
"connected". But if it doesn't work after that, I think it is purely a
problem with your stunnel program.

You can try the stunnel-users mailing list.

  https://www.stunnel.org/mailman/listinfo/stunnel-users

Cheers,
Uday

mere user (emacs-user) wrote :

thanks for the prompt response,

On Sun, Jul 24, 2011 at 4:50 AM, Uday Reddy <email address hidden> wrote:
>> this time I am unable to downgrade stunnel.  I tried installing it via
>> macports and using the latest tar file.  both lead to the above error.
>> any suggestions on how I can further debug the issue?
>
> You can try the built-in SSL of Emacs 24.  If you pull the latest revision
> on the VM trunk or the 8.2.x branch, and set vm-stunnel-program to nil, you
> will get it.  Whether it will work or not, I can't say.

I then get:
vm-imap-check-for-server-spec: vm-stunnel-program must be non-nil to
use IMAP over SSL.

I guess I was looking for a way to see what the detailed exchange
between the server and stunnel is in the hope that this will clarify
what the problem is with the new stunnel version. any clues?
thanks...

> Uday

mere user (emacs-user) wrote :

hi Uday, so I finally managed to downgrade to stunnel 4.33 using an
old tar file from the stunnel web page and this solved the problem.
so no question that the problem was the stunnel program. this is also
mentioned here:
http://codeshop.posterous.com/emacs-vm-config-for-gmail-imap . I tried
both macports and an installation from a tar file of the latest
version of stunnel and both had this problem. I am all set now, but
if you feel it is worthwhile investigating why the latest stunnel does
not work with vm on a mac, I'd be very glad to help. just let me know
what I need to do to make the detailed exchange between stunnel, vm
and the server show. thanks as always, best, E

On Sun, Jul 24, 2011 at 5:06 AM, Uday Reddy <email address hidden> wrote:
> mere user writes:
>
>> this time I am unable to downgrade stunnel.  I tried installing it via
>> macports and using the latest tar file.  both lead to the above error.
>> any suggestions on how I can further debug the issue?
>
> Note that VM succeeded in connecting to the server as the trace says
> "connected".  But if it doesn't work after that, I think it is purely a
> problem with your stunnel program.
>
> You can try the stunnel-users mailing list.
>
>  https://www.stunnel.org/mailman/listinfo/stunnel-users
>
> Cheers,
> Uday

Uday Reddy (reddyuday) wrote :

mere user writes:

> I then get:
> vm-imap-check-for-server-spec: vm-stunnel-program must be non-nil to
> use IMAP over SSL.

Then you are not using the latest version. Please pull again and rebuild.

> I guess I was looking for a way to see what the detailed exchange
> between the server and stunnel is in the hope that this will clarify
> what the problem is with the new stunnel version. any clues?

Not really. That is outside my area of expertise. Since SSL has been put
into Emacs just to avoid all these crummy problems, we should try and see if
it works.

Cheers,
Uday

mere user (emacs-user) wrote :

On Sun, Jul 24, 2011 at 7:01 AM, Uday Reddy <email address hidden> wrote:
> mere user writes:
>
>> I then get:
>> vm-imap-check-for-server-spec: vm-stunnel-program must be non-nil to
>> use IMAP over SSL.
>
> Then you are not using the latest version.  Please pull again and
> rebuild.

right, thanks. here it is:

gnutls.c: [0] (Emacs) fatal error: A TLS packet with unexpected length
was received. [2 times]

>> I guess I was looking for a way to see what the detailed exchange
>> between the server and stunnel is in the hope that this will clarify
>> what the problem is with the new stunnel version.  any clues?
>
> Not really.  That is outside my area of expertise.  Since SSL has been put
> into Emacs just to avoid all these crummy problems, we should try and see if
> it works.
>
> Cheers,
> Uday
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/815267
>
> Title:
>  imap error due to stunnel/ gnutls again
>
> Status in VM (View Mail) for Emacs:
>  In Progress
>
> Bug description:
>  Hi Uday, I upgraded mac os x to lion and ran into this problem again:
>
>  Starting IMAP over SSL session Sat Jul 23 18:37:42 2011
>  -- connecting to email.xx:993
>
>  * OK The Microsoft Exchange IMAP4 service is ready.
>  -- connected for movemail
>  VM CAPABILITY
>  Process IMAP over SSL finished
>
>  this time I am unable to downgrade stunnel.  I tried installing it via macports and
>  using the latest tar file.  both lead to the above error.  any suggestions on how
>  I can further debug the issue?
>
>  many thanks...  cheers, E
>
>  p.s. too bad about the group.  trying to post to gmane via the web page,
>        I get an error that the lines are longer than 80 characters or such.  strange...
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/vm/+bug/815267/+subscriptions
>

Uday Reddy (reddyuday) wrote :

mere user writes:

> right, thanks. here it is:
>
> gnutls.c: [0] (Emacs) fatal error: A TLS packet with unexpected length
> was received. [2 times]

Well then that is either a bug in the Emacs implementation or with your
server. In any case, if Emacs crashed, you need to file a bug report for
Emacs.

Please check if it works for gmail. Here is a trace of what I got:

Checking for new mail for d:/Home/udr/mail/imap-cache-4cb0c473b095ccf2de3172b1bdb43fe6...
Opening TLS connection to `imap.gmail.com'...
Opening TLS connection with `gnutls-cli --insecure -p 993 imap.gmail.com'...done
Opening TLS connection to `imap.gmail.com'...done
Logging into the IMAP server...
Updating attributes on the IMAP server... done

Cheers,
Uday

mere user (emacs-user) wrote :

I can get it to work with gmail too. and emacs does not crash. I
suppose it is the server. complicated... I guess I'll just stick to
the old stunnel for now. cheers, E

On Sun, Jul 24, 2011 at 8:23 AM, Uday Reddy <email address hidden> wrote:
> mere user writes:
>
>> right, thanks.  here it is:
>>
>> gnutls.c: [0] (Emacs) fatal error: A TLS packet with unexpected length
>> was received. [2 times]
>
> Well then that is either a bug in the Emacs implementation or with your
> server.  In any case, if Emacs crashed, you need to file a bug report for
> Emacs.
>
> Please check if it works for gmail.  Here is a trace of what I got:
>
> Checking for new mail for d:/Home/udr/mail/imap-cache-4cb0c473b095ccf2de3172b1bdb43fe6...
> Opening TLS connection to `imap.gmail.com'...
> Opening TLS connection with `gnutls-cli --insecure -p 993 imap.gmail.com'...done
> Opening TLS connection to `imap.gmail.com'...done
> Logging into the IMAP server...
> Updating attributes on the IMAP server... done
>
> Cheers,
> Uday
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/815267
>
> Title:
>  imap error due to stunnel/ gnutls again
>
> Status in VM (View Mail) for Emacs:
>  In Progress
>
> Bug description:
>  Hi Uday, I upgraded mac os x to lion and ran into this problem again:
>
>  Starting IMAP over SSL session Sat Jul 23 18:37:42 2011
>  -- connecting to email.xx:993
>
>  * OK The Microsoft Exchange IMAP4 service is ready.
>  -- connected for movemail
>  VM CAPABILITY
>  Process IMAP over SSL finished
>
>  this time I am unable to downgrade stunnel.  I tried installing it via macports and
>  using the latest tar file.  both lead to the above error.  any suggestions on how
>  I can further debug the issue?
>
>  many thanks...  cheers, E
>
>  p.s. too bad about the group.  trying to post to gmane via the web page,
>        I get an error that the lines are longer than 80 characters or such.  strange...
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/vm/+bug/815267/+subscriptions
>

Uday Reddy (reddyuday) on 2011-07-24
Changed in vm:
status: In Progress → Incomplete
milestone: 8.2.0 → 8.2.1
importance: Wishlist → Low

On Sun, Jul 24, 2011 at 12:56 PM, Uday Reddy <email address hidden> wrote:
> ** Changed in: vm
>       Status: In Progress => Incomplete

Uday, do you feel I should pursue this some more? I can make stunnel
work using version 4.33 but not the latest, and I can make the built
in emacs solution work on gmail but not other servers. I am all set
with the old stunnel version, but am happy to submit a report or do
some more checking if you think that's helpful. best, E

Uday Reddy (reddyuday) wrote :

Hi Eli, I don't think we need to worry about the buggy (or at least
unreliable) stunnel version on Mac, but we need to investigate what is going
wrong with the Emacs built-in SSL and file bug reports.

You can do it whenever you feel like it. Or, the Emacs team might fix it on
their own.

Cheers,
Uday

mere user (emacs-user) wrote :

hi Uday, I only wish it wont turn out that this bug report is *again*
due to some mistake I am making... :)

so, as I was trying to prepare a bug report for gnu emacs, I
discovered that if I set vm-stunnel-program to nil, I can read mail
from each of the two servers I am using separately. however, when I
combine them together into vm-spool-files as follows:

vm-spool-files is
(("~/RMAIL" "imap-ssl:email.xx.edu:993:inbox:login:xx:xx" "~/RMAIL-CRASH")
 ("~/RMAIL" "imap-ssl:imap.gmail.com:993:inbox:login:<email address hidden>:xx"
"~/RMAIL-CRASH"))

I get the error message I reported to you. I can also send the imap
log files if needed, let me know. E

On Mon, Jul 25, 2011 at 11:33 AM, Uday Reddy <email address hidden> wrote:
> Hi Eli, I don't think we need to worry about the buggy (or at least
> unreliable) stunnel version on Mac, but we need to investigate what is going
> wrong with the Emacs built-in SSL and file bug reports.
>

Uday Reddy (reddyuday) wrote :

That is very interesting! I have no idea who is at fault here. Please do
send me the IMAP trace buffers. Please make sure that you have
vm-imap-keep-trace-buffer to t, so that the old trace buffers are kept
around.

Notice that you have the xx.edu server listed before the gmail server. We
will need to first know which connection is getting stuck.

Cheers,
Uday

Uday Reddy (reddyuday) wrote :

Ok, I am closing this bug report, because the error message is not fatal, and it is clear that VM itself has been working fine.

Changed in vm:
status: Incomplete → Fix Committed
milestone: 8.2.1 → 8.2.0
Uday Reddy (reddyuday) wrote :

Hi Eli, I just noticed that your problem wasn't fully resolved here, because you said you had a problem with opening IMAP-SSL connections to multiple spool files. We need to look at that sometime. Please feel free to open a new bug report, and include your IMAP trace buffers so that we can file a report to the Emacs folks.

Cheers,
Uday

Changed in vm:
status: Fix Committed → Fix Released
mere user (emacs-user) wrote :

hi Uday, thanks, I think this was completely resolved for me when I
moved to the built in emacs 24 thing as you suggested. so if no one
else complained, perhaps this could just be closed? thanks for
keeping track of these so fantastically. thanks also for adding a
mention of the .authinfo issue to the vm manual. cheers, Eli

On Tue, Dec 27, 2011 at 11:00 PM, Uday Reddy <email address hidden> wrote:
> Hi Eli, I just noticed that your problem wasn't fully resolved here,
> because you said you had a problem with opening IMAP-SSL connections to
> multiple spool files.  We need to look at that sometime.  Please feel
> free to open a new bug report, and include your IMAP trace buffers so
> that we can file a report to the Emacs folks.
>
> Cheers,
> Uday
>
>
> ** Changed in: vm
>       Status: Fix Committed => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/815267
>
> Title:
>  imap error due to stunnel/ gnutls again
>
> Status in VM (View Mail) for Emacs:
>  Fix Released
>
> Bug description:
>  Hi Uday, I upgraded mac os x to lion and ran into this problem again:
>
>  Starting IMAP over SSL session Sat Jul 23 18:37:42 2011
>  -- connecting to email.xx:993
>
>  * OK The Microsoft Exchange IMAP4 service is ready.
>  -- connected for movemail
>  VM CAPABILITY
>  Process IMAP over SSL finished
>
>  this time I am unable to downgrade stunnel.  I tried installing it via macports and
>  using the latest tar file.  both lead to the above error.  any suggestions on how
>  I can further debug the issue?
>
>  many thanks...  cheers, E
>
>  p.s. too bad about the group.  trying to post to gmane via the web page,
>        I get an error that the lines are longer than 80 characters or such.  strange...
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/vm/+bug/815267/+subscriptions

Uday Reddy (reddyuday) on 2012-03-13
tags: added: imap
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers