It is possible to access yahoo mail accounts through imap.mail.yahoo.com. The problem is that it is necessary to send the command: ID ("GUID" "1")
before the LOGIN command. So to get it to work in thunderbird it would be necessary to have thunderbird send this command.
I downloaded the source for thunderbird-2.0.0.22 and successfully compiled it. Then I tried to add some code to get it to send that command. I thought it would make sense to add it to the file mailnews/ imap/src/nsImapProtocol.cpp and specifically the function nsImapProtocol::InsecureLogin(), which is where it seems the LOGIN command is being sent.
I tried adding the following code: IncrementCommandTagNumber(); nsCString command_guid (GetServerCommandTag()); command_guid.Append(" id (\"GUID\" \"1\")"CRLF);
nsresult rv_guid = SendData(command_guid.get(), PR_TRUE /* suppress logging */); if (NS_SUCCEEDED(rv_guid)){ printf("Success in sending id!\n"); }
but it doesn't seem to work. Thunderbird says something like can't connect to server and asks for the password again. Looking at the packets that are sent I can see that the ID command is sent. But it seems the LOGIN command is not. Although the response to the LOGIN command says LOGIN OK (indicating a successful login).
Anyways I tested downloading a message manually using the following sequence of commands through "telnet imap.mail.yahoo.com 143": 1 capability 2 id ("GUID" "1") 3 login "usern...@yahoo.com" "password" 4 list * 5 examine Inbox 6 fetch 1 all 7 fetch 1 body[text] 8 logout
My guess is that you're not parsing the response of the command, and confusing our parser in general, because it probably sees the response from the ID command after sending the LOGIN command and tries to parse it. So you need to somehow consume the response of your ID command first, before sending the login command. Usually we use ParseIMAPandCheckForNewMail() to parse the server response. I don't know what the server is returning in this case, so I have no idea if our parser as it is now will be happy with the response.
> It is possible to access yahoo mail accounts through > imap.mail.yahoo.com. The problem is that it is necessary to send the > command: > ID ("GUID" "1")
> before the LOGIN command. So to get it to work in thunderbird it would > be necessary to have thunderbird send this command.
I enabled imap logging and removed the code to suppress logging when sending the id command and I also made a call to ParseIMAPandCheckForNewMail(). Here is what the log says: -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:SendData: 2 id ("GUID" "1")^M -1299633264[89925a8]: ReadNextLine [stream=8992e54 nb=84 needmore=0] -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:CreateNewLineFromSocket: * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55")^M -1299633264[89925a8]: ###!!! ASSERTION: syntax error in generic parser: '!error', file nsIMAPGenericParser.cpp, line 92 -1299633264[89925a8]: ###!!! Break: at file nsIMAPGenericParser.cpp, line 92 -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:PARSER:Internal Syntax Error on line: %s: * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55")^M
So it seems thunderbird is having trouble parsing the response to the id command which is: * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55")^M
On the positive side this is the log of the imap packets sent and received (according to tshark): 5.111712 98.136.166.105 -> 96.20.133.9 IMAP Response: * OK IMAP4rev1 server ready (3.5.55) 5.112920 96.20.133.9 -> 98.136.166.105 IMAP Request: 1 capability 5.200712 98.136.166.105 -> 96.20.133.9 IMAP Response: * CAPABILITY IMAP4rev1 LOGIN-REFERRALS AUTH=XYMCOOKIE AUTH=XYMCOOKIEB64 AUTH=XYMPKI AUTH=XYMECOOKIE ID NAMESPACE 8.807688 96.20.133.9 -> 98.136.166.105 IMAP Request: 2 id ("GUID" "1") 8.896215 98.136.166.105 -> 96.20.133.9 IMAP Response: * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55") 8.897354 96.20.133.9 -> 98.136.166.105 IMAP Request: 3 login "rsoleym...@yahoo.com" "rosa123" 9.291807 98.136.166.105 -> 96.20.133.9 IMAP Response: 3 OK LOGIN completed
which indicates that thunderbird is now sending the LOGIN command at least.
I will try looking into the parser and see what is wrong.
David Bienvenu wrote: > Hi Bijan, > First of all, I would not suppress logging, so then you can generate > an imap protocol log and see what the server is responding.
> My guess is that you're not parsing the response of the command, and > confusing our parser in general, because it probably sees the response > from the ID command after sending the LOGIN command and tries to parse > it. So you need to somehow consume the response of your ID command > first, before sending the login command. Usually we use > ParseIMAPandCheckForNewMail() to parse the server response. I don't know > what the server is returning in this case, so I have no idea if our > parser as it is now will be happy with the response.
> - David
> On 9/7/2009 12:08 AM, Bijan wrote: >> Hi,
>> It is possible to access yahoo mail accounts through >> imap.mail.yahoo.com. The problem is that it is necessary to send the >> command: >> ID ("GUID" "1")
>> before the LOGIN command. So to get it to work in thunderbird it would >> be necessary to have thunderbird send this command.
I managed to get it to work. The problem was in: nsImapServerResponseParser.cpp
Specifically the function: nsImapServerResponseParser::response_data()
This is the function that figures out what the response is. It has a switch that deals with each possible command. It didn't know about the id command so flagged it as an error. All I had to do was add: case 'I': if (toupper(fNextToken[1]) == 'D') id_data(); else SetSyntaxError(PR_TRUE); break;
where id_data() is a function to process the rest of the data relating to the id command. Here is the code for that (I copied it from the one for the language command, language_data()): void nsImapServerResponseParser::id_data() { // for now, just eat the id data.... do { // eat each language returned to us AdvanceToNextToken(); } while (fNextToken && !fAtEndOfLine && ContinueParse());
}
I think this would be really useful to a lot of people using yahoo mail, because the imap access works really well. The only problem I can see is if a lot of people start using this yahoo might block it. But I don't think that is that likely as both freepops and YPOPs use this method to download mail form yahoo. So yeah maybe incorporate this into thunderbird, or make it an extension.
> I enabled imap logging and removed the code to suppress logging when > sending the id command and I also made a call to > ParseIMAPandCheckForNewMail(). > Here is what the log says: > -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:SendData: 2 id > ("GUID" "1")^M > -1299633264[89925a8]: ReadNextLine [stream=8992e54 nb=84 needmore=0] > -1299633264[89925a8]: > 8991978:imap.mail.yahoo.com:NA:CreateNewLineFromSocket: * ID ("name" > "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55")^M > -1299633264[89925a8]: ###!!! ASSERTION: syntax error in generic parser: > '!error', file nsIMAPGenericParser.cpp, line 92 > -1299633264[89925a8]: ###!!! Break: at file nsIMAPGenericParser.cpp, > line 92 > -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:PARSER:Internal > Syntax Error on line: %s: * ID ("name" "imapgate" "support-url" > "http://mail.yahoo.com/" "version" "3.5.55")^M
> So it seems thunderbird is having trouble parsing the response to the id > command which is: > * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" "version" > "3.5.55")^M
> On the positive side this is the log of the imap packets sent and > received (according to tshark): > 5.111712 98.136.166.105 -> 96.20.133.9 IMAP Response: * OK IMAP4rev1 > server ready (3.5.55) > 5.112920 96.20.133.9 -> 98.136.166.105 IMAP Request: 1 capability > 5.200712 98.136.166.105 -> 96.20.133.9 IMAP Response: * CAPABILITY > IMAP4rev1 LOGIN-REFERRALS AUTH=XYMCOOKIE AUTH=XYMCOOKIEB64 AUTH=XYMPKI > AUTH=XYMECOOKIE ID NAMESPACE > 8.807688 96.20.133.9 -> 98.136.166.105 IMAP Request: 2 id ("GUID" "1") > 8.896215 98.136.166.105 -> 96.20.133.9 IMAP Response: * ID ("name" > "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55") > 8.897354 96.20.133.9 -> 98.136.166.105 IMAP Request: 3 login > "rsoleym...@yahoo.com" "rosa123" > 9.291807 98.136.166.105 -> 96.20.133.9 IMAP Response: 3 OK LOGIN > completed
> which indicates that thunderbird is now sending the LOGIN command at least.
> I will try looking into the parser and see what is wrong.
> Thanks again, > Bijan
> David Bienvenu wrote: >> Hi Bijan, >> First of all, I would not suppress logging, so then you can generate >> an imap protocol log and see what the server is responding.
>> My guess is that you're not parsing the response of the command, and >> confusing our parser in general, because it probably sees the response >> from the ID command after sending the LOGIN command and tries to parse >> it. So you need to somehow consume the response of your ID command >> first, before sending the login command. Usually we use >> ParseIMAPandCheckForNewMail() to parse the server response. I don't >> know what the server is returning in this case, so I have no idea if >> our parser as it is now will be happy with the response.
>> - David
>> On 9/7/2009 12:08 AM, Bijan wrote: >>> Hi,
>>> It is possible to access yahoo mail accounts through >>> imap.mail.yahoo.com. The problem is that it is necessary to send the >>> command: >>> ID ("GUID" "1")
>>> before the LOGIN command. So to get it to work in thunderbird it would >>> be necessary to have thunderbird send this command.
I have uploaded binaries for Thunderbird 2 with yahoo IMAP support compiled for Ubuntu (which might work on other Linux distributions) to my site: http://www.crasseux.com/linux/
I am now trying to compile a windows version. It should be up eventually.
There is also a binary for mutt with similar support for yahoo IMAP.
Bijan Soleymani wrote: > I managed to get it to work. The problem was in: > nsImapServerResponseParser.cpp
> Specifically the function: > nsImapServerResponseParser::response_data()
> This is the function that figures out what the response is. It has a > switch that deals with each possible command. It didn't know about the > id command so flagged it as an error. > All I had to do was add: > case 'I': > if (toupper(fNextToken[1]) == 'D') > id_data(); > else SetSyntaxError(PR_TRUE); > break;
> where id_data() is a function to process the rest of the data relating > to the id command. Here is the code for that (I copied it from the one > for the language command, language_data()): > void nsImapServerResponseParser::id_data() > { > // for now, just eat the id data.... > do > { > // eat each language returned to us > AdvanceToNextToken(); > } while (fNextToken && !fAtEndOfLine && ContinueParse()); > }
> I think this would be really useful to a lot of people using yahoo mail, > because the imap access works really well. The only problem I can see is > if a lot of people start using this yahoo might block it. But I don't > think that is that likely as both freepops and YPOPs use this method to > download mail form yahoo. So yeah maybe incorporate this into > thunderbird, or make it an extension.
> Thanks again, > Bijan
> Bijan Soleymani wrote: >> Thanks David,
>> I enabled imap logging and removed the code to suppress logging when >> sending the id command and I also made a call to >> ParseIMAPandCheckForNewMail(). >> Here is what the log says: >> -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:SendData: 2 id >> ("GUID" "1")^M >> -1299633264[89925a8]: ReadNextLine [stream=8992e54 nb=84 needmore=0] >> -1299633264[89925a8]: >> 8991978:imap.mail.yahoo.com:NA:CreateNewLineFromSocket: * ID ("name" >> "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55")^M >> -1299633264[89925a8]: ###!!! ASSERTION: syntax error in generic >> parser: '!error', file nsIMAPGenericParser.cpp, line 92 >> -1299633264[89925a8]: ###!!! Break: at file nsIMAPGenericParser.cpp, >> line 92 >> -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:PARSER:Internal >> Syntax Error on line: %s: * ID ("name" "imapgate" "support-url" >> "http://mail.yahoo.com/" "version" "3.5.55")^M
>> So it seems thunderbird is having trouble parsing the response to the >> id command which is: >> * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" >> "version" "3.5.55")^M
>> On the positive side this is the log of the imap packets sent and >> received (according to tshark): >> 5.111712 98.136.166.105 -> 96.20.133.9 IMAP Response: * OK >> IMAP4rev1 server ready (3.5.55) >> 5.112920 96.20.133.9 -> 98.136.166.105 IMAP Request: 1 capability >> 5.200712 98.136.166.105 -> 96.20.133.9 IMAP Response: * CAPABILITY >> IMAP4rev1 LOGIN-REFERRALS AUTH=XYMCOOKIE AUTH=XYMCOOKIEB64 AUTH=XYMPKI >> AUTH=XYMECOOKIE ID NAMESPACE >> 8.807688 96.20.133.9 -> 98.136.166.105 IMAP Request: 2 id ("GUID" "1") >> 8.896215 98.136.166.105 -> 96.20.133.9 IMAP Response: * ID ("name" >> "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55") >> 8.897354 96.20.133.9 -> 98.136.166.105 IMAP Request: 3 login >> "rsoleym...@yahoo.com" "rosa123" >> 9.291807 98.136.166.105 -> 96.20.133.9 IMAP Response: 3 OK LOGIN >> completed
>> which indicates that thunderbird is now sending the LOGIN command at >> least.
>> I will try looking into the parser and see what is wrong.
>> Thanks again, >> Bijan
>> David Bienvenu wrote: >>> Hi Bijan, >>> First of all, I would not suppress logging, so then you can >>> generate an imap protocol log and see what the server is responding.
>>> My guess is that you're not parsing the response of the command, and >>> confusing our parser in general, because it probably sees the >>> response from the ID command after sending the LOGIN command and >>> tries to parse it. So you need to somehow consume the response of >>> your ID command first, before sending the login command. Usually we >>> use ParseIMAPandCheckForNewMail() to parse the server response. I >>> don't know what the server is returning in this case, so I have no >>> idea if our parser as it is now will be happy with the response.
>>> - David
>>> On 9/7/2009 12:08 AM, Bijan wrote: >>>> Hi,
>>>> It is possible to access yahoo mail accounts through >>>> imap.mail.yahoo.com. The problem is that it is necessary to send the >>>> command: >>>> ID ("GUID" "1")
>>>> before the LOGIN command. So to get it to work in thunderbird it would >>>> be necessary to have thunderbird send this command.
Also not only is it possible to receive mail through IMAP from imap.mail.yahoo.com but it is also possible to send mail through SMTPs through smtp.mail.yahoo.com. All that is necessary is to choose SSL and port 465. You can then use your yahoo email address as username along with your normal webmail password. This also applies to the IMAP, except that the IMAP does not run over SSL.
Bijan Soleymani wrote: > I have uploaded binaries for Thunderbird 2 with yahoo IMAP support > compiled for Ubuntu (which might work on other Linux distributions) to > my site: > http://www.crasseux.com/linux/
> I am now trying to compile a windows version. It should be up eventually.
> There is also a binary for mutt with similar support for yahoo IMAP.
> Bijan
> Bijan Soleymani wrote: >> I managed to get it to work. The problem was in: >> nsImapServerResponseParser.cpp
>> Specifically the function: >> nsImapServerResponseParser::response_data()
>> This is the function that figures out what the response is. It has a >> switch that deals with each possible command. It didn't know about the >> id command so flagged it as an error. >> All I had to do was add: >> case 'I': >> if (toupper(fNextToken[1]) == 'D') >> id_data(); >> else SetSyntaxError(PR_TRUE); >> break;
>> where id_data() is a function to process the rest of the data relating >> to the id command. Here is the code for that (I copied it from the one >> for the language command, language_data()): >> void nsImapServerResponseParser::id_data() >> { >> // for now, just eat the id data.... >> do >> { >> // eat each language returned to us >> AdvanceToNextToken(); >> } while (fNextToken && !fAtEndOfLine && ContinueParse()); >> }
>> I think this would be really useful to a lot of people using yahoo >> mail, because the imap access works really well. The only problem I >> can see is if a lot of people start using this yahoo might block it. >> But I don't think that is that likely as both freepops and YPOPs use >> this method to download mail form yahoo. So yeah maybe incorporate >> this into thunderbird, or make it an extension.
>> Thanks again, >> Bijan
>> Bijan Soleymani wrote: >>> Thanks David,
>>> I enabled imap logging and removed the code to suppress logging when >>> sending the id command and I also made a call to >>> ParseIMAPandCheckForNewMail(). >>> Here is what the log says: >>> -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:SendData: 2 id >>> ("GUID" "1")^M >>> -1299633264[89925a8]: ReadNextLine [stream=8992e54 nb=84 needmore=0] >>> -1299633264[89925a8]: >>> 8991978:imap.mail.yahoo.com:NA:CreateNewLineFromSocket: * ID ("name" >>> "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55")^M >>> -1299633264[89925a8]: ###!!! ASSERTION: syntax error in generic >>> parser: '!error', file nsIMAPGenericParser.cpp, line 92 >>> -1299633264[89925a8]: ###!!! Break: at file nsIMAPGenericParser.cpp, >>> line 92 >>> -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:PARSER:Internal >>> Syntax Error on line: %s: * ID ("name" "imapgate" "support-url" >>> "http://mail.yahoo.com/" "version" "3.5.55")^M
>>> So it seems thunderbird is having trouble parsing the response to the >>> id command which is: >>> * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" >>> "version" "3.5.55")^M
>>> On the positive side this is the log of the imap packets sent and >>> received (according to tshark): >>> 5.111712 98.136.166.105 -> 96.20.133.9 IMAP Response: * OK >>> IMAP4rev1 server ready (3.5.55) >>> 5.112920 96.20.133.9 -> 98.136.166.105 IMAP Request: 1 capability >>> 5.200712 98.136.166.105 -> 96.20.133.9 IMAP Response: * CAPABILITY >>> IMAP4rev1 LOGIN-REFERRALS AUTH=XYMCOOKIE AUTH=XYMCOOKIEB64 >>> AUTH=XYMPKI AUTH=XYMECOOKIE ID NAMESPACE >>> 8.807688 96.20.133.9 -> 98.136.166.105 IMAP Request: 2 id ("GUID" >>> "1") >>> 8.896215 98.136.166.105 -> 96.20.133.9 IMAP Response: * ID ("name" >>> "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55") >>> 8.897354 96.20.133.9 -> 98.136.166.105 IMAP Request: 3 login >>> "rsoleym...@yahoo.com" "rosa123" >>> 9.291807 98.136.166.105 -> 96.20.133.9 IMAP Response: 3 OK LOGIN >>> completed
>>> which indicates that thunderbird is now sending the LOGIN command at >>> least.
>>> I will try looking into the parser and see what is wrong.
>>> Thanks again, >>> Bijan
>>> David Bienvenu wrote: >>>> Hi Bijan, >>>> First of all, I would not suppress logging, so then you can >>>> generate an imap protocol log and see what the server is responding.
>>>> My guess is that you're not parsing the response of the command, and >>>> confusing our parser in general, because it probably sees the >>>> response from the ID command after sending the LOGIN command and >>>> tries to parse it. So you need to somehow consume the response of >>>> your ID command first, before sending the login command. Usually we >>>> use ParseIMAPandCheckForNewMail() to parse the server response. I >>>> don't know what the server is returning in this case, so I have no >>>> idea if our parser as it is now will be happy with the response.
>>>> - David
>>>> On 9/7/2009 12:08 AM, Bijan wrote: >>>>> Hi,
>>>>> It is possible to access yahoo mail accounts through >>>>> imap.mail.yahoo.com. The problem is that it is necessary to send the >>>>> command: >>>>> ID ("GUID" "1")
>>>>> before the LOGIN command. So to get it to work in thunderbird it would >>>>> be necessary to have thunderbird send this command.
> I have uploaded binaries for Thunderbird 2 with yahoo IMAP support > compiled for Ubuntu (which might work on other Linux distributions) to > my site: > http://www.crasseux.com/linux/
> I am now trying to compile a windows version. It should be up eventually.
> There is also a binary for mutt with similar support for yahoo IMAP.
> Bijan
> Bijan Soleymani wrote: >> I managed to get it to work. The problem was in: >> nsImapServerResponseParser.cpp
>> Specifically the function: >> nsImapServerResponseParser::response_data()
>> This is the function that figures out what the response is. It has a >> switch that deals with each possible command. It didn't know about the >> id command so flagged it as an error. >> All I had to do was add: >> case 'I': >> if (toupper(fNextToken[1]) == 'D') >> id_data(); >> else SetSyntaxError(PR_TRUE); >> break;
>> where id_data() is a function to process the rest of the data relating >> to the id command. Here is the code for that (I copied it from the one >> for the language command, language_data()): >> void nsImapServerResponseParser::id_data() >> { >> // for now, just eat the id data.... >> do >> { >> // eat each language returned to us >> AdvanceToNextToken(); >> } while (fNextToken && !fAtEndOfLine && ContinueParse()); >> }
>> I think this would be really useful to a lot of people using yahoo >> mail, because the imap access works really well. The only problem I >> can see is if a lot of people start using this yahoo might block it. >> But I don't think that is that likely as both freepops and YPOPs use >> this method to download mail form yahoo. So yeah maybe incorporate >> this into thunderbird, or make it an extension.
>> Thanks again, >> Bijan
>> Bijan Soleymani wrote: >>> Thanks David,
>>> I enabled imap logging and removed the code to suppress logging when >>> sending the id command and I also made a call to >>> ParseIMAPandCheckForNewMail(). >>> Here is what the log says: >>> -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:SendData: 2 id >>> ("GUID" "1")^M >>> -1299633264[89925a8]: ReadNextLine [stream=8992e54 nb=84 needmore=0] >>> -1299633264[89925a8]: >>> 8991978:imap.mail.yahoo.com:NA:CreateNewLineFromSocket: * ID ("name" >>> "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55")^M >>> -1299633264[89925a8]: ###!!! ASSERTION: syntax error in generic >>> parser: '!error', file nsIMAPGenericParser.cpp, line 92 >>> -1299633264[89925a8]: ###!!! Break: at file nsIMAPGenericParser.cpp, >>> line 92 >>> -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:PARSER:Internal >>> Syntax Error on line: %s: * ID ("name" "imapgate" "support-url" >>> "http://mail.yahoo.com/" "version" "3.5.55")^M
>>> So it seems thunderbird is having trouble parsing the response to the >>> id command which is: >>> * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" >>> "version" "3.5.55")^M
>>> On the positive side this is the log of the imap packets sent and >>> received (according to tshark): >>> 5.111712 98.136.166.105 -> 96.20.133.9 IMAP Response: * OK IMAP4rev1 >>> server ready (3.5.55) >>> 5.112920 96.20.133.9 -> 98.136.166.105 IMAP Request: 1 capability >>> 5.200712 98.136.166.105 -> 96.20.133.9 IMAP Response: * CAPABILITY >>> IMAP4rev1 LOGIN-REFERRALS AUTH=XYMCOOKIE AUTH=XYMCOOKIEB64 >>> AUTH=XYMPKI AUTH=XYMECOOKIE ID NAMESPACE >>> 8.807688 96.20.133.9 -> 98.136.166.105 IMAP Request: 2 id ("GUID" "1") >>> 8.896215 98.136.166.105 -> 96.20.133.9 IMAP Response: * ID ("name" >>> "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55") >>> 8.897354 96.20.133.9 -> 98.136.166.105 IMAP Request: 3 login >>> "rsoleym...@yahoo.com" "rosa123" >>> 9.291807 98.136.166.105 -> 96.20.133.9 IMAP Response: 3 OK LOGIN >>> completed
>>> which indicates that thunderbird is now sending the LOGIN command at >>> least.
>>> I will try looking into the parser and see what is wrong.
>>> Thanks again, >>> Bijan
>>> David Bienvenu wrote: >>>> Hi Bijan, >>>> First of all, I would not suppress logging, so then you can generate >>>> an imap protocol log and see what the server is responding.
>>>> My guess is that you're not parsing the response of the command, and >>>> confusing our parser in general, because it probably sees the >>>> response from the ID command after sending the LOGIN command and >>>> tries to parse it. So you need to somehow consume the response of >>>> your ID command first, before sending the login command. Usually we >>>> use ParseIMAPandCheckForNewMail() to parse the server response. I >>>> don't know what the server is returning in this case, so I have no >>>> idea if our parser as it is now will be happy with the response.
>>>> - David
>>>> On 9/7/2009 12:08 AM, Bijan wrote: >>>>> Hi,
>>>>> It is possible to access yahoo mail accounts through >>>>> imap.mail.yahoo.com. The problem is that it is necessary to send the >>>>> command: >>>>> ID ("GUID" "1")
>>>>> before the LOGIN command. So to get it to work in thunderbird it would >>>>> be necessary to have thunderbird send this command.
Dan wrote: > Does TB work better with Yahoo IMAP vs Google IMAP???
No, I would say not. It probably works better with Google. Mainly because of the following two issues with Yahoo IMAP: 1. Folders can't have subfolders on Yahoo. Although you can create folders with a . in them, when Thunderbird requests the list of folders the Yahoo IMAP server returns the (\HasNoChildren) flag for every folder. I think this makes Thunderbird display them as separate folders. I could probably check if the user is accessing Yahoo IMAP and alter this behaviour in that case, but I don't know if that's the right thing to do...
2. If you have lots of messages in a folder downloading headers is slow on Yahoo. Of course this is only a problem the first time you open that folder, because Thunderbird caches the headers, so the next time it will only have to download the new headers. I'm assuming GMail is faster at this, however I don't have many messages in my GMail account so I don't know how fast it is for sure.
> Also not only is it possible to receive mail through IMAP from > imap.mail.yahoo.com but it is also possible to send mail through SMTPs > through smtp.mail.yahoo.com. All that is necessary is to choose SSL and > port 465. You can then use your yahoo email address as username along > with your normal webmail password. This also applies to the IMAP, except > that the IMAP does not run over SSL.
> I hope yahoo doesn't disable this. I mean if Gmail can offer IMAP why > not Yahoo?
> Enjoy, > Bijan
> Bijan Soleymani wrote: > > I have uploaded binaries for Thunderbird 2 with yahoo IMAP support > > compiled for Ubuntu (which might work on other Linux distributions) to > > my site: > >http://www.crasseux.com/linux/
> > I am now trying to compile a windows version. It should be up eventually.
> > There is also a binary for mutt with similar support for yahoo IMAP.
> > Bijan
> > Bijan Soleymani wrote: > >> I managed to get it to work. The problem was in: > >> nsImapServerResponseParser.cpp
> >> Specifically the function: > >> nsImapServerResponseParser::response_data()
> >> This is the function that figures out what the response is. It has a > >> switch that deals with each possible command. It didn't know about the > >> id command so flagged it as an error. > >> All I had to do was add: > >> case 'I': > >> if (toupper(fNextToken[1]) == 'D') > >> id_data(); > >> else SetSyntaxError(PR_TRUE); > >> break;
> >> where id_data() is a function to process the rest of the data relating > >> to the id command. Here is the code for that (I copied it from the one > >> for the language command, language_data()): > >> void nsImapServerResponseParser::id_data() > >> { > >> // for now, just eat the id data.... > >> do > >> { > >> // eat each language returned to us > >> AdvanceToNextToken(); > >> } while (fNextToken && !fAtEndOfLine && ContinueParse()); > >> }
> >> I think this would be really useful to a lot of people using yahoo > >> mail, because the imap access works really well. The only problem I > >> can see is if a lot of people start using this yahoo might block it. > >> But I don't think that is that likely as both freepops and YPOPs use > >> this method to download mail form yahoo. So yeah maybe incorporate > >> this into thunderbird, or make it an extension.
> >> Thanks again, > >> Bijan
> >> Bijan Soleymani wrote: > >>> Thanks David,
> >>> I enabled imap logging and removed the code to suppress logging when > >>> sending the id command and I also made a call to > >>> ParseIMAPandCheckForNewMail(). > >>> Here is what the log says: > >>> -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:SendData: 2 id > >>> ("GUID" "1")^M > >>> -1299633264[89925a8]: ReadNextLine [stream=8992e54 nb=84 needmore=0] > >>> -1299633264[89925a8]: > >>> 8991978:imap.mail.yahoo.com:NA:CreateNewLineFromSocket: * ID ("name" > >>> "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55")^M > >>> -1299633264[89925a8]: ###!!! ASSERTION: syntax error in generic > >>> parser: '!error', file nsIMAPGenericParser.cpp, line 92 > >>> -1299633264[89925a8]: ###!!! Break: at file nsIMAPGenericParser.cpp, > >>> line 92 > >>> -1299633264[89925a8]: 8991978:imap.mail.yahoo.com:NA:PARSER:Internal > >>> Syntax Error on line: %s: * ID ("name" "imapgate" "support-url" > >>> "http://mail.yahoo.com/" "version" "3.5.55")^M
> >>> So it seems thunderbird is having trouble parsing the response to the > >>> id command which is: > >>> * ID ("name" "imapgate" "support-url" "http://mail.yahoo.com/" > >>> "version" "3.5.55")^M
> >>> On the positive side this is the log of the imap packets sent and > >>> received (according to tshark): > >>> 5.111712 98.136.166.105 -> 96.20.133.9 IMAP Response: * OK > >>> IMAP4rev1 server ready (3.5.55) > >>> 5.112920 96.20.133.9 -> 98.136.166.105 IMAP Request: 1 capability > >>> 5.200712 98.136.166.105 -> 96.20.133.9 IMAP Response: * CAPABILITY > >>> IMAP4rev1 LOGIN-REFERRALS AUTH=XYMCOOKIE AUTH=XYMCOOKIEB64 > >>> AUTH=XYMPKI AUTH=XYMECOOKIE ID NAMESPACE > >>> 8.807688 96.20.133.9 -> 98.136.166.105 IMAP Request: 2 id ("GUID" > >>> "1") > >>> 8.896215 98.136.166.105 -> 96.20.133.9 IMAP Response: * ID ("name" > >>> "imapgate" "support-url" "http://mail.yahoo.com/" "version" "3.5.55") > >>> 8.897354 96.20.133.9 -> 98.136.166.105 IMAP Request: 3 login > >>> "rsoleym...@yahoo.com" "rosa123" > >>> 9.291807 98.136.166.105 -> 96.20.133.9 IMAP Response: 3 OK LOGIN > >>> completed
> >>> which indicates that thunderbird is now sending the LOGIN command at > >>> least.
> >>> I will try looking into the parser and see what is wrong.
> >>> Thanks again, > >>> Bijan
> >>> David Bienvenu wrote: > >>>> Hi Bijan, > >>>> First of all, I would not suppress logging, so then you can > >>>> generate an imap protocol log and see what the server is responding.
> >>>> My guess is that you're not parsing the response of the command, and > >>>> confusing our parser in general, because it probably sees the > >>>> response from the ID command after sending the LOGIN command and > >>>> tries to parse it. So you need to somehow consume the response of > >>>> your ID command first, before sending the login command. Usually we > >>>> use ParseIMAPandCheckForNewMail() to parse the server response. I > >>>> don't know what the server is returning in this case, so I have no > >>>> idea if our parser as it is now will be happy with the response.
> >>>>> It is possible to access yahoo mail accounts through > >>>>> imap.mail.yahoo.com. The problem is that it is necessary to send the > >>>>> command: > >>>>> ID ("GUID" "1")
> >>>>> before the LOGIN command. So to get it to work in thunderbird it would > >>>>> be necessary to have thunderbird send this command.
can you modify and compile thunderbird 2.0.0.23 pls?