Discussion:
[VM] vm-visit-imap-folder problem in 8.2.0b
John Stoffel
2013-02-04 14:27:01 UTC
Permalink
Uday,

I've been starting to use IMAP for my mail now, though I haven't
updated my vm-spool-files setup yet to use IMAP as my main INBOX.
Haven't quite decided how I want that to work.

So now when I startup VM and do 'vm-visit-imap-folder' it doesn't ask
me for my password, while 'vm-list-imap-folders' does. So in a new
emacs/vm session, I have to first list the folders, then I can visit
my imap folder.

I have the following in my vm-imap-account-alist, which I think is
what I need. Am I missing something?

(setq vm-imap-expunge-after-retrieving nil)
(setq vm-imap-account-alist
'(
("imap-ssl:exmail1:993:*:login:stoffj:*" "exmail1")
)
)

This is all on CentOS 6.2, GNU Emacs 23.1.1, vm 8.2.0b. I cheerfully
admit I've been carrying forward most of the same .vm and .emacs
settings for years and years, only fixing things when they break, so
it could be that I'm doing something wrong somewhere.

I do have (require 'vm-autoloads) in my .emacs, though 8.2.0b still
has the bug where it doesn't load vm-reply properly. Can you *please*
release 8.2.0c with that fix?

Thanks for all your hard work, I really do appreciate it alot!
John
Uday Reddy
2013-02-04 15:19:24 UTC
Permalink
Post by John Stoffel
So now when I startup VM and do 'vm-visit-imap-folder' it doesn't ask
me for my password, while 'vm-list-imap-folders' does. So in a new
emacs/vm session, I have to first list the folders, then I can visit
my imap folder.
You probably need to hit `g' (vm-get-new-mail) for VM to access the server.

Please check the *Messages* buffer to see if there were any errors.

(I recall I had some issues with defining what constitutes an "interactive"
use. I have straightened them out now in the trunk.)

Cheers,
Uday
John Stoffel
2013-02-04 17:37:45 UTC
Permalink
Post by John Stoffel
So now when I startup VM and do 'vm-visit-imap-folder' it doesn't ask
me for my password, while 'vm-list-imap-folders' does. So in a new
emacs/vm session, I have to first list the folders, then I can visit
my imap folder.
Uday> You probably need to hit `g' (vm-get-new-mail) for VM to access the server.

That works once I'm in the folder and have successfully
authenticated. But if I start up, and do NOT have my imap folder
accessed at all, then doing M-x vm-visit-imap-folder doesn't ask for my
password at all. I have to do M-x vm-list-imap-folders, then it asks
me interactively.

Uday> Please check the *Messages* buffer to see if there were any errors.

Will do. I'll do a fresh start:

- fired up emacs.
- C-x C-m to start vm, goes into my old INBOX which is still my
default.
- M-x vm-visit-imap-folder
- it asks "Visit IMAP folder:" in the minibuffer.
- hitting the tab key builds a completion list, but never shows me
anything.
- hmm, typing 'ex<tab>' doesthen complete and now asks for my
password. Curious...
- but I enter my password, and it comes back with:
"Visit IMAP folder: exmail1:"
- hitting tab doesn't get me anywhere, nor does typing 'in<tab>'.
I have to enter the full name of 'inbox' to get my mail.
Funky. Nothing in the *Messages* buffer either.

So maybe I'm just smoking something good here, or just missing the
obvious. It would be nice it autocompletion could hook into the
vm-list-imap-folders when you have logged in.

Ah, now I have an issue to report. If you do 'M-x
vm-visit-imap-folder' and type just 'exmail1<return>' it will come
back with:

IMAP folder required in the format account-name:folder-name

but then it just dies, it doesn't let you keep going, you have to do
M-x vm-visit-imap-folder all over again. This would be something to
improve if possible. Esp since all you have to do is enter
'exmail1:<tab>' and it asks for a password. Hitting
'exmail1:<return>' gets the above error message again. It would
certainly be nicer to be more interactive if possible.

Now, when I do:
M-x vm-visit-imap-folder
exmail1:in<tab>

It asks me for my IMAP password, which I enter and hit return. Then I
get a warning "Symbol's Function definition is void: symbol-prefix-p"
that flashes up for a second and I'm put back into the mini-buffer to
enter the folder name. If I hit <tab> it says "Making completion
list..." but never seems to connect to the server and get the list of
folders.

Does this help?


Uday> (I recall I had some issues with defining what constitutes an
Uday> "interactive" use. I have straightened them out now in the
Uday> trunk.)

Make a release, please?

Thanks,
John
Uday Reddy
2013-02-05 14:17:03 UTC
Permalink
Post by John Stoffel
That works once I'm in the folder and have successfully
authenticated. But if I start up, and do NOT have my imap folder
accessed at all, then doing M-x vm-visit-imap-folder doesn't ask for my
password at all. I have to do M-x vm-list-imap-folders, then it asks
me interactively.
Oh, I didn't realize that you were expecting it to ask for a password
*before* you have even specified an IMAP folder. It won't. You will need
to specify which IMAP folder you are trying to access so that it knows what
password to ask.

And, the IMAP folder has to be specifed in the format account:mailbox.

If you are just trying to get to your default INBOX, then please set
vm-primary-inbox. Then M-x vm is all that you need to type in.

Cheers,
Uday
John Stoffel
2013-04-02 16:33:14 UTC
Permalink
Hi Uday,

I'm still using vm-visit-imap-folder from 8.2.0b inside 23.1.1 on
x86_64 CentOS to read my eamil from Microsoft Exchange (probably 2010,
not sure). But right now I occasionally run into problems where I
can't seem to get new email. Looking the saved trace log I see:

Starting IMAP session Tue Apr 2 12:21:44 2013
-- connecting to exmail1.taec.toshiba.com:143
* OK The Microsoft Exchange IMAP4 service is ready.
-- connected for general operation
VM CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS
UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+
VM OK CAPABILITY completed.
VM LOGIN <parameters omitted>
VM OK LOGIN completed.
VM SELECT "inbox"
* 543 EXISTS
* 0 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft
$MDNSent)] Permanent flags
* OK [UNSEEN 437] Is the first unseen message
* OK [UIDVALIDITY 5840] UIDVALIDITY value
* OK [UIDNEXT 45167] The next unique identifier value
VM OK [READ-WRITE] SELECT completed.
VM FETCH 1:543 (UID RFC822.SIZE FLAGS)
* 1 FETCH (UID 782 RFC822.SIZE 1705 FLAGS (\Seen))
.
.
.
* 542 FETCH (UID 45161 RFC822.SIZE 11435 FLAGS ())
* 543 FETCH (UID 45164 RFC822.SIZE 93423 FLAGS ())
VM OK FETCH completed.
VM STORE 460 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 477 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 478 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 490 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 494 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 503 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 504 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 505 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 506 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
VM STORE 507 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11

