Re: [VM] VM and davmail issues again.

2018-02-15 Thread John Stoffel
> "CC" == Gian Uberto Lauri  writes:

> "JS" == John Stoffel  writes:
CC> Hello John!

JS> This all looks good, and just like what I get from my dovecot
JS> server.  When you look in the emacs buffer for the imap log, do
JS> you see ^M on the end of the lines, like I do?

CC> Yes they are there. As if Emacs was not expecting a network line
CC> terminator.

Yeah, it's not clear to me what encoding VM is using internally, but I
suspect Uday has it down pretty well honestly.  

JS> Maybe you should back out that patch you applied and see if that
JS> makes things work again.

CC> It was even worse. No reply from server.

Hmm.. that's not a good sign.  I have *zero* ability to hack elish in
any good way, but looking at the code in vm-imap.el where the error is
thrown from might give us some ideas.

(vm-imap-send-command 
 process (format "FETCH %s:%s (UID RFC822.SIZE FLAGS)" first last))
(while need-ok
  (setq response (vm-imap-read-response-and-verify process "FLAGS FETCH"))
  (cond 
   ((vm-imap-response-matches response '* 'atom 'FETCH 'list)
(setq p (cdr (nth 3 response)))
(setq tok (nth 1 response))
(goto-char (nth 1 tok))
(setq msg-num (read imap-buffer))
(while p
  (cond 
   ((vm-imap-response-matches p 'UID 'atom)
(setq tok (nth 1 p))
(setq uid (buffer-substring (nth 1 tok) (nth 2 tok)))
(setq p (nthcdr 2 p)))
   ((vm-imap-response-matches p 'RFC822\.SIZE 'atom)
(setq tok (nth 1 p))
(setq size (buffer-substring (nth 1 tok) (nth 2 tok)))
(setq p (nthcdr 2 p)))
   ((vm-imap-response-matches p  'FLAGS 'list)
(setq pl (cdr (nth 1 p))
  flags nil)
(while pl
  (setq tok (car pl))
  (if (not (vm-imap-response-matches (list tok) 'atom))
  (vm-imap-protocol-error
   "expected atom in FLAGS list in FETCH response"))
  (setq flag (downcase
  (buffer-substring (nth 1 tok) (nth 2 tok)))
flags (cons flag flags)
pl (cdr pl)))
(setq p (nthcdr 2 p)))
   (t
(vm-imap-protocol-error
 "expected UID, RFC822.SIZE and (FLAGS list) in FETCH response"))
   ))
(setq list 
  (cons (cons msg-num (cons uid (cons size flags)))
list)))
   ((vm-imap-response-matches response 'VM 'OK)
(setq need-ok nil
list))


So it's parsing the returned strings, and it's dying because the (t (
vm-imap-protocol-error ... )) stuff, which hurts my brain.  It's
probably not matching something properly.  Maybe the trick would be to
pull out the FLAGS part from the request sent by vm, and see if the
result returned parses properly or not.  Do the same with the
RFC822.SIZE part as well, leaving in flags.  Maybe it's busted or
slightly formatted differently by DAVmail?

Hmm.. on my end I see something like this:

a3 FETCH 510:515 (UID RFC822.SIZE FLAGS)
* 510 FETCH (UID 35104 RFC822.SIZE 12579 FLAGS (\Seen))
* 511 FETCH (UID 35113 RFC822.SIZE 5476 FLAGS (\Seen))
* 512 FETCH (UID 35114 RFC822.SIZE 5481 FLAGS (\Seen))
* 513 FETCH (UID 35115 RFC822.SIZE 8255 FLAGS (\Seen))
* 514 FETCH (UID 35117 RFC822.SIZE 2976 FLAGS (\Recent))
* 515 FETCH (UID 35118 RFC822.SIZE 42224 FLAGS (\Recent))
a3 OK Fetch completed (0.001 + 0.000 secs).

So it must to correctly using the (...) after the FETCH response.
Looking more into DavMAIL, it's a Java based application.  Another
language I don't speak well at all.  Sigh..  *grin*

And the sourceforge site is down too, so I can't even look at the
DAVmail source.  Are you running the latest version of DAVmail as
well?

Sorry I'm kinda useless here...




Re: [VM] VM and davmail issues again.

2018-02-15 Thread Gian Uberto Lauri
> "JS" == John Stoffel  writes:

Hello John!

JS> This all looks good, and just like what I get from my dovecot
JS> server.  When you look in the emacs buffer for the imap log, do
JS> you see ^M on the end of the lines, like I do?

Yes they are there. As if Emacs was not expecting a network line
terminator.

JS> Maybe you should back out that patch you applied and see if that
JS> makes things work again.

It was even worse. No reply from server.

-- 
 /\   ___Ubuntu: ancient
/___/\_|_|\_|__|___Gian Uberto Lauri_   African word
  //--\| | \|  |   Integralista GNUslamicomeaning "I can
\/ coltivatore diretto di software   not install
 già sistemista a tempo (altrui) perso...Debian"

Warning: gnome-config-daemon considered more dangerous than GOTO



Re: [VM] VM and davmail issues again.

2018-02-14 Thread John Stoffel
> "CC" == Gian Uberto Lauri  writes:

> "JS" == John Stoffel  writes:
JS> Well... looking more closely, I see them in the DAVmail logs,
JS> where it returns the lines like this:

JS> RFC822.SIZE 24025 FLAGS (\Seen))
   
JS> Which should be ok, but it's not clear how it's formatted.  I
JS> looked at this page, and it would be great if you could run the
JS> commands by hand to get a better log.

CC> O.K. let's see if I did it right...

CC> VM FETCH 1:8 (UID RFC822.SIZE FLAGS) 
CC> * 1 FETCH (UID 12738 RFC822.SIZE 22679 FLAGS (\Seen))
CC> * 2 FETCH (UID 12739 RFC822.SIZE 22886 FLAGS (\Seen))
CC> * 3 FETCH (UID 12741 RFC822.SIZE 24025 FLAGS (\Seen))
CC> * 4 FETCH (UID 12767 RFC822.SIZE 700610 FLAGS (\Recent))
CC> * 5 FETCH (UID 12768 RFC822.SIZE 276407 FLAGS (\Recent))
CC> * 6 FETCH (UID 12769 RFC822.SIZE 272314 FLAGS (\Recent))
CC> * 7 FETCH (UID 12770 RFC822.SIZE 276559 FLAGS (\Recent))
CC> * 8 FETCH (UID 12771 RFC822.SIZE 33952 FLAGS (\Seen))
CC> VM OK FETCH completed
CC> VM FETCH 1:1 (RFC822.SIZE)
CC> * 1 FETCH (UID 12738 RFC822.SIZE 22679)
CC> VM OK FETCH completed
CC> * BYE Closing connection

CC> As far as I understood from the page you suggested, there is an extra
CC> UID number part.

CC> D you suggest to bash davmail code?

This all looks good, and just like what I get from my dovecot server.
When you look in the emacs buffer for the imap log, do you see ^M on
the end of the lines, like I do?

Maybe you should back out that patch you applied and see if that makes
things work again.

John



Re: [VM] VM and davmail issues again.

2018-02-14 Thread Gian Uberto Lauri
> "JS" == John Stoffel  writes:

JS> Well... looking more closely, I see them in the DAVmail logs,
JS> where it returns the lines like this:

JS>RFC822.SIZE 24025 FLAGS (\Seen))
   
JS> Which should be ok, but it's not clear how it's formatted.  I
JS> looked at this page, and it would be great if you could run the
JS> commands by hand to get a better log.

O.K. let's see if I did it right...

telnet localhost 1143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4REV1 AUTH=LOGIN MOVE] IMAP4rev1 DavMail 4.8.3-2554 server 
ready
VM CAPABILITY
* CAPABILITY IMAP4REV1 AUTH=LOGIN MOVE
VM OK CAPABILITY completed
VM LOGIN smarties/user password
VM NO LOGIN failed
VM LOGIN smarties\\user password
VM OK Authenticated

/* YEEE, I learnt how to spell correctly the username :) */

VM SELECT "inbox"
* 8 EXISTS
* 4 RECENT
* OK [UIDVALIDITY 1]
* OK [UIDNEXT 12772]
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded Junk)
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded Junk 
\*)]
VM OK [READ-WRITE] SELECT completed
VM STATUS SIZE
VM NO folder not found
VM STATUS SIZE inbox
VM NO folder not found
VM STATUS "size"
VM NO folder not found
 VM FETCH 1:8 (UID RFC822.SIZE FLAGS)
 BAD command unrecognized
