Fork/Hack on Pony Mail

Apache Pony Mail™ (Incubating)

Installing Pony Mail on CentOS 7.1:

This installation is a bit trickier, as CentOS does not have Python 3 or any of the lua modules in its default package system.

Start by installing the following CentOS packages:

sudo yum install -y httpd git lua lua-devel gcc gcc-c++ kernel-devel unzip openssl openssl-devel readline-devel

Then, proceed to build LuaRocks (for lua deps):

tar zxvf luarocks-2.0.6.tar.gz                                             
cd luarocks-2.0.6                                                               
sudo make install

Now build/install the required Lua modules:

sudo luarocks install lua-socket
sudo luarocks install luasec OPENSSL_LIBDIR=/usr/lib64/
sudo luarocks install lua-cjson

Configure, compile and install Python 3:

sudo yum groupinstall -y development
sudo yum install -y zlib-dev sqlite-devel bzip2-devel xz-libs
xz -d Python-3.4.3.tar.xz
tar zvf Python-3.4.3.tar
cd Python-3.4.3/
sudo make altinstall

Install the required Python 3 modules:

sudo pip3.4 install elasticsearch formatflowed chardet netaddr

Install ElasticSearch:

sudo yum install -y java-1.7.0-openjdk-headless
sudo rpm --import

    (The following is taken from the ElasticSearch online guide:)

    Add the following in your /etc/yum.repos.d/ directory in a file with a .repo suffix,
    for example elasticsearch.repo:

    name=Elasticsearch repository for 1.7.x packages

sudo yum update
sudo yum install elasticsearch

Configure and start up ElasticSearch:

sudo sudo /bin/systemctl daemon-reload
sudo sudo /bin/systemctl enable elasticsearch.service
sudo /etc/init.d/elasticsearch start

Check out a copy of Pony Mail:

cd /var/www
git clone

Set up Pony Mail:

cd /var/www/ponymail/tools
[... answer questions asked by the setup script ...]

Set up Apache httpd by adding, for example, the following virtual host configuration: This differs from the normal installation (because of CentOS specifics), so beware

    LuaPackageCPath /usr/local/lib/lua/5.1/?.so
    LuaPackagePath  /usr/local/share/lua/5.1/?.lua
    DocumentRoot /var/www/ponymail/site
    AddHandler      lua-script .lua
    LuaScope        thread
    LuaCodeCache    stat
    AcceptPathInfo  On

(re)start apache:

sudo apachectl restart

Once this is done, you should now have a working copy of Pony Mail!

You may wish to tweak the settings in site/js/config.js and your elasticsearch settings once Pony mail is up and running.

Refer to the General installation documentation for detailed information about archiving messages, OAuth, mail settings and much more.


Apache Pony Mail (Incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Apache Incubator
About the ASF
Code of Conduct
Become a Sponsor