P3SS: POP3 Test Server

As a part of my work to automate testing for P3SS (POP3 to SMTP Server) I have been building a POP3 server that P3SS can run against and I can easily set and inspect the state of as well as introduce errors and ‘bugs’.

I am happy to announce that the source code for the first version of this POP3 test server is available on Codeplex!

This is a basic, but fully RFC 1939 compliant POP3 server that is designed to make unit and functional testing of POP3 clients much easier. At present it supports:

  • Proper TCP support, including custom ports (110 is default)
  • Multiple clients (through multi-threading), with per client:
    • Usernames and passwords
    • Adding mail items and checking if they have been deleted and collected
  • Most POP3 Commands:
    • USER, PASS
    • APOP
    • DELE
    • LIST, STAT
    • NOOP (Note: NOOP is implemented such that it will respond even if the client is not logged in – which is against RFC specs)
    • RETR
    • RSET
    • QUIT
    • UIDL
  • Unit tests for all functionality
  • A simple base on which to build your own test servers (an echo server is also provided)

I am now working to add CAPA and encryption (both implicit and STLS). The addition of encryption may mean that I will have to rebuild part of the networking code, so you may see that the next version uses the Async CTP and (hopefully) does less low-level networking\stream\byte array code. Once the POP3 test server is complete and stabilized, I will move onto a test SMTP server, then add abilities to introduce errors and non-compliance into both (while also adding some tests for P3SS in between).

In the mean time, the code is available for one and all to use! And let me know (either on Codeplex or via email) if you have any feedback or suggestions.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: