Piler2

Piler (mailpiler) Email Archiving

Piler (mailpiler) is a self-hosted email archive: your mail server sends it a copy of every message, and it deduplicates, indexes and retains them with full-text search, legal hold and audit logs. Open Source Edition is free (GPL-3.0); Linux or Docker.

OSWindows, Linux, macOS
Size90 MB
Version1.4.7
FreeLatest version: 1.4.9Actively developed

Piler, better known by its project name mailpiler, is a self-hosted email archiving server for IT teams that need a searchable, tamper-evident copy of every message sent and received — for compliance, legal hold or simply to find that invoice from four years ago. The Open Source Edition is free (GPL-3.0) and runs on a single Linux server or in Docker; a separate paid Enterprise Edition adds scale-out and support.

Your mail server sends a copy of each message to piler over SMTP. Piler deduplicates and compresses it, optionally encrypts it, indexes the body and attachments, and applies retention rules. Users and auditors then search the archive through a web interface. It works with Postfix, Exchange, Microsoft 365, Google Workspace and anything else that can forward or journal mail.

Piler (mailpiler) Email Archiving at a glance

ItemDetails
Latest version1.4.9 (17 June 2026)
LicenceFree and open source, GPL-3.0 (Open Source Edition); a commercial Enterprise Edition also exists
PlatformsLinux server (Ubuntu 24.04 deb packages, build from source) and Docker; web UI in any modern browser
DeveloperJanos Suto and the mailpiler project
Official websitemailpiler.org
Best forOn-premises email archiving and eDiscovery-style search for small and mid-size organisations

What it does

  • Built-in SMTP receiver (piler-smtp) that accepts journal or BCC copies from your mail server.
  • Message and attachment deduplication plus compression, with optional AES-256 encryption of the store.
  • Full-text search of bodies and attachments via Manticore Search, with simple and expert search modes, saved searches and tags.
  • Archiving and exclusion rules, retention rules, legal hold and digital fingerprinting to verify that stored messages were not altered.
  • Bulk import from EML directories, mbox files, IMAP and POP3 with the pilerimport tool; export and restore via SMTP or IMAP.
  • Authentication against AD/LDAP, IMAP/POP3, Google OAuth2, NTLM/Kerberos SSO and TOTP two-factor authentication.
  • Audit logs of who searched and viewed what, searchable from the admin interface.
  • Ingestion of Google Workspace and Office 365 mail in the Open Source Edition.

How sysadmins use it

Archive all mail passing through Postfix

  1. Set up piler on its own host (for example archive.example.com) and add your domains under Administration > Domain in the web UI.
  2. On the Postfix relay, send a copy of every message to the archive:
    # /etc/postfix/main.cf
    always_bcc = archive@archive.example.com
  3. Make sure mail for archive.example.com is routed straight to the piler host on port 25, then run postfix reload.
  4. Send a test message and search for it in the web UI.

Import historical mailboxes

# a directory of .eml files
pilerimport -d /path/to/dir
# an mbox file
pilerimport -m /path/to/mbox
# an IMAP account, skipping the Drafts folder
pilerimport -i imaps://imap.example.com -u joe -p 'secret' -x draft

pilerimport runs as the piler user, so the current directory must be writable by piler and the source files readable by it. PST files must first be extracted into individual messages with an external tool.

Set retention before the archive grows

  1. Check default_retention_days in /etc/piler/piler.conf; the example configuration uses 2557 days (about seven years).
  2. Add per-domain or per-sender retention rules in the admin UI where your policy differs, and use legal hold when a case requires it.

Let users restore their own mail

Restore works via SMTP by default; point it at your mail server in the web UI configuration:

$config['SMARTHOST'] = 'mail.example.com';
$config['SMARTHOST_PORT'] = '25';

IMAP restore is also available once IMAP authentication is enabled; only regular users (not auditors or admins) can restore that way.

Install and first run

Requirements. The project recommends at least 2 CPU cores, 2 GB RAM and 200 GB of disk. Piler needs MariaDB/MySQL, Manticore Search, a PHP-FPM web server (nginx or Apache) and optionally memcached.

Ubuntu 24.04 package. Install the documented dependencies (nginx, php-fpm and PHP modules, MariaDB, Manticore from its own repository, catdoc, poppler-utils and others), then install the piler .deb with dpkg -i. Run /usr/libexec/piler/postinstall.sh to bootstrap the database and cron jobs, then enable the services:

systemctl enable --now piler
systemctl enable --now piler-smtp
systemctl enable --now pilersearch

Docker. The repository ships a docker-compose.yaml with four containers (MariaDB, Manticore, memcached and the sutoj/piler image). Set the archive hostname and database password, then docker compose up -d. The piler container publishes ports 25 and 80.

First login. The default administrator account is admin@local with the password pilerrocks. Change it immediately and add your domains.

Gotchas. Port 25 must be free on the host (stop any local Postfix or change the listener). Open TCP 25 only to your mail servers, and publish the web UI over HTTPS. Manticore installed from its repository should be stopped and disabled as a standalone service, because piler runs its own pilersearch service.

Limitations

  • Linux only. There is no native Windows installer; on Windows hosts, run it in a Linux VM.
  • The Open Source Edition is single-server: no multi-node scale-out, no S3 object storage and no multi-tenancy.
  • SAML 2.0, passkeys, a REST API, MS Teams archiving, analytics and AI search are Enterprise-only features.
  • No direct PST import.
  • Support for the free edition is community-based (GitHub issues and documentation).
  • It archives what it receives from the moment you connect it; older mail must be imported separately.

Piler vs alternatives

Piler is an archive, not a mail server. It sits next to servers such as MailEnable on Windows or the Docker-based Mailu stack, receiving a copy of their traffic. Commercial cloud archiving services and Microsoft Purview remove the self-hosting work but keep your archive with a third party and charge per mailbox. If you only need to find old messages, a well-backed-up mailbox may be enough. For compliance with retention and audit trails on your own hardware, piler is one of the few mature open-source options.

FAQ

Is mailpiler open source?

Yes. The Open Source Edition is licensed under GPL-3.0 and is free to use. The Enterprise Edition is a separate commercial product with support and extra features.

What is the mailpiler default login?

The initial administrator is admin@local with the password pilerrocks. Change it right after the first login.

How do I install mailpiler with Docker?

Use the docker-compose.yaml from the project repository, set the archive hostname and database credentials, then run docker compose up -d. The stack starts MariaDB, Manticore, memcached and piler.

How do I update mailpiler?

Back up the database, /etc/piler and the message store, install the new package or image, then follow the upgrade notes in the official documentation for that version.

Does mailpiler run on Windows?

No. Piler is a Linux server application; Windows users run it in a Linux VM or container host and use it through the browser.

What is a good mailpiler alternative?

Commercial cloud archives or Microsoft Purview if you want a managed service, or piler’s own Enterprise Edition if you need scale-out and SAML.

Can piler archive Microsoft 365 mail?

Yes. Configure a journal rule or forwarding in Microsoft 365 that sends copies to the piler SMTP address; Office 365 ingestion is listed as supported in the Open Source Edition.

Last checked against official sources: 30 September 2026 (developer website: mailpiler.org). Versions and licence terms change — confirm on the developer's site before deploying in production.

Other articles

Submit your application