Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

imap-ssl protocol error on mac os x

53 views
Skip to first unread message

Shaheen

unread,
Aug 24, 2010, 8:02:29 PM8/24/10
to
i'm trying to set up vm mode on emacs to retrieve mail from gmail
using imap-ssl. i've installed stunnel4 through macports and pointed
vm-stunnel-program at it. however, i still get the protocol error
"unexpected char (10)". i've seen reports noting this error happens
due to the use of stunnel3, but i've specifically pointed vm at the
full path of stunnel4. any ideas why this may continue to happen?

~s

Uday Reddy

unread,
Aug 25, 2010, 8:23:45 PM8/25/10
to

If you list buffers, you will find a buffer with a name like *trace of
IMAP...*. See what it says. Mine begins with the lines:

starting IMAP over SSL session Thu Aug 26 01:15:18 2010
connecting to imap.gmail.com:993
connected for fetch

Unfortunately, I have no idea how to debug stunnel connections.

One idea you can try is to set vm-stunnel-program to just "stunnel4" and make
sure that the program is on exec-path. I don't know if it will make a
difference, but it is worth trying.

Cheers,
Uday

edgar-rft

unread,
Aug 30, 2010, 8:27:00 AM8/30/10
to Uday Reddy
Uday Reddy schrieb:

Not sure, but maybe this helps:

Just two weeks ago I had similar problems with VM, imap and stunnel4
on Debian Linux, always the same error: "unexpected char (10)" and
nothing else worked.

It turned out that just installing the Debian stunnel4 package was
not enough, because the Debian package uses stunnel_4.22, a more
than two years old stunnel version, what already seems to be too old.

After I had compiled and installed my own stunnel_4.33 version from:

http://www.stunnel.org/

everything works fine now, no more "unexpected char (10)" errors.

Unfortunately I have no idea what the exact reason was why
stunnel_4.22 didn't work, but maybe you could try to compile
and install stunnel_4.33 on Mac OS X?

- edgar

shaheen

unread,
Sep 16, 2010, 2:21:59 PM9/16/10
to

Uday: the buffer you describe has "SSL context initialized for service
stunnel" and then the next line reads "line 4: Each service section
must define two endpoints". After that, there is a line saying the
process exited. Note that this occurs after the connecting/connected
lines you mention. here's the full text of the buffer. any further
ideas?

starting IMAP over SSL session Thu Sep 16 11:17:29 2010


connecting to imap.gmail.com:993
connected

Reading configuration from file /var/folders/EM/
EM7rsfTqFYS6igFMcMdLEY40Ry6/-Tmp-/vm178081339
Snagged 64 random bytes from /var/folders/EM/
EM7rsfTqFYS6igFMcMdLEY40Ry6/-Tmp-/vm072997043
RAND_status claims sufficient entropy for the PRNG
PRNG seeded successfully
SSL context initialized for service stunnel
line 4: Each service section must define two endpoints

Process IMAP over SSL exited abnormally with code 1

Uday Reddy

unread,
Sep 16, 2010, 4:18:20 PM9/16/10
to
shaheen wrote:

> Uday: the buffer you describe has "SSL context initialized for service
> stunnel" and then the next line reads "line 4: Each service section
> must define two endpoints". After that, there is a line saying the
> process exited. Note that this occurs after the connecting/connected
> lines you mention. here's the full text of the buffer. any further
> ideas?
>
> starting IMAP over SSL session Thu Sep 16 11:17:29 2010
> connecting to imap.gmail.com:993
> connected
> Reading configuration from file /var/folders/EM/
> EM7rsfTqFYS6igFMcMdLEY40Ry6/-Tmp-/vm178081339
> Snagged 64 random bytes from /var/folders/EM/
> EM7rsfTqFYS6igFMcMdLEY40Ry6/-Tmp-/vm072997043
> RAND_status claims sufficient entropy for the PRNG
> PRNG seeded successfully
> SSL context initialized for service stunnel
> line 4: Each service section must define two endpoints
>
> Process IMAP over SSL exited abnormally with code 1

Sorry, I should have included the next line in my earlier message. It
should should be of the form:

* OK Gimap ready for requests from ....^M

This is the first line of response that VM looks for in talking to an
IMAP server. Your connection terminated before reaching that stage.
Like Edgar, I suspect that your stunnel program wasn't up to the task.
You might try and upgrade to the latest stunnel version.

Google search for "stunnel gmail" brought up this page

http://wiredbytes.com/node/8

which might be helpful.

Cheers,
Uday

Abhi

unread,
May 8, 2011, 8:39:28 PM5/8/11
to
Edgar was right this is a problem with the recent stunnel. I had to revert to the version 4.33 as he pointed out to have it work.

-Abhi

0 new messages