MailBridge: Modern Form Submission & Email Response System
MailBridge is a powerful, secure, and efficient system designed to handle form submissions and automate email responses. Built with FastAPI and Docker, it provides a robust solution for managing contact forms and email communications on your website.
Key Features
FastAPI Backend: High-performance asynchronous API for handling form submissions
Docker Containerization: Easy deployment and scaling
Redis Integration: Rate limiting and caching for enhanced security
iCloud SMTP Integration: Reliable email delivery using iCloud’s infrastructure
Automated Email Responses: Customizable templates for different types of inquiries
Form Submission Handling: Secure processing of contact form data
Rate Limiting: Protection against spam and abuse
CORS Support: Secure cross-origin resource sharing
Gzip Compression: Optimized data transfer
CAPTCHA Support: Optional integration with reCAPTCHA or hCaptcha
Multiple Email Alias Support: Manage multiple email addresses from a single instance
How It Works
MailBridge operates as a two-part system:
Form Handler: Processes incoming form submissions from your website
Email Daemon: Monitors and responds to incoming emails
Form Submission Flow
User submits a contact form on your website
Form data is securely sent to MailBridge’s API
MailBridge validates the submission and applies rate limiting
The submission is processed and sent via iCloud SMTP
A copy is saved to the Sent Messages folder
Email Response Flow
MailBridge monitors specified email accounts
When a new email arrives, it’s processed based on predefined rules
Appropriate response templates are selected based on the email subject
Automated responses are sent using iCloud SMTP
All responses are saved to the Sent Messages folder
Setup and Configuration
Prerequisites
Docker and Docker Compose
iCloud account with app-specific password
Domain with SSL certificate
(Optional) CAPTCHA service (reCAPTCHA or hCaptcha)
Configuration Files
config.yml: Defines form settings and allowed domains
responses.json: Contains email templates and response configurations