Gnus development mailing list
 help / color / mirror / Atom feed
* IMAP error when posting
@ 2002-10-01  8:12 Kai Großjohann
  2002-10-01 12:42 ` Simon Josefsson
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2002-10-01  8:12 UTC (permalink / raw)


I switched to another machine, also running CVS Gnus, and I get this
when I want to post a message to an nnimap group:

/----
| 804 APPEND "INBOX.misc" {506}
| 804 BAD Invalid literal in Append command
\----

What's the story?

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01  8:12 IMAP error when posting Kai Großjohann
@ 2002-10-01 12:42 ` Simon Josefsson
  2002-10-01 14:07   ` Kai Großjohann
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Josefsson @ 2002-10-01 12:42 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> I switched to another machine, also running CVS Gnus, and I get this
> when I want to post a message to an nnimap group:
>
> /----
> | 804 APPEND "INBOX.misc" {506}
> | 804 BAD Invalid literal in Append command
> \----
>
> What's the story?

Which server is this?  The RFC says:

   Arguments:  mailbox name
               OPTIONAL flag parenthesized list
               OPTIONAL date/time string
               message literal

But maybe the server really wants the optional parameters anyway.
Could you try this patch and see if it works? (Line numbers probably
doesn't match.)

--- imap.el.~6.41~	2002-09-26 23:33:43.000000000 +0200
+++ imap.el	2002-10-01 14:41:19.000000000 +0200
@@ -1604,7 +1643,7 @@
       (and (let ((imap-current-target-mailbox mailbox))
 	     (imap-ok-p
 	      (imap-send-command-wait
-	       (list "APPEND \"" mailbox "\" "  article))))
+	       (list "APPEND \"" mailbox "\" () \"10-10-2000 10:10:10 +10\" "  article))))
 	   (imap-message-appenduid-1 mailbox)))))
 
 (defun imap-body-lines (body)




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 12:42 ` Simon Josefsson
@ 2002-10-01 14:07   ` Kai Großjohann
  2002-10-01 14:28     ` Kai Großjohann
  2002-10-01 14:57     ` Simon Josefsson
  0 siblings, 2 replies; 13+ messages in thread
From: Kai Großjohann @ 2002-10-01 14:07 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> But maybe the server really wants the optional parameters anyway.
> Could you try this patch and see if it works? (Line numbers probably
> doesn't match.)

This changes the error message to "Invalid date-time in APPEND
command".  I also tried to write 10-Oct-2000 instead of 10-10-2000,
and I tried the result of message-make-date.  Same result.

If I keep the "()" and remove the date altogether, then I get
"Invalid literal in APPEND command", again.

I'm talking to a Cyrus 1.6.22 server.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 14:07   ` Kai Großjohann
@ 2002-10-01 14:28     ` Kai Großjohann
  2002-10-01 15:10       ` Simon Josefsson
  2002-10-01 14:57     ` Simon Josefsson
  1 sibling, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2002-10-01 14:28 UTC (permalink / raw)


I found something fishy: in imap-message-append, it calls
imap-send-command-wait with a list as the first arg.  The last
element of the list is article, which is a buffer.  But
imap-send-command-wait appears to take an optional second arg, a
buffer.

Alas, moving the parentheses around so that article is passed as
second arg to imap-send-command-wait doesn't help.  Then I get the
error that the current buffer " *message temp*" does not have a
process.

I'm totally fishing in the dark here.  But maybe it has something to
do with the fact that Emacs crashes from time to time.  Hm.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 14:07   ` Kai Großjohann
  2002-10-01 14:28     ` Kai Großjohann
@ 2002-10-01 14:57     ` Simon Josefsson
  2002-10-01 15:02       ` Kai Großjohann
  2002-10-01 15:07       ` Kai Großjohann
  1 sibling, 2 replies; 13+ messages in thread