VM FETCH 1:8 (UID RFC822.SIZE FLAGS) 
* 1 FETCH (UID 12738 RFC822.SIZE 22679 FLAGS (\Seen))
* 2 FETCH (UID 12739 RFC822.SIZE 22886 FLAGS (\Seen))
* 3 FETCH (UID 12741 RFC822.SIZE 24025 FLAGS (\Seen))
* 4 FETCH (UID 12767 RFC822.SIZE 700610 FLAGS (\Recent))
* 5 FETCH (UID 12768 RFC822.SIZE 276407 FLAGS (\Recent))
* 6 FETCH (UID 12769 RFC822.SIZE 272314 FLAGS (\Recent))
* 7 FETCH (UID 12770 RFC822.SIZE 276559 FLAGS (\Recent))
* 8 FETCH (UID 12771 RFC822.SIZE 33952 FLAGS (\Seen))
VM OK FETCH completed
VM FETCH 1:1 (RFC822.SIZE)
* 1 FETCH (UID 12738 RFC822.SIZE 22679)
VM OK FETCH completed
* BYE Closing connection

As far as I understood from the page you suggested, there is an extra
UID number part.

D you suggest to bash davmail code?

-- 
 /\   ___Ubuntu: ancient
/___/\_|_|\_|__|___Gian Uberto Lauri_   African word
  //--\| | \|  |   Integralista GNUslamicomeaning "I can
\/ coltivatore diretto di software   not install
 già sistemista a tempo (altrui) perso...Debian"

Warning: gnome-config-daemon considered more dangerous than GOTO