Process IMAP connection broken by remote peer


Is there anything I can do here to debug this? Do I need to login to
my exchange directly and then delete the emails it's complaining about
here?

Thanks,
John

P.S. Yes, I know I should be using this all in my vm-spool-files, but
I haven't made the switch yet.
John Stoffel
2013-04-02 16:40:06 UTC
Permalink
John> I'm still using vm-visit-imap-folder from 8.2.0b inside 23.1.1 on
John> x86_64 CentOS to read my eamil from Microsoft Exchange (probably 2010,
John> not sure). But right now I occasionally run into problems where I
John> can't seem to get new email. Looking the saved trace log I see:

I hate to follow up so quickly, but I managed to do
'vm-imap-synchronize' which completed though it had 12 errors. This
then let me get the new emails.

It would be great if we could get the general code base more robust to
imap handling, or at least more in tune with each other.

Do you have any plans to cut a new release of VM someday? Please?
Pretty please? Even if it's just 8.2.0c that would be a help.

John
John Stoffel
2013-04-02 16:52:34 UTC
Permalink
John> I'm still using vm-visit-imap-folder from 8.2.0b inside 23.1.1 on
John> x86_64 CentOS to read my eamil from Microsoft Exchange (probably 2010,
John> not sure). But right now I occasionally run into problems where I
John> can't seem to get new email. Looking the saved trace log I see:

John> I hate to follow up so quickly, but I managed to do
John> 'vm-imap-synchronize' which completed though it had 12 errors. This
John> then let me get the new emails.

John> It would be great if we could get the general code base more robust to
John> imap handling, or at least more in tune with each other.

John> Do you have any plans to cut a new release of VM someday? Please?
John> Pretty please? Even if it's just 8.2.0c that would be a help.

A little bit more information. The problem seems to be that when I
save a message locally, not on the imap server, so that the status is
'read filed' then it has tons of problems because that status flag
doesn't work on the imap server, since I don't have any folders out
there I use.

Does this help narrow down where the problem could be?

Thanks,
John
Uday S Reddy
2013-04-02 17:22:25 UTC
Permalink
Yeah, VM seems to be ignoring the fact that this IMAP server can't store
custom flags. I will fix it, soon I hope.

By the way, vm-visit-imap-folder is the right thing to use. No need to
switch to spool files.

