Skip to content

flurdy/sortingoffice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Sorting Office

A modern web-based admin tool for managing mail server data based on flurdy's "How to set up a mail server on a GNU / Linux system".

Table of Contents

Versions

  • v3: The current Rust based setup
  • v1: The original Play Framework with Scala based setup, refer to the git tag v1

Quick Start

The easiest way to run Sorting Office is using Docker:

# Clone and start
git clone <repository-url>
cd sortingoffice
chmod +x docker.sh
./docker.sh build
./docker.sh up

Access at http://localhost:3000 (admin/admin)

For detailed installation instructions, see ONBOARDING.md.

Features

  • Domain Management: Add, edit, and remove mail domains with quota and transport settings
  • User Management: Manage mail users with password hashing and quota allocation
  • Alias Management: Create and manage email aliases for forwarding
  • Statistics Dashboard: View system-wide and per-domain statistics
  • Modern UI: Built with Tailwind CSS for a clean, responsive interface
  • Dark Mode Support: Toggle between light and dark themes
  • HTMX Integration: Dynamic updates without full page reloads
  • Secure Authentication: Role-based access control with multiple admin support

Technology Stack

  • Backend: Rust with Axum web framework
  • Database: MySQL with Diesel ORM
  • Frontend: HTMX for dynamic interactions
  • Styling: Tailwind CSS for modern UI
  • Templates: Askama template engine
  • Authentication: bcrypt password hashing

Prerequisites

  • Rust 1.70+ and Cargo
  • MySQL 8.0+ or MariaDB 10.5+
  • Diesel CLI

For detailed setup instructions, see ONBOARDING.md.

Development

Quick Commands

# Run tests
make test

# Run UI tests
make test-ui

# Database management
make db-help

# Health checks
./scripts/health-check.sh

# Makefile section help
make help
make docker-help
make dev-help
make test-help
make db-help
make tunnel-help
make code-help

Project Structure

  • src/ - Rust application code
  • templates/ - HTML templates
  • migrations/ - Database migrations
  • docs/ - Detailed documentation
  • tests/ - Test suites

For detailed development information, see the documentation in the docs/ directory.

Documentation

Security

  • Role-based authentication with multiple admin support
  • bcrypt password hashing
  • SQL injection protection via Diesel ORM
  • Comprehensive security headers
  • HTTPS ready

For detailed security information, see AUTHENTICATION.md.

Production Deployment

  1. Set production environment variables
  2. Use production MySQL/MariaDB instance
  3. Configure reverse proxy (nginx/Apache)
  4. Enable HTTPS with proper certificates
  5. Set up regular database backups

For detailed deployment information, see DATABASE_BACKUP.md.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

For detailed contribution guidelines, see CONTRIBUTING.md and CONTACT.md.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Sponsor this project

 

Packages

No packages published