Magma is a fully-featured, commercial-grade email server with support for SMTP, POP3, IMAP, HTTP, and an internal protocol MOLTEN. Support for the DIME ecosystem of advanced encryption protocols is currently in active development. Originally created by Ladar Levison for lavabit.com, Magma has since become a fully free and open source project. Magma's source code is available on Github and anyone who wishes to contribute code or submit bug reports is welcome to do so.
Whether you are an individual, SME, or corporate enterprise, the Lavabit technical team can assist with your implementation and development needs.
Magma has been in development since 2004. While originally created as a competitor to other email services appearing at the time, as Lavabit grew, Magma's focus shifted to providing its users with a more secure email experience.
The v7.0.92 point release is available. This release contains a large number of minor improvements, code cleanup changes reccomended by static analysis tools, and bug fixes. This version also address several minor issues affecting alternative Linux distributions.
Version v7.0.0 has been released. This release contains numerous dependency updates, legacy mail protocol bug fixes and support for DIME compatible password changes. Existing deployments must migrate their database schemas before upgrading.
Another pull request full of unit tests has been merged into the main develop branch, containing more granular checks for several of the network protocols.
A pull request has been merged into the main develop branch containing a large suite of checks for Magma'a JSON interface.
We're excited to announce that Lavabit has received funding from the NLnet foundation's Internet Hardening Fund!
Lavabit relaunches, releasing DIME and Magma to the world. DIME is end-to-end secure, yet flexible enough to allow users to continue using their email without a Ph.D. in cryptology.
All of Magma's source code is hosted publicly on Github
For those looking for a slim virtual machine pre-configured to build and run Magma, consider the following Vagrant boxes which have been created specifically for that purpose. Images have been created to support the VirtualBox, VMware, Hyper-V, Parallels, and libvirt providers. An unstable Docker image is also available. Use the command below with your the provider of choice (vmware, hyperv, parallels, virtualbox, or libvirt) to download and provision a Vagrant instance. The Vagrant virtual machine images will download, check, and launch Magma using the bundled Sandbox configuration.
vagrant init lavabit/magma; vagrant up --provider <vmware, hyperv, parallels, virtualbox, or libvirt>
Virtual machine images, pre-configured to build and run Magma, using alternative Linux distributions can be found here.
These instructions are targeted at systems running
CentOS 6 or
Install the dependencies (make sure that EPEL is enabled):
yum groupinstall -y 'Development Tools' yum install -y mysql-server memcached gettext-devel patch ncurses-devel perl-Time-HiRes libbsd-devel
Note: On Centos7, install the mariadb package instead of mysql-server
To start MySQL and configure the magma username run the commands below. The supplied password should be replaced with value unique to your environment. You may also want to limit the permissions of the magma database user to the database it will need to access. The global permission is only needed to setup the table schema.
service mysqld start chkconfig mysqld on echo "CREATE USER 'magma'@'localhost' IDENTIFIED BY 'volcano';" | mysql -u root echo "GRANT ALL PRIVILEGES ON *.* TO 'magma'@'localhost' WITH GRANT OPTION;" | mysql -u root
To start Memcached run the commands below.
service memcached start chkconfig memcached on
Magma may be built simply by running the
make command in the project's root directory, which will automate
most of the steps below. If you want more control over the build process you may follow the steps below.
To link up the development and build scripts run the linkup.sh. This will create a bin folder in your home directory, if it doesn't already exist, and create symbolic links to the scripts and tools used to build, run and test magma. The commands below assume the bin directory is in your PATH. If it isn't, or you simply don't want to create the symbolic links, you can also run the shell scripts directly from their location in the dev/scripts folder. To execute the linkup.sh script:
To build the dependencies and create the magmad.so library separately, run the build.lib script. Run the script without any parameters to see the possible command line options. To compile and combine all of dependencies in a single operation:
The bundled Makefile can be used to compile magma. It will detect when the dependencies haven't been compiled and run the preceeding step automatically, if necessary, as the Makefile looks for required header files in folders created by the previous step. If the Makefile has trouble finding the necessary include files, odds are its because the previous step didn't run properly. Assuming the dependencies are available, you can compile magmad and magmad.check using:
To setup a sandbox database which can be used to run the unit tests, or experiment with magma, run (assuming the development userid is setup with permission to your database):
To launch the magma unit tests, or magma using the sandbox configuration, run:
To download the ClamAV virus definitions into the sandbox environment, run:
Magma's source code is available on Github, and anyone who wishes to contribute code or submit bug reports is welcome to do so.
Changes, fixes, or updates to the Magma codebase can be submitted via
pull requests on the
Github repository against the develop branch.
Please make sure your code follows the preferred programming style for this project.
Bug reports may be submitted as
issues on the Github repository. When submitting an issue,
make sure to include:
Donations of any amount support the development of Magma and help make the next-generation of private and secure email a reality. Thank you!