An ultra lightweight mail sink supporting TLS with HTTP API, embedded database and a panel. Mostly used to massively verify email addresses on some site or for account generation.
Mail Sink is a simple mail server that accepts any incoming email and stores it in a database. It provides an HTTP API to retrieve and delete the stored emails. It can be used for testing email sending functionality in your application, or for mass email verification and account generation.
- Supports incoming email storage.
- HTTP API for retrieval and deletion of stored emails.
- TLS support.
- Embedded database.
- Useful panel
- Mails preview
- Really low memory and CPU usage.
You can download the latest release from the releases page. Extract the binary and run it from your terminal.
To build Mail Sink from source, follow these steps:
- Ensure you have Rust installed.
- Clone the repository:
git clone https://github.com/UwUDev/mail-sink.git
- Navigate to the project directory:
cd mail-sink
- Build the project:
cargo build --release
- The built binary will be in
target/release/
.
Run Mail Sink with default settings:
./mail-sink
Run Mail Sink with specific options:
./mail-sink [options]
short | long | value | description |
---|---|---|---|
-h | --help | Show help message. | |
-p | --smtp-port | SMTP PORTS | Set the SMTP port. Default: 2525 Example: 25,587,465 |
--http-port | HTTP PORT | Set the HTTP port. Default: 8080 |
|
-k | --key | KEY | The key to access the API. Default: prouteur |
-V | --version | Print version. |
The panel is accessible via /panel?k=your_key
Mails can be openned via panel (by clicking the 👁) or by opening /preview/[email protected]?k=your_key
The HTTP API is accessible by adding ?k=your_key
to the URL.
-
Retrieve bulk stored emails (JSON format):
GET /mails
Pagination params:
?limit
: The maximum amount of returned mails (default 10)?offset
: The pagination offset (default: 0)
-
Retrieve a specific email (JSON format):
GET /mails/<mail_id>
-
Retrieve all emails sent to a specific email address (JSON format):
GET /mails/to/<email_address>
Pagination params:
?limit
: The maximum amount of returned mails (default 10)?offset
: The pagination offset (default: 0)
-
Retrieve all emails sent from a specific email address (JSON format):
GET /mails/from/<email_address>
Pagination params:
?limit
: The maximum amount of returned mails (default 10)?offset
: The pagination offset (default: 0)
-
Delete a specific email:
DELETE /mails/<email>
-
Delete all stored emails:
DELETE /mails
-
Delete all emails from:
DELETE /mails/from/<email_address>
-
Delete all emails to:
DELETE /mails/to/<email_address>
Port numbers under 1024 require root privileges. If you want to use a port number lower than 1024, you can use a reverse proxy like Nginx or Apache to forward the traffic to the Mail Sink server running on a higher port number.