From: Simon Josefsson @ 2002-10-01 14:57 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> But maybe the server really wants the optional parameters anyway.
>> Could you try this patch and see if it works? (Line numbers probably
>> doesn't match.)
>
> This changes the error message to "Invalid date-time in APPEND
> command".  I also tried to write 10-Oct-2000 instead of 10-10-2000,
> and I tried the result of message-make-date.  Same result.
>
> If I keep the "()" and remove the date altogether, then I get
> "Invalid literal in APPEND command", again.
>
> I'm talking to a Cyrus 1.6.22 server.

Maybe CRLF trouble?  The command looked OK to me.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 14:57     ` Simon Josefsson
@ 2002-10-01 15:02       ` Kai Großjohann
  2002-10-01 15:07       ` Kai Großjohann
  1 sibling, 0 replies; 13+ messages in thread
From: Kai Großjohann @ 2002-10-01 15:02 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Maybe CRLF trouble?  The command looked OK to me.

Ah!  There was a ^M at the end of the command.  So that's probably
it.  So what can I do about the CRLF trouble?

Let me try to set imap-client-eol to a sane value (it's "^M\n" now,
with separate \ and n characters).

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 14:57     ` Simon Josefsson
  2002-10-01 15:02       ` Kai Großjohann
@ 2002-10-01 15:07       ` Kai Großjohann
  2002-10-01 15:37         ` Kai Großjohann
  1 sibling, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2002-10-01 15:07 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Maybe CRLF trouble?  The command looked OK to me.

Bingo.  I think that's it.  The other thing that's changed is the
following.  Previously, I was connecting to the server directly, now
I use a shell command:

nnimap-stream is shell, and 

(setq imap-shell-program
      '("ssh -e none grossjoh@austin.cs.uni-dortmund.de netcat %s 143"))

Maybe it is better to use port forwarding.  Hm.  Can I tell Gnus to
execute a shell script for the connection, prior to actually
connecting?  The shell script could set up the port forwarding.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 14:28     ` Kai Großjohann
@ 2002-10-01 15:10       ` Simon Josefsson
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Josefsson @ 2002-10-01 15:10 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> I found something fishy: in imap-message-append, it calls
> imap-send-command-wait with a list as the first arg.  The last
> element of the list is article, which is a buffer.  But
> imap-send-command-wait appears to take an optional second arg, a
> buffer.

The buffer command of `imap-send-command-wait' is the buffer that
holds the IMAP process.

But really, the command looked good so I doubt there is imap.el
problem if it isn't CRLF related.  Can you reproduce it in a telnet
session?  What about frobbing `imap-client-eol'?  It should be \r\n
unless you connect to the server in some weird way.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 15:07       ` Kai Großjohann
@ 2002-10-01 15:37         ` Kai Großjohann
  2002-10-01 17:41           ` Kai Großjohann
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2002-10-01 15:37 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> (setq imap-shell-program
>       '("ssh -e none grossjoh@austin.cs.uni-dortmund.de netcat %s 143"))
>
> Maybe it is better to use port forwarding.  Hm.  Can I tell Gnus to
> execute a shell script for the connection, prior to actually
> connecting?  The shell script could set up the port forwarding.

I've now tried port forwarding, but it is "administratively
prohibited" :-(

But the above command works in principle.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 15:37         ` Kai Großjohann
@ 2002-10-01 17:41           ` Kai Großjohann
  2002-10-01 22:57             ` Simon Josefsson
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2002-10-01 17:41 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> (setq imap-shell-program
>>       '("ssh -e none grossjoh@austin.cs.uni-dortmund.de netcat %s 143"))
>>
>> Maybe it is better to use port forwarding.  Hm.  Can I tell Gnus to
>> execute a shell script for the connection, prior to actually
>> connecting?  The shell script could set up the port forwarding.
>
> I've now tried port forwarding, but it is "administratively
> prohibited" :-(
>
> But the above command works in principle.

Only in principle, though: copying into groups with Gcc or Newsgroups
or B c fails, probably an eol issue.

I now changed the configuration of sshd to allow port forwarding, and
now I'm a happy camper.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 17:41           ` Kai Großjohann
@ 2002-10-01 22:57             ` Simon Josefsson
  2002-10-02 20:17               ` Kai Großjohann
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Josefsson @ 2002-10-01 22:57 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>>
>>> (setq imap-shell-program
>>>       '("ssh -e none grossjoh@austin.cs.uni-dortmund.de netcat %s 143"))
>>>
>>> Maybe it is better to use port forwarding.  Hm.  Can I tell Gnus to
>>> execute a shell script for the connection, prior to actually
>>> connecting?  The shell script could set up the port forwarding.
>>
>> I've now tried port forwarding, but it is "administratively
>> prohibited" :-(
>>
>> But the above command works in principle.
>
> Only in principle, though: copying into groups with Gcc or Newsgroups
> or B c fails, probably an eol issue.

imap.el evaluates (setq imap-client-eol "\n") inside imap-shell-open,
so you must set it back to \r\n if you need that.

> I now changed the configuration of sshd to allow port forwarding, and
> now I'm a happy camper.

Yes, port forwarding is much more reliable.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-01 22:57             ` Simon Josefsson
@ 2002-10-02 20:17               ` Kai Großjohann
  2002-10-02 21:47                 ` Simon Josefsson
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2002-10-02 20:17 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> I now changed the configuration of sshd to allow port forwarding, and
>> now I'm a happy camper.
>
> Yes, port forwarding is much more reliable.

But it's so _dangerous_!  Argh.

Is there a hook so that I can tell Gnus to start port-forwarding prior
to connecting to the server if not enabled?  So far, I always forget
to start the port forwarding and need to be reminded by the error
message.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: IMAP error when posting
  2002-10-02 20:17               ` Kai Großjohann
@ 2002-10-02 21:47                 ` Simon Josefsson
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Josefsson @ 2002-10-02 21:47 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Is there a hook so that I can tell Gnus to start port-forwarding prior
> to connecting to the server if not enabled?  So far, I always forget
> to start the port forwarding and need to be reminded by the error
> message.

Here is what I use.

 '(gnus-load-hook (quote ((lambda nil (call-process "ssh" nil 0 nil "-L" "1430:imapserver:143" "-L" "1190:quimby.gnus.org:119" "-L" "2500:mailserver:587" "loginserver" "-N")))))

Ssh keeps on running after you kill emacs though.  Starting another
gnus doesn't hurt, ssh seems to die silently when it is already
running.




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-10-02 21:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-01  8:12 IMAP error when posting Kai Großjohann
2002-10-01 12:42 ` Simon Josefsson
2002-10-01 14:07   ` Kai Großjohann
2002-10-01 14:28     ` Kai Großjohann
2002-10-01 15:10       ` Simon Josefsson
2002-10-01 14:57     ` Simon Josefsson
2002-10-01 15:02       ` Kai Großjohann
2002-10-01 15:07       ` Kai Großjohann
2002-10-01 15:37         ` Kai Großjohann
2002-10-01 17:41           ` Kai Großjohann
2002-10-01 22:57             ` Simon Josefsson
2002-10-02 20:17               ` Kai Großjohann
2002-10-02 21:47                 ` Simon Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).