views:

138

answers:

1

I wrote a program for retrieving mail from POP3 servers. One of its users encounters the following problem...

His mail server when my program connects to it issues a greeting:

+OK Lotus Notes POP3 server version X2.0 ready <PrintableCharacters.UnprintableCharacters>

The part in angle brackets is a so-called challenge for the APOP authorization. The challenge (and all other strings in POP3 protocol) typically only contains ASCII characters. But this time the challenge is composed of two parts - the second one contains non-printable characters. The pattern is the following: first 0x5, then some non-ASCII character. This looks like special encoding introduced by Lotus Notes developers.

When I extract the challenge as-is and use it for APOP authentication the server declines.

After carefully reading all I could find on LMBSC I deducted the following. The 0x5 is a prefix to indicate so-called "Group 5" characters. Each character is in fact a Win-1251 character but is prepended by 0x5.

With that I just stripped away all 0x5's only leaving legal ASCII and non-printable Win-1251 and passed those into usual APOP authentication algorithm. However the server declines.

Is that the right way to decode LMBSC with Win-1251 characters or is that a problem on the server side?

+1  A: 

I checked some domino servers (7.x, 8.x), and didn't find a APOP timestamp in the server greeting. Then I Googled and found this: POP3 authentication failure using APOP commands

It seems like the Domino POP server doesn't support APOP, but versions prior to 6.5.5 presents a timestamp in the greeting anyway.

Anders Lindahl
Looks promising and so I wrote to IBM with an inquiry. My concern is that at the bottom of the message is the text "This regression was introduced in 6.0" which means that prior to 6.0 the problem was not there. Do you know how X2.0 is related (newer/older) to 6.0 and 6.5?
sharptooth
I checked with an Domino 5.x server, and that POP3 server introduced itself as "X2.0". However, I couldn't see the timestamp in the greeting there either. On Domino 7 and 8, the version presented in the greeting seems to be that of Domino, not of the POP3 subsystem.
Anders Lindahl
We inquired what Lotus server the customer had - it was 6.5.4 which is in the range of versions affected by exactly this regression. They upgraded and now the problem is gone. Thanks a lot for providing data on how different versions present themselves in the POP3 greeting.
sharptooth