Gnus development mailing list
 help / color / mirror / Atom feed
* pop3-read-response
@ 2011-05-04 10:32 Daniel Dehennin
  2011-05-24  8:22 ` pop3-read-response Adrian Lanz
  2011-05-30 20:48 ` pop3-read-response Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Dehennin @ 2011-05-04 10:32 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]

Hello,

I have an authentication error on a SUN pop3 server after updating to
Gnus from git 2011-05-03[1].

My problem is located in pop3-read-response, when I set debug-on-error
to t, the pop3 process buffer is the following:

#v+ Point is 66
+OK POP3 Ready mel1 000236b6

+OK Capability list follows, mate

IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY
UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT
THREAD=ORDEREDSUBJECT THREAD=REFERENCES ENABLE CONTEXT=SEARCH
CONTEXT=SORT WITHIN SASL-IR SEARCHRES XSENDER X-NETSCAPE XSERVERINFO
X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP
X-ANNOTATEMORE XUM1 AUTH=PLAIN

.

+OK USER myuser set, mate

#v-

The pop3-read-response call in pop3-user returns nil in that case and my
authentication fails.

It looks like pop3-read-response is called too fast, edebuging pop3-user
permit to have point at position 416, which is on the "+" of "+OK USER".

Maybe the pop3-read-response should be reworked to handle this?

Regards.

Footnotes: 
[1]  commit e9317228d80c4cd0c9c0684e7af4441f8f04d84c

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: pop3-read-response
  2011-05-04 10:32 pop3-read-response Daniel Dehennin
@ 2011-05-24  8:22 ` Adrian Lanz
  2011-05-24 16:40   ` pop3-read-response Daniel Dehennin
  2011-05-30 20:48 ` pop3-read-response Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 10+ messages in thread
From: Adrian Lanz @ 2011-05-24  8:22 UTC (permalink / raw)
  To: ding

>>>>> On Wed, 04 May 2011 12:32:56 +0200
>>>>> Daniel Dehennin <daniel.dehennin@baby-gnu.org> writes:

[...]

    > It looks like pop3-read-response is called too fast


[...]

The same here. Edebugging pop3-user and working down the function
step-by-step is fine (mail messages are retrieved from the pop server of
my ISP without error). However, pop3 retrieval mail messages the normal
(fast) way without debugging does not work (gives me an error: user no
known, or similar).

Regards, Adrian.




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

* Re: pop3-read-response
  2011-05-24  8:22 ` pop3-read-response Adrian Lanz
@ 2011-05-24 16:40   ` Daniel Dehennin
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Dehennin @ 2011-05-24 16:40 UTC (permalink / raw)
  To: ding

Adrian Lanz <lanz@wsl.ch> writes:

>>>>>> On Wed, 04 May 2011 12:32:56 +0200
>>>>>> Daniel Dehennin <daniel.dehennin@baby-gnu.org> writes:
>
> [...]
>
>     > It looks like pop3-read-response is called too fast
>
>
> [...]
>
> The same here. Edebugging pop3-user and working down the function
> step-by-step is fine (mail messages are retrieved from the pop server of
> my ISP without error). However, pop3 retrieval mail messages the normal
> (fast) way without debugging does not work (gives me an error: user no
> known, or similar).

Personally I switched to an imap mail-source as I have the choice and no
idea how to debug this.

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1



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

* Re: pop3-read-response
  2011-05-04 10:32 pop3-read-response Daniel Dehennin
  2011-05-24  8:22 ` pop3-read-response Adrian Lanz
@ 2011-05-30 20:48 ` Lars Magne Ingebrigtsen
  2011-05-31  7:16   ` pop3-read-response Daniel Dehennin
  1 sibling, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-05-30 20:48 UTC (permalink / raw)
  To: ding

Daniel Dehennin <daniel.dehennin@baby-gnu.org> writes:

> +OK USER myuser set, mate
>
> #v-
>
> The pop3-read-response call in pop3-user returns nil in that case and my
> authentication fails.

Right.  I think I see why it's doing this, and I think I've fixed this
now. 

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: pop3-read-response
  2011-05-30 20:48 ` pop3-read-response Lars Magne Ingebrigtsen
@ 2011-05-31  7:16   ` Daniel Dehennin
  2011-05-31 18:49     ` pop3-read-response Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Dehennin @ 2011-05-31  7:16 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Daniel Dehennin <daniel.dehennin@baby-gnu.org> writes:
>
>> +OK USER myuser set, mate
>>
>> #v-
>>
>> The pop3-read-response call in pop3-user returns nil in that case and my
>> authentication fails.
>
> Right.  I think I see why it's doing this, and I think I've fixed this
> now. 

Sorry, I’m using bc1350c0871a8da4d356861b06020e37692056ef and the
problem is still there.

If you need more information, I can make some tests.

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: pop3-read-response
  2011-05-31  7:16   ` pop3-read-response Daniel Dehennin
@ 2011-05-31 18:49     ` Lars Magne Ingebrigtsen
  2011-06-01  7:05       ` pop3-read-response Daniel Dehennin
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-05-31 18:49 UTC (permalink / raw)
  To: ding

Daniel Dehennin <daniel.dehennin@baby-gnu.org> writes:

> Sorry, I’m using bc1350c0871a8da4d356861b06020e37692056ef and the
> problem is still there.

Darn.

> If you need more information, I can make some tests.

My suspicion was that there was data in the buffer that the pop3 parser
didn't expect to be there, so it regarded something as a response before
getting the complete

+OK USER ... \r\n

line.  But that may be wrong.

If you apply the following patch, pop3 should message what's in the
buffer, and that might give us a clue what's failing precisely,

