Known issues with POP3

Started by theMaverick, December 24, 2003, 02:23:57 PM

Previous topic - Next topic

theMaverick

Hi,

I am basically a Neobook user recently introduced to newLISP, so if my questions seem lame, please bear with me.



Working with POP3.lsp v1.5, I am able to download mail and check the status and download mail from one pop account but not another.

With one account, the process runs smoothly, but with the other, a POP3 from //domaindirect.com, the newLISP hangs.



Tried it with both dll and exe as well as through the TK front end. All give same results.

I am using Kerio Personal Firewall, which shows that each time, exactly 39 bytes are sent and 640 recieved, after which the process comes to a halt.



I am running this on a Win2k SP4, over a 56K dial up.



My Questions are:



1. Are there any known issues with certain types of POP accounts?

2. Do POP mail servers identify a connecting client, and if so, is there any way to fake this as maybe the server is not allowing access to unidentified mail clients.



Thank you in advance.
theMaverick

... people with a spark of genius often have ignition trouble

Lutz

#1
Are you sure the other account is POP3 and not IMAP? Have you tried another pop3 client from the same computer? At the beginning of the file pop3.lsp there is a statement:



(set 'debug-flag nil)



change this to:



(set 'debug-flag true)



Then run newlisp.exe on its own without the newlisp-tk frontend and watch what you see in the console window. You will see the whole dialog with the POP3 server on the other computer, whith diagnostic messages etc.



Lutz

theMaverick

#2
Hi Lutz,



Thanks for the reply.



Both accounts allows both POP3 and IMAP connections, I have been retrieving mail from this account using Outlook Express using a POP3 setup.



I set the debug-flag to TRUE and this is what I got in the main window:



right after the (POP3:get-mail-status ... ) line



connected on: 228
+OK
<5774.34544345678@my-isp.com>


sent : USER my-user-name

+OK

sent : PASS my-password

+OK

logon successful
sent: STAT

+OK
status: 2 3256

sent: LAST


This is as far as it goes every time. After this the console hangs and I get only a blinking cursor below the sent: LAST



The other account returns a +OK for last read etc. and the complete (0 2008 3) line is returned before I get back the prompt.
theMaverick

... people with a spark of genius often have ignition trouble

Lutz

#3
your pop3 seems not to support the LAST command which gives you as the first number the last email in the inbox, which has been read. This is only important when using 'get-new-mail' for 'get-all-mail'A you can just set it to 0 (zero):



Take out all lines between and including:



(set 'sndbuff "LASTrn")

....

(net-flush)



now change the line:



(push (integer (first (parse last-read))) result)

to:

(push 0 result)



hope this helps



Lutz

theMaverick

#4
Thanks Lutz.



The solution returns (0 20018 3) etc. just fine.

But (POP3:get-all-mail ... ) returns the following:



logon sucessful

sent: STAT



+OK

status:  3 20018



parsed status: (3)

nil

>



Perhaps if instead of 0, last-read could also be set to result so that it reads (3 20018 3), so that it thinks that all mail is new mail. That way both get-all-mail and get-new-mail would work the same, right?



I tried to do this but I keep ending up with lines like ((3) 20018 3) etc.
theMaverick

... people with a spark of genius often have ignition trouble

Lutz

#5
I posted pop3.lsp.17 in http://newlisp.org/download/development/">http://newlisp.org/download/development/ .



This new version 1.7 of pop3.lsp works also on POP3 servers, which do not support the LAST command, but only with (get-all-messages ....) all other commands rely on LAST and won't work.



At a later time I will add a (PP3:delete-all-mail ...)





Lutz

Lutz

#6
Uploaded v 1.8 of pop3.lsp to: http://newlisp.org/download/development/">http://newlisp.org/download/development/



This version supports also the new (POP3:delete-all-mail ... ) on pop3 servers not supporting the LAST command.



Lutz

theMaverick

#7
Great!



Thanks Lutz,



It works like a charm.
theMaverick

... people with a spark of genius often have ignition trouble