Mailoney
Mailoney is a self-hosted SMTP honeypot that imitates a vulnerable mail server to detect and log access attempts, credential harvesting, and other SMTP attac…
What Mailoney is
Mailoney is a self-hosted SMTP honeypot that imitates a vulnerable mail server to detect and log access attempts, credential harvesting, and other SMTP attacks. It accepts connections on port 25 and captures authentication attempts and credentials. Session data can be kept in SQLite, PostgreSQL, or MySQL/MariaDB, or the database can be disabled for event logging only; PostgreSQL is recommended for production. Mailoney can emit JSON Lines events for log shippers, and the project describes forwarding them to SIEM, ELK Stack, or Loki. An optional Prometheus endpoint reports connection, session, credential, command, and duration metrics. Captured email bodies are discarded unless you set `MAILONEY_MAIL_DIR` to save them. Deployment options include Docker and Docker Compose or local Python installation. STARTTLS is available when configured with a certificate and private key, with TLS 1.2 as the minimum. It is free under the MIT License and supports Linux and Windows. The project recommends controlled deployment, limited privileges, and firewall configuration; its unauthenticated metrics endpoint can reveal that it is a honeypot.
Good
- Captures SMTP authentication attempts and credentials
- Supports three database options or event-only logging
- Emits JSON Lines for log shippers
- Optional Prometheus metrics endpoint
- Docker and local Python deployment instructions
Watch out
- Metrics endpoint is unauthenticated
- PostgreSQL is recommended for production
- Captured message bodies are not retained by default
Who it suits
Mailoney is for security teams or administrators who need a self-hosted SMTP decoy and want to route events into logging or monitoring tools. It suits deployments where the operator can manage firewall rules, privileges, and storage.
Verdict
Mailoney provides a focused SMTP honeypot with configurable storage and log forwarding. Keep its deployment controlled, and avoid exposing the unauthenticated metrics endpoint to the internet.
The facts
Each one read from Mailoney's own pages, with the date it was checked.
What it does
- API
- The README suggests extending Mailoney to provide a REST API; it does not describe a built-in API.checked 4 Oct 2026
- Database
- Session data can be stored in SQLite, PostgreSQL, or MySQL/MariaDB; PostgreSQL is recommended for production.checked 4 Oct 2026
- Deployment
- The project documents Docker and Docker Compose deployment, plus local installation from the Python package source.checked 7 Oct 2026
- Latest release
- The releases page lists version 2.1.0 and says it added destination IP and port logging for SMTP sessions.checked 7 Oct 2026
- License
- The repository identifies Mailoney as MIT-licensed.checked 7 Oct 2026
- Log forwarding
- Mailoney can emit JSON Lines events for log shippers and describes forwarding or connecting collected data to SIEM and other security tools.checked 7 Oct 2026
- Log integrations
- JSON Lines event output can be used with log shippers, and the README describes shipping logs to SIEM, ELK Stack, or Loki.checked 4 Oct 2026
- Message retention
- Captured message bodies are discarded by default; setting MAILONEY_MAIL_DIR opts in to saving them as .eml files.checked 7 Oct 2026
- Metrics exposure
- The unauthenticated metrics endpoint binds to loopback by default, and the project warns that exposing it can reveal the software name and version.checked 7 Oct 2026
- Prometheus
- An optional Prometheus /metrics endpoint exposes SMTP connection, session, credential, command, and duration metrics.checked 7 Oct 2026
- Purpose
- Mailoney is a low-interaction SMTP honeypot that simulates a vulnerable mail server to detect and log unauthorized access attempts, credential harvesting, and other SMTP-based attacks.checked 7 Oct 2026
- Security guidance
- The project advises deploying the honeypot in a controlled environment, limiting privileges, and configuring a firewall to prevent misuse.checked 7 Oct 2026
- SMTP capture
- It accepts SMTP connections on port 25 and captures authentication attempts and credentials.checked 4 Oct 2026
- SMTP listener
- It simulates an SMTP server accepting connections on port 25 and captures authentication attempts and credentials.checked 7 Oct 2026
- STARTTLS
- Mailoney supports SMTP STARTTLS when a certificate and matching private key are configured, with TLS 1.2 as the minimum handshake version.checked 7 Oct 2026
- Storage
- Session data can be stored in SQLite, PostgreSQL, or MySQL/MariaDB, and the database can be disabled for event-logging-only operation.checked 7 Oct 2026
- TLS
- The SMTP server supports STARTTLS when both a certificate and private key are configured, with a TLS 1.2 minimum.checked 4 Oct 2026
The company
- Maker
- The GitHub profile identifies the maintainer as Brandon E. and describes his focus as cloud and container security.checked 7 Oct 2026
Alternatives to Mailoney
- 1

Canarytokens
Free planAndroidiOSWebSelf-hosted6.6Free plan - 2
OpenCanary
Free planLinuxmacOSSelf-hosted6.5Free plan - 3
Honeytrap
Free planLinuxSelf-hosted6.2Free plan - 4
KFSensor
Windows6.2From $120 a year - 5

Thinkst Canary
WebAPILinuxmacOS6.2From $7,500 a year - 6
Honeyd
Free planLinuxSelf-hostedWindows6.0Free plan
