How can I receive and send email in python? A 'mail server' of sorts.
I am looking into making an app that listens to see if it receives an email addressed to foo@bar.domain.com, and sends an email to the sender.
Now, am I able to do this all in python, would it be best to use 3rd party libraries?
I do not think it would be a good idea to write a real mail server in Python. This is certainly possible (see mcrute's and Manuel Ceron's posts to have details) but it is a lot of work when you think of everything that a real mail server must handle (queuing, retransmission, dealing with spam, etc).
You should explain in more detail what you need. If you just want to react to incoming email, I would suggest to configure the mail server to call a program when it receives the email. This program could do what it wants (updating a database, creating a file, talking to another Python program).
To call an arbitrary program from the mail server, you have several choices:

For sendmail and Postfix, a ~/.forward containing "|/path/to/program"
If you use procmail, a recipe action of |path/to/program
And certainly many others
Receive and send emails in python