1
0

pop3.pat 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # POP3 - Post Office Protocol version 3 (popular e-mail protocol) - RFC 1939
  2. # Pattern quality: good veryfast
  3. #
  4. # This pattern has been tested somewhat. If it does not
  5. # work for you, or you believe it could be improved, please post to
  6. # l7-filter-developers@lists.sf.net . This list may be subscribed to at
  7. # http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
  8. # this is a difficult protocol to match because of the relative lack of
  9. # distinguishing information. Read on.
  10. pop3
  11. # this the most conservative pattern. It should definitely work.
  12. #^(\+ok|-err)
  13. # this pattern assumes that the server says _something_ after +ok or -err
  14. # I think this is probably the way to go.
  15. ^(\+ok |-err )
  16. # more that 90% of servers seem to say "pop" after "+ok", but not all.
  17. #^(\+ok .*pop)
  18. # Here's another tack. I think this is my second favorite.
  19. #^(\+ok [\x09-\x0d -~]*(ready|hello|pop|starting)|-err [\x09-\x0d -~]*(invalid|unknown|unimplemented|unrecognized|command))
  20. # this matches the server saying "you have N messages that are M bytes",
  21. # which the client probably asks for early in the session (not tested)
  22. #\+ok [0-9]+ [0-9]+
  23. # some sample servers:
  24. # RFC example: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
  25. # mail.dreamhost.com: +OK Hello there.
  26. # pop.carleton.edu: +OK POP3D(*) Server PMDFV6.2.2 at Fri, 12 Sep 2003 19:28:10 -0500 (CDT) (APOP disabled)
  27. # mail.earthlink.net: +OK NGPopper vEL_4_38 at earthlink.net ready <25509.1063412951@falcon>
  28. # *.email.umn.edu: +OK Cubic Circle's v1.22 1998/04/11 POP3 ready <7d1e0000da67623f@aquamarine.tc.umn.edu>
  29. # mail.yale.edu: +OK POP3 pantheon-po01 v2002.81 server ready
  30. # mail.gustavus.edu: +OK POP3 solen v2001.78 server ready
  31. # mail.reed.edu: +OK POP3 letra.reed.edu v2002.81 server ready
  32. # mail.bowdoin.edu: +OK mail.bowdoin.edu POP3 service (iPlanet Messaging Server 5.2 HotFix 1.15 (built Apr 28 2003))
  33. # pop.colby.edu: +OK Qpopper (version 4.0.5) at basalt starting.
  34. # mail.mac.com: +OK Netscape Messaging Multiplexor ready
  35. # various error strings:
  36. #-ERR Invalid command.
  37. #-ERR invalid command
  38. #-ERR unimplemented
  39. #-ERR Invalid command, try one of: USER name, PASS string, QUIT
  40. #-ERR Unknown AUTHORIZATION state command
  41. #-ERR Unrecognized command
  42. #-ERR Unknown command: "sadf'".