Skip to content

Ultra lightweight mail sink supporting TLS with HTTP API, embedded database and a panel. Mostly used to massively mail verify on some site / account genning

Notifications You must be signed in to change notification settings

UwUDev/mail-sink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mail Sink

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.

Table of Contents

Overview

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.

Features

  • 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.

Installation

You can download the latest release from the releases page. Extract the binary and run it from your terminal.

Building

To build Mail Sink from source, follow these steps:

  1. Ensure you have Rust installed.
  2. Clone the repository:
    git clone https://github.com/UwUDev/mail-sink.git
  3. Navigate to the project directory:
    cd mail-sink
  4. Build the project:
    cargo build --release
  5. The built binary will be in target/release/.

Usage

Run Mail Sink with default settings:

./mail-sink

Run Mail Sink with specific options:

./mail-sink [options]

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.

Panel

The panel is accessible via /panel?k=your_key

image

Open mail

Mails can be openned via panel (by clicking the 👁) or by opening /preview/some.mail@test.com?k=your_key

API Access

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>
    

Notes

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.

About

Ultra lightweight mail sink supporting TLS with HTTP API, embedded database and a panel. Mostly used to massively mail verify on some site / account genning

Resources

Stars

Watchers

Forks

Packages

No packages published