Step 0 : Purchase new VPS, if required. If you already have a VPS running Nginx with PHP enabled, skip to Step 4.
Step 1 : Install Debian and slim down your shiny new VPS (inspired by the famous article on LEB and lowendscript)
wget --no-check-certificate https://github.com/lowendbox/lowendscript/raw/master/setup-debian.sh
bash setup-debian.sh system
Step 2 : Install Nginx with the lowendscript
bash setup-debian.sh nginx
Step 3 : Install PHP5 with the lowendscript
bash setup-debian.sh php
Step 4 : Configure your webserver
In /etc/nginx/sites-available/, create a file such as yourfqdn.tld. The contents of this file should be something similar to this basic php enabled website configuration:
server {
server_name yourfqdn.tld;
root /path/to/your/document/root/;
include /etc/nginx/fastcgi_php;
location / {
index index.php;
}
}
Symlink your configuration file to the sites-enabled folder.
ln –s /etc/nginx/sites-available/yourfqdn.tld /etc/nginx/sites-enabled/yourfqdn.tld
Restart nginx so it's ready to accept the newly configured site.
/etc/init.d/nginx restart
Step 5 : Install Hastymail2
Follow the simple instructions at http://www.hastymail.org/install.
Note that on a typical Debian distribution, the webserver runs as www-data.
Step 5 : Fire up your browser and point it to your newly installed Hastymail2 installation and voila!
Have fun with a lightweight, full featured IMAP/SMTP PHP webmail client without wasting precious low end VPS resources on a database engine!
See feature set at http://www.hastymail.org/.