Cheers,
Uday
Post by John Stoffel
VM STORE 460 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
John Stoffel
2013-04-02 18:02:37 UTC
Permalink
Thanks for the quick reply, I really appreciate all you've done
supporting and extending VM for all these years. I wish I was a
better elisp hacker, but I'm hopeless. I'd be better in Perl or PHP
or even C for that matter.

Uday> Yeah, VM seems to be ignoring the fact that this IMAP server
Uday> can't store custom flags. I will fix it, soon I hope.

If you can point me at the code, maybe I could try to poke at it a
little bit, or at least get some ideas. And of course I'm happy to
run tests if you have any patches for me to try.

Uday> By the way, vm-visit-imap-folder is the right thing to use. No need to
Uday> switch to spool files.

Uday> Cheers,
Uday> Uday
Post by John Stoffel
VM STORE 460 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
Uday S Reddy
2013-04-03 17:39:42 UTC
Permalink
Post by John Stoffel
I'm still using vm-visit-imap-folder from 8.2.0b inside 23.1.1 on
x86_64 CentOS to read my eamil from Microsoft Exchange (probably 2010,
not sure). But right now I occasionally run into problems where I
VM STORE 460 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
The IMAP standard (RFC 3501) says:

59) It is not an error for the client to store a flag that is not in
the PERMANENTFLAGS list; however, the server will either ignore the
change or make the change in the session only.

So, unfortunately, your Exchange server is not adhering to the standard.
Please do complain to whoever is running your Exchange server.

All that I can do is to make VM resilient so that it carries on regardless
of the error messages. So, what happens after these error messages arise?
Does VM break in some way?

Cheers,
Uday
John Stoffel
2013-04-03 19:00:48 UTC
Permalink
Post by John Stoffel
I'm still using vm-visit-imap-folder from 8.2.0b inside 23.1.1 on
x86_64 CentOS to read my eamil from Microsoft Exchange (probably 2010,
not sure). But right now I occasionally run into problems where I
VM STORE 460 +FLAGS.SILENT (filed)
VM BAD Command Argument Error. 11
Uday> The IMAP standard (RFC 3501) says:

Uday> 59) It is not an error for the client to store a flag that is not in
Uday> the PERMANENTFLAGS list; however, the server will either ignore the
Uday> change or make the change in the session only.

Uday> So, unfortunately, your Exchange server is not adhering to the
Uday> standard. Please do complain to whoever is running your
Uday> Exchange server.

Sounds like it's an Exchange problem then. Oh well... time to bitch
at MS for not supporting this properly.

Uday> All that I can do is to make VM resilient so that it carries on
Uday> regardless of the error messages. So, what happens after these
Uday> error messages arise? Does VM break in some way?

Yeah, it breaks because I can't sync up and save my email buffer
properly without running 'vm-imap-synchronize' to get it to push my
local changes back up to the Exchange server.

All I get when I telnet to the IMAP port is:

OK The Microsoft Exchange IMAP4 service is ready.

But I do know we're running on Windows Server 2008R2, and when I ask
for capabilities I get:

a8 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS
UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+

Please let me know if there's other info I can get you.

John
John Stoffel
2013-04-03 19:28:36 UTC
Permalink
Once I logged out, I got:

* BYE Microsoft Exchange Server 2010 IMAP4 server signing off.

so it's a possible issue with MS Exchange 2010. I wonder if maybe you
force it to use IMAP4v1 if that would make a difference?
Uday S Reddy
2013-04-03 20:06:05 UTC
Permalink
Post by Uday S Reddy
All that I can do is to make VM resilient so that it carries on regardless
of the error messages. So, what happens after these error messages arise?
Does VM break in some way?
Mind you that I can't reproduce this behaviour because I don't have an IMAP
server that behaves this way. So, you need to tell me exactly what commands
you are issuing to VM, and what behaviour you are getting, including what is
getting printed in the *Messages* buffer.

Cheers,
Uday
John Stoffel
2013-04-03 20:35:47 UTC
Permalink
Post by Uday S Reddy
All that I can do is to make VM resilient so that it carries on regardless
of the error messages. So, what happens after these error messages arise?
Does VM break in some way?
Uday> Mind you that I can't reproduce this behaviour because I don't
Uday> have an IMAP server that behaves this way. So, you need to tell
Uday> me exactly what commands you are issuing to VM, and what
Uday> behaviour you are getting, including what is getting printed in
Uday> the *Messages* buffer.

I'll try to do so. I've been working to see if I can reproduce this
at will, but I'm not sure I've found the proper pattern of commands.

I have noticed that external emails to Exchange (from outside $WORK)
tend to cause problems at points. Esp if I've filed them, then
deleted them. But internal emails don't seem to show this issue.

I'll keep poking at this and do what I can to get a reproduceable test
case.

John

Loading...