Watney is a a free (as in air to breathe), lightweight, open-source Mail-Client for IMAP Mail-Servers written in Go. It pulls mails from the given IMAP server, displays them in a web app and allows to send mails via SMTP. For everybody who read The Martian by Andy Weir: Yes, that's the inspiration for the project's name. Let's cross fingers it's as resistant as Mark Watney.
"I mean obviously dude, there's plenty of stuff out there: horde, webmailLite,
mailpile. Just to name a couple of free ones. Not even talking about all the proprietary
ones."
First of all: Because I can.
Secondly, there's a couple of reasons here:
- Most of them run on interpreted scripts, such as PHP and Python. Enough said!
- Seriously, they run on scripts such as PHP or Python, which requires your server to have these environments. Older servers might not support the current PHP or Python version. However, Go programs can be compiled to native binaries for a target platform, which prevents this issue (at least to a certain degree).
- It'd be nice to improve on the "just get me my mails" approach to "Can I also see my IMs from various messengers" thing. Basically an information hub, that aggregates all different information channels I'm forced to use.
- Have a "one-site" main application approach to improve performance and user-experience.
To Build Watney (on your dev machine):
- Gradle at least version 2.0 (to execute the build script)
- Python at least version 2.7.9 (to create closure dependency files with the google closure tools)
- Java at least version 1.7 (to compile JS files with the google closure tools)
- Go at least version 1.4.2 (to compile watney into an executable)
Make sure python, gradle, java and go can be executed on your command line.
Note: Please make sure, that GOPATH is set accordingly, as described here.
To Run Watney (on your server):
- IMAP Server to pull your mails
- SMTP Server to send mails
- No other requirements (Once Watney is a compiled executable, no additional requirements are necessary to run it.)
- Download the watney sources from github:
$ go get github.com/mdrobek/watney
- Switch to the watney source dir:
$ cd $GOPATH/src/github.com/mdrobek/watney
- Build watney (this takes care of pulling in all dependencies as well):
$ gradle buildWatney
Watney requires a configuration file on application start. A template has been provided, which
needs to be copied and filled with your specific information:
$ cp conf/watney-templ.ini conf/your-conf.ini
Please adjust the config file accordingly to your specific needs (it should be self-explanatory).
Watney can now be started as follows:
$ watney -c conf/your-conf.ini
Credits to whom credits belong. The following frameworks and code snippets provided a solid basis for watney and simplified the development process:
- martini Powerful web framework
- martini-contrib Various plugins for martini, e.g., binding, render, sessionauth and so on
- goimap IMAP implementation for go by mxk
- smtp mail Simple wrapper to send mail via SMTP for go by scorredoira
- godep Extremely helpful tool to download all go dependencies by Keith Rarick
- google closure Very powerful tools and libraries to improve overall web-dev and user experience
- bootstrap Duh! Obviously.
- gradle Amazing and powerful software management tool (build tool).
- dafont Provides nice fonts (also the 'Battlestar' font for Watney)