Lots of changes: added blacklist and stats via sqlite database, cleaned the code (including comments), and minor changes on SMTP module. Both SMTP and XMPP tested. This is the code that will be submitted to melange.