Mailpile's primary user interface is web-based, but it also has a basic command-line interface and an API for developers. Using web technology for the interface allows Mailpile to function both as a local desktop application (accessed by visiting localhost in the browser) or a remote web-mail on a personal server or VPS.
The core of Mailpile is a fast search engine, custom written to deal with large volumes of e-mail on consumer hardware. The search engine allows e-mail to be organized using tags (similar to GMail's labels) and the application can be configured to automatically tag incoming mail either based on static rules or bayesian classifiers.
So far, it's only designed for personal use. It's not yet suited for implementing webmail for, say, a couple of friends sharing a server.
The Debian project's canonical list of groupware available for Debian.
A shell script that turns a brand-new VPS or server into a mail server with a single command. Sets up webmail, IMAP, SMTP, a contacts application, a calendar, and even a web-based control panel for the whole shebang. Includes spam filtering, greylisting, backing up, and TLS certs for everything from Let's Encrypt. Even does virtual domains. No configuration during setup, and you can't really tweak the settings once it's up and running.
Github: https://github.com/mail-in-a-box/mailinabox