参考http://www.faqs.org/rfcs/rfc1939.html.
------
截取片段原文:
  APOP name digest
      Arguments:
          a string identifying a mailbox and a MD5 digest string
          (both required)      Restrictions:
          may only be given in the AUTHORIZATION state after the POP3
          greeting or after an unsuccessful USER or PASS command
         Examples:
             S: +OK POP3 server ready <[email protected]>
             C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
             S: +OK maildrop has 1 message (369 octets)             In this example, the shared  secret  is  the  string  `tan-
             staaf'.  Hence, the MD5 algorithm is applied to the string                <[email protected]>tanstaaf             which produces a digest value of                c4c9334bac560ecc979e58001b3e22fb
我是发到pop3.zj.com的。
收到POP3 greeting后直接APOP md5string就返回-ERR bad login (-17);
“or after an unsuccessful USER or PASS command”
我也试着先发user和错误的pass,返回失败后再发apop.还是失败,不过返回稍有改变:incorrect state (-40)Restrictions里面不是已经说的很清楚了吗?md5("<[email protected]>我的密码") == "dbefa29ed14c15a9adbeddda215276fb"
附日志:
===================
Rec: +OK POP3 Welcome to quarkmail server version 1.2.1 <[email protected]>
Cmd: APOP fbug dbefa29ed14c15a9adbeddda215276fb
Rec: -ERR bad login (-17)
Cmd: QUIT
Rec: +OK Quit
-------------------
Rec: +OK POP3 Welcome to quarkmail server version 1.2.1 <[email protected]>
Cmd: APOP fbug da70efea2d874426b7bd10c317b8d538
Rec: -ERR bad login (-17)
Cmd: USER fbug
Rec: +OK User name accepted, password please
Cmd: PASS a420384997c8a1a93d5a84046117c2aa  //ps:故意发个错误密码
Rec: -ERR password was wrong (-15)
Cmd: APOP fbug da70efea2d874426b7bd10c317b8d538
Rec: -ERR incorrect state (-40)
Cmd: QUIT
Rec: +OK Quit