pop3-read-point is supposed to be before the "+OK", so waiting for the
\r\n should have given the complete line.  I'm thinking pop3-read-point
is somewhere earlier in the buffer for some reason or other.

diff --git a/lisp/pop3.el b/lisp/pop3.el
index 90e11b3..917a401 100644
--- a/lisp/pop3.el
+++ b/lisp/pop3.el
@@ -345,6 +345,7 @@ Return the response string if optional second argument is non-nil."
 		  (not (search-forward "\r\n" nil t)))
 	(pop3-accept-process-output process)
 	(goto-char pop3-read-point))
+      (message "%d %s" pop3-read-point (buffer-string))
       (setq match-end (point))
       (goto-char pop3-read-point)
       (if (looking-at "-ERR")

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: pop3-read-response
  2011-05-31 18:49     ` pop3-read-response Lars Magne Ingebrigtsen
@ 2011-06-01  7:05       ` Daniel Dehennin
  2011-06-03 22:08         ` pop3-read-response Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Dehennin @ 2011-06-01  7:05 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:


[...]

> If you apply the following patch, pop3 should message what's in the
> buffer, and that might give us a clue what's failing precisely,
>
> pop3-read-point is supposed to be before the "+OK", so waiting for the
> \r\n should have given the complete line.  I'm thinking pop3-read-point
> is somewhere earlier in the buffer for some reason or other.

Here is the output

#v+
1 IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ENABLE CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCHRES XSENDER X-NETSCAPE XSERVERINFO X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP X-ANNOTATEMORE XUM1 AUTH=PLAIN

.

#v-

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: pop3-read-response
  2011-06-01  7:05       ` pop3-read-response Daniel Dehennin
@ 2011-06-03 22:08         ` Lars Magne Ingebrigtsen
  2011-07-03 12:46           ` pop3-read-response Adrian Lanz
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-06-03 22:08 UTC (permalink / raw)
  To: ding

Daniel Dehennin <daniel.dehennin@baby-gnu.org> writes:

> Here is the output
>
> #v+
> 1 IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY
> UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT
> THREAD=ORDEREDSUBJECT THREAD=REFERENCES ENABLE CONTEXT=SEARCH
> CONTEXT=SORT WITHIN SASL-IR SEARCHRES XSENDER X-NETSCAPE XSERVERINFO
> X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP
> X-ANNOTATEMORE XUM1 AUTH=PLAIN

Uhmn.  That's the contents of an IMAP buffer.  How did that end up in
the POP buffer?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: pop3-read-response
  2011-06-03 22:08         ` pop3-read-response Lars Magne Ingebrigtsen
@ 2011-07-03 12:46           ` Adrian Lanz
  2011-07-05 20:55             ` pop3-read-response Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Adrian Lanz @ 2011-07-03 12:46 UTC (permalink / raw)
  To: ding

>>>>> On Sat, 04 Jun 2011 00:08:35 +0200
>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

    > Daniel Dehennin <daniel.dehennin@baby-gnu.org> writes:
    >> Here is the output
    >> 
    >> #v+
    >> 1 IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN
    >> BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT
    >> THREAD=ORDEREDSUBJECT THREAD=REFERENCES ENABLE CONTEXT=SEARCH
    >> CONTEXT=SORT WITHIN SASL-IR SEARCHRES XSENDER X-NETSCAPE
    >> XSERVERINFO X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE
    >> X-SUN-IMAP X-ANNOTATEMORE XUM1 AUTH=PLAIN

    > Uhmn.  That's the contents of an IMAP buffer.  How did that end up
    > in the POP buffer?


[...]

I use the following hack to make pop3.el work with my ISP (yes, it
offers no IMAP). I consider it as a hack. Any comments, recommendations?

*** /usr/share/emacs/24.0.50/lisp/gnus/pop3.el.gz
--- /emacs/lisp/gnus/pop3.el
***************
*** 313,318 ****
--- 313,321 ----
  	     (lambda (capabilities)
  	       (and (string-match "\\bSTLS\\b" capabilities)
  		    "STLS\r\n"))))
+ 
+       (sit-for 1)
+ 
        (when result
  	(let ((response (plist-get (cdr result) :greeting)))
  	  (setq pop3-timestamp





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

* Re: pop3-read-response
  2011-07-03 12:46           ` pop3-read-response Adrian Lanz
@ 2011-07-05 20:55             ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-05 20:55 UTC (permalink / raw)
  To: ding

Adrian Lanz <lanz@wsl.ch> writes:

> I use the following hack to make pop3.el work with my ISP (yes, it
> offers no IMAP). I consider it as a hack. Any comments, recommendations?

[...]

> + 
> +       (sit-for 1)

If you need a `sit-for' in the code, then the code is wrong...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

end of thread, other threads:[~2011-07-05 20:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04 10:32 pop3-read-response Daniel Dehennin
2011-05-24  8:22 ` pop3-read-response Adrian Lanz
2011-05-24 16:40   ` pop3-read-response Daniel Dehennin
2011-05-30 20:48 ` pop3-read-response Lars Magne Ingebrigtsen
2011-05-31  7:16   ` pop3-read-response Daniel Dehennin
2011-05-31 18:49     ` pop3-read-response Lars Magne Ingebrigtsen
2011-06-01  7:05       ` pop3-read-response Daniel Dehennin
2011-06-03 22:08         ` pop3-read-response Lars Magne Ingebrigtsen
2011-07-03 12:46           ` pop3-read-response Adrian Lanz
2011-07-05 20:55             ` pop3-read-response Lars Magne Ingebrigtsen

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