I've a virtual server not a ksm but with lighttpd and mysql and postfix. Can I use it to replace my existing free webmail and what is a good software? I also want to use pgp if it's possible?
Horde's IMP features GPG/PGP encryption as well as S/MIME support. It's rather a somewhat more complex framework (in which IMP is just one application), but in my opinion, it has a fairly high quality standard and good user experience compared to most other open source webmail software.
Rainloop, hands down. Website here. Screenshot below.