November 2008

POP3 on the command line

You sometimes find the need to run a protocol dialogue on the command line via telnet. I recently had to do this for POP3. In fact it's quite simple if you follow the example below where lines starting with a plus are responses from the server:

  1. telnet my.pop.server 110
  2. Trying 123.456.789.123...
  3. Connected to my.pop.server.
  4. Escape character is '^]'.
  5. +OK Hello there.
  6. user user@my.pop.server
  7. +OK Password required.
  8. pass secret
  9. +OK logged in.
  10. list
  11. +OK POP3 clients that break here, they violate STD53.
  12. 1 2213
  13. 2 2823
  14. .
  15. retr 1
  16. +OK 2213 octets follow.
  17. [email content]
  18. .