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

[VM] Setting up VM for the first time - imap to read on the server

49 views
Skip to first unread message

James Freer

unread,
Aug 6, 2012, 5:09:12 PM8/6/12
to vm
I'm hoping i've made the right choice of the available email clients
Gnus, VM, WL, MH-E to read email on the server. I basically want to
use the simplest and fastest app which from what i've read is VM. Gnus
seems really good but rather too configurable for my taste. I
currently use Alpine but having now started to use emacs for editing
it seems appropriate to make the change. Basically i want to use a
mail client that frees me from the Gmail adverts and allows fullscreen
view of emails. Ideally i would like conversation threads but i think
i'll need to download headers for that.

What i don't understand is the stunnel i think?

I get this when i've entered the password
IMAP protocol error: "unexpected char (10)"

At present i've chosen to keep the VM in the .emacs until i've had a
bit more experience of emacs and have configured everything as i want
it. I've borrowed a .vm file from a blog but still can't get it to
work.

I'd be very grateful if someone could put me write - i've done a lot
of reading but got confused somewhere.

thanks
james

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Notes for VM setup to read Gmail via IMAP on the server ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; What to install
;;; sudo apt-get vm stunnel4 emacs-w3m
;;; Notes: stunnel4 (to allow tls within ssl)
;;; emacs-w3m (browser for the irritating html!)
;;; Using .emacs initially so set vm init file to nil
(setq vm-init-file nil)

;;(add-to-list 'load-path "~/Dropbox/vm/lisp")
(require 'vm-autoloads)

(setq mail-user-agent 'vm-user-agent)

(setq vm-folder-directory "~/Mail")
(setq vm-primary-inbox "~/Mail/vminbox")
(setq vm-crash-box "~/Mail/inbox.crash.mbox")

(setq vm-imap-expunge-after-retrieving nil)

(setq vm-mutable-frames nil)
(setq vm-imap-account-alist
'(("imap-ssl:imap.gmail.com:993:*:login:jesseja...@gmail.com:*")))

(setq vm-primary-inbox
"imap-ssl:imap.gmail.com:993:*:login:jesseja...@gmail.com:*")

;; (setq vm-debug t) not required
;; (setq vm-keep-imap-buffers t) incorrect
;; (setq vm-imap-log-sessions t) not required

(setq vm-use-menus 1)
(setq vm-stunnel-program "stunnel")

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

(setq mail-default-headers "From: James Freer <jesseja...@gmail.com>\n")


(setq vm-mime-type-converter-alist
'(("text/html" "text/plain" "elinks -dump /dev/stdin")
("message/delivery-status" "text/plain")
("application/zip" "text/plain" "listzip")
("application/x-zip-compressed" "text/plain" "zipinfo /dev/stdin")
("application/x-www-form-urlencoded" "text/plain")
("message/disposition-notification" "text/plain")
("application/mac-binhex40" "application/octet-stream" "hexbin -s")))

;;(define-key vm-mode-map "#" 'vm-imap-synchronize) incorrect

Uday Reddy

unread,
Aug 9, 2012, 9:02:07 AM8/9/12
to James Freer, vm
Dear James, Welcome to VM. I think you will enjoy VM once you get it
going. At the moment, your problem seems to be that you don't have a
working version of stunnel.

> What i don't understand is the stunnel i think?
>
> I get this when i've entered the password
> IMAP protocol error: "unexpected char (10)"

Since you haven't mentioned which operating system, and which version of
stunnel you are using, we can't offer any specific advice. Please give us
that information first.

There has been plenty of discussion of stunnel problems both on the VM
newsgroup archives (which you can find on Google Groups).

https://groups.google.com/forum/?fromgroups#!forum/gnu.emacs.vm.info

Here is a thread on VM Launchpad site which might help getting some insight
into the problems.

https://answers.launchpad.net/vm/+question/108267

Cheers,
Uday

James Freer

unread,
Aug 9, 2012, 5:05:15 PM8/9/12
to Uday Reddy, vm
Many thanks i really appreciate your reply. I should have put the OS
etc. I'm currently just about to upgrade and just wanted to have a
look at VM before i do a new release install on my new PC. I do wonder
if the emacs email clients are rather too complicated for me. i chose
VM as i thought it was easier to set up than Gnus, WL, MH-E.

OS xubuntu 10.04, emacs 23.1, VM 8.0.13-1, stunnel4 3:4.29-1

I'm looking through those links you gave me.

james

Uday Reddy

unread,
Aug 10, 2012, 3:54:42 AM8/10/12
to James Freer, vm
James Freer writes:

> Many thanks i really appreciate your reply. I should have put the OS
> etc. I'm currently just about to upgrade and just wanted to have a
> look at VM before i do a new release install on my new PC. I do wonder
> if the emacs email clients are rather too complicated for me. i chose
> VM as i thought it was easier to set up than Gnus, WL, MH-E.
>
> OS xubuntu 10.04, emacs 23.1, VM 8.0.13-1, stunnel4 3:4.29-1
>
> I'm looking through those links you gave me.

Unfortunately, any Emacs mail client you use, you are going to be dealing
with 3 layers of software: the mail client, Emacs and OS utilities. All of
them would also require you to have some profiency in using Emacs.

At the moment, however, you have trouble getting stunnel to work. There
have been problems with some versions of stunnel, which have been reported
on the web.

https://bugs.launchpad.net/ubuntu/+source/vm/+bug/321438

http://www.stunnel.org/pipermail/stunnel-users/2011-November/003379.html

I don't know the exact status of the current situation. But it should be
the job of your Linux distribution to sort out those problems.

Cheers,
Uday

James Freer

unread,
Aug 10, 2012, 3:48:58 PM8/10/12
to Uday Reddy, vm
Once again thanks for your help. the best way forward is for me to
start using the emacs 24 and get my new PC up and running. It seems to
have set up the mailboxes which is not quite what i was expecting.

I think i'm right in saying that with emacs 24 VM is already setup. So
far i've found emacs a nice app but considerable research is required.
The 3 parts of an email client i found quite easy to set up for mutt
to see if i liked it.

james

Uday Reddy

unread,
Aug 11, 2012, 8:08:41 PM8/11/12
to James Freer, vm
James Freer writes:

> I think i'm right in saying that with emacs 24 VM is already setup. So
> far i've found emacs a nice app but considerable research is required.

Emacs 24 has secure sockets built in. So, you don't need stunnel for it.

However, VM is not part of the Emacs distribution. You will still need to
install it separately. I also remembered that you were trying to use VM
8.0.13, which is quite old. You can download the latest version of VM from
the Launchpad web site:

http://launchpad.net/vm

Cheers,
Uday

James Freer

unread,
Aug 12, 2012, 4:39:52 PM8/12/12
to Uday Reddy, vm
Many thanks... i'm doing a new install this week so i'm looking forward to
trying VM.

james

Peter Davis

unread,
Sep 18, 2012, 3:39:09 PM9/18/12
to Uday Reddy, vm
I'm trying to do something similar to what James is doing, but I've had no success. I've got emacs 24.2.1 running on OS X 10.7, and I installed VM-8.2.0b. I can run VM, but I can't access my IMAP server, which is from Fastmail.fm. I've got the basic setup shown below. VM tells me I need a password, but doesn't prompt me for one. Putting the passwords in the .vm file doesn't help either.

My .vm is basically:


(setq vm-imap-account-alist
'(
("imap-ssl:mail.messagingengine.com:993:*:login:user...@fastmail.fm:*" "fm")
)
)
(setq vm-primary-inbox
"imap-ssl:mail.messagingengine.com:993:inbox:login:user...@fastmail.fm:*")

I get a message like:

Need password for fm:inbox for general operation

but no prompt.

Patrick P Murphy

unread,
Sep 18, 2012, 3:52:42 PM9/18/12
to viewma...@nongnu.org
On Tue, 18 Sep 2012 12:39:09 -0700 (PDT), Peter Davis <pfd...@gmail.com> said:

> I'm trying to do something similar to what James is doing, but I've
> had no success...

> I get a message like:

> Need password for fm:inbox for general operation

> but no prompt.

What happens if you press "g" or M-x vm-get-new-mail? For me I get a
password prompt at that point (though my setup is more complex, I use
vm-spool-files with the spool name set to "imap-ssl:...").

- Pat

--
Patrick P. Murphy, Ph.D. Webmaster (East), Computing Security Manager
http://www.nrao.edu/~pmurphy/ http://chien-noir.com/maze.shtml

All your sanity and wit, they will all vanish, I promise;
It's just a matter of time.
-- Gogol Bordello

Peter Davis

unread,
Sep 18, 2012, 4:03:51 PM9/18/12
to viewma...@nongnu.org
On Tuesday, 18 September 2012 15:53:18 UTC-4, Patrick P Murphy wrote:
> On Tue, 18 Sep 2012 12:39:09 -0700 (PDT), Peter Davis <pfd...@gmail.com> said:
>
>
>
> > I'm trying to do something similar to what James is doing, but I've
>
> > had no success...
>
>
>
> > I get a message like:
>
>
>
> > Need password for fm:inbox for general operation
>
>
>
> > but no prompt.
>
>
>
> What happens if you press "g" or M-x vm-get-new-mail? For me I get a
>
> password prompt at that point (though my setup is more complex, I use
>
> vm-spool-files with the spool name set to "imap-ssl:...").
>

Ah! Then I do get prompted for a password. Unfortunately, the fetch then fails with

Searching for program: No such file or directory, stunnel

I thought stunnel was no longer needed in emacs 24.

Thanks!

Patrick P Murphy

unread,
Sep 18, 2012, 4:08:36 PM9/18/12
to viewma...@nongnu.org
On Tue, 18 Sep 2012 13:03:51 -0700 (PDT), Peter Davis <pfd...@gmail.com> said:

> Ah! Then I do get prompted for a password. Unfortunately, the fetch
> then fails with

> Searching for program: No such file or directory, stunnel

> I thought stunnel was no longer needed in emacs 24.

I think vm still needs it (Uday may say otherwise...). Try installing
stunnel if you can and you should be in business; I was once I did.

Peter Davis

unread,
Sep 18, 2012, 4:17:52 PM9/18/12
to Patrick P Murphy, viewma...@nongnu.org
On Tue, Sep 18, 2012 at 04:08:36PM -0400, Patrick P Murphy wrote:
> On Tue, 18 Sep 2012 13:03:51 -0700 (PDT), Peter Davis <pfd...@gmail.com> said:
>
> > Ah! Then I do get prompted for a password. Unfortunately, the fetch
> > then fails with
>
> > Searching for program: No such file or directory, stunnel
>
> > I thought stunnel was no longer needed in emacs 24.
>
> I think vm still needs it (Uday may say otherwise...). Try installing
> stunnel if you can and you should be in business; I was once I did.
>

Excellent! Yes, that did it.

(Excuse my sending this from mutt. I haven't re-acquainted myself with
VM enough yet to actually use it. I'm hoping to use it instead of mutt,
Wanderlust, etc. to manage IMAP mail while keeping it all on the server.)

Thanks!!

-pd


--
--------
Peter Davis
The Tech Curmudgeon - http://www.techcurmudgeon.com

Peter Davis

unread,
Sep 18, 2012, 3:39:09 PM9/18/12
to gnu.emac...@googlegroups.com, vm
I'm trying to do something similar to what James is doing, but I've had no success. I've got emacs 24.2.1 running on OS X 10.7, and I installed VM-8.2.0b. I can run VM, but I can't access my IMAP server, which is from Fastmail.fm. I've got the basic setup shown below. VM tells me I need a password, but doesn't prompt me for one. Putting the passwords in the .vm file doesn't help either.

My .vm is basically:


(setq vm-imap-account-alist
'(
("imap-ssl:mail.messagingengine.com:993:*:login:user...@fastmail.fm:*" "fm")
)
)
(setq vm-primary-inbox
"imap-ssl:mail.messagingengine.com:993:inbox:login:user...@fastmail.fm:*")

Peter Davis

unread,
Sep 18, 2012, 4:03:51 PM9/18/12
to gnu.emac...@googlegroups.com, viewma...@nongnu.org
On Tuesday, 18 September 2012 15:53:18 UTC-4, Patrick P Murphy wrote:
> On Tue, 18 Sep 2012 12:39:09 -0700 (PDT), Peter Davis <pfd...@gmail.com> said:
>
>
>
> > I'm trying to do something similar to what James is doing, but I've
>
> > had no success...
>
>
>
> > I get a message like:
>
>
>
> > Need password for fm:inbox for general operation
>
>
>
> > but no prompt.
>
>
>
> What happens if you press "g" or M-x vm-get-new-mail? For me I get a
>
> password prompt at that point (though my setup is more complex, I use
>
> vm-spool-files with the spool name set to "imap-ssl:...").
>

Ah! Then I do get prompted for a password. Unfortunately, the fetch then fails with

Searching for program: No such file or directory, stunnel

I thought stunnel was no longer needed in emacs 24.

Thanks!

Uday Reddy

unread,
Sep 18, 2012, 5:36:05 PM9/18/12
to Peter Davis, viewma...@nongnu.org
Peter Davis writes:

> Ah! Then I do get prompted for a password. Unfortunately, the fetch then fails with
>
> Searching for program: No such file or directory, stunnel
>
> I thought stunnel was no longer needed in emacs 24.

It isn't needed. But the VM default for the variable `vm-stunnel-program'
is "stunnel". So, it is looking for the stunnel program. To avoid stunnel
entirely, you should set `vm-stunnel-program' to nil. Then VM will fire up
the Emacs 24 SSL functionality.

Cheers,
Uday




Uday Reddy

unread,
Sep 19, 2012, 12:49:52 AM9/19/12
to Peter Davis, vm
Peter Davis writes:

> I get a message like:
>
> Need password for fm:inbox for general operation
>
> but no prompt.

I know the message is confusing and I have gotten it once or twice myself.

But there are a bunch of subtle things going on here. When VM starts up, it
tries to auto-get new mail. Then it realizes that it doesn't have a
password and gives up. It doesn't ask for a password at this stage because
auto-get is an automatic operation and it isn't supposed to be interactive.
When you do `g' for a manual get-new-mail, then it asks for a password.

(In that case, you might wonder, why doesn't auto-get silently fail, instead
of giving a confusing message? Well, if you are a habitual user of VM, you
would expect that VM will automatically get new mail on startup. But, if it
fails silently, you would tend to assume that there was no new mail.)

I probably didn't get the balance of decisions right yet, but that is how
things stand at present.

Cheers,
Uday



Stefan Monnier

unread,
Sep 20, 2012, 5:35:56 PM9/20/12
to viewma...@nongnu.org
> It isn't needed. But the VM default for the variable `vm-stunnel-program'
> is "stunnel". So, it is looking for the stunnel program. To avoid stunnel
> entirely, you should set `vm-stunnel-program' to nil. Then VM will fire up
> the Emacs 24 SSL functionality.

The following chunk would do that automatically.


Stefan


@@ -675,8 +675,7 @@
--
file))

-(defcustom vm-stunnel-program "stunnel"
+(defcustom vm-stunnel-program
+ (if (and (fboundp 'gnutls-available-p) (gnutls-available-p))
+ nil
+ "stunnel")
"*Name of program to use to run stunnel.
This is used to make SSL connections to POP and IMAP servers that
support SSL. If this is set to nil, VM will attempt to use the


0 new messages