Project

General

Profile

Download (2.19 KB) Statistics
| Branch: | Tag: | Revision:
1
# POP3 - Post Office Protocol version 3 (popular e-mail protocol) - RFC 1939
2
# Pattern attributes: great fast fast
3
# Protocol groups: mail ietf_internet_standard
4
# Wiki: http://www.protocolinfo.org/wiki/POP
5
# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
6
#
7
# This pattern has been tested somewhat.
8

    
9
# this is a difficult protocol to match because of the relative lack of 
10
# distinguishing information.  Read on.
11
pop3
12

    
13
# this the most conservative pattern.  It should definitely work.
14
#^(\+ok|-err)
15

    
16
# this pattern assumes that the server says _something_ after +ok or -err
17
# I think this is probably the way to go.
18
^(\+ok |-err )
19

    
20
# more that 90% of servers seem to say "pop" after "+ok", but not all.
21
#^(\+ok .*pop)
22

    
23
# Here's another tack. I think this is my second favorite.
24
#^(\+ok [\x09-\x0d -~]*(ready|hello|pop|starting)|-err [\x09-\x0d -~]*(invalid|unknown|unimplemented|unrecognized|command))
25

    
26
# this matches the server saying "you have N messages that are M bytes",
27
# which the client probably asks for early in the session (not tested)
28
#\+ok [0-9]+ [0-9]+
29

    
30
# some sample servers:
31
# RFC example:        +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
32
# mail.dreamhost.com: +OK Hello there.
33
# pop.carleton.edu:   +OK POP3D(*) Server PMDFV6.2.2 at Fri, 12 Sep 2003 19:28:10 -0500 (CDT) (APOP disabled)
34
# mail.earthlink.net: +OK NGPopper vEL_4_38 at earthlink.net ready <25509.1063412951@falcon>
35
# *.email.umn.edu:    +OK Cubic Circle's v1.22 1998/04/11 POP3 ready <7d1e0000da67623f@aquamarine.tc.umn.edu>
36
# mail.yale.edu:      +OK POP3 pantheon-po01 v2002.81 server ready
37
# mail.gustavus.edu:  +OK POP3 solen v2001.78 server ready
38
# mail.reed.edu:      +OK POP3 letra.reed.edu v2002.81 server ready
39
# mail.bowdoin.edu:   +OK mail.bowdoin.edu POP3 service (iPlanet Messaging Server 5.2 HotFix 1.15 (built Apr 28 2003))
40
# pop.colby.edu:      +OK Qpopper (version 4.0.5) at basalt starting.
41
# mail.mac.com:       +OK Netscape Messaging Multiplexor ready
42

    
43
# various error strings:
44
#-ERR Invalid command.
45
#-ERR invalid command
46
#-ERR unimplemented
47
#-ERR Invalid command, try one of: USER name, PASS string, QUIT
48
#-ERR Unknown AUTHORIZATION state command
49
#-ERR Unrecognized command
50
#-ERR Unknown command: "sadf'".
(87-87/146)