2.8 KiB
2.8 KiB
========================================
SMTP Server Management via Web Interface
========================================
The SMTP Server now uses a web-based management interface instead of CLI tools.
Starting the Application
# Start the unified application (SMTP + Web Interface)
python app.py
# Start only the web interface (for management)
python app.py --web-only
# Start only the SMTP server
python app.py --smtp-only
Web Interface Access
- URL: http://localhost:5000/email
- Available management features:
- Domain management
- User authentication management
- IP whitelist management
- DKIM key management with DNS validation
- Email logs and monitoring
- Server settings configuration
Management Tasks via Web Interface
Domain Management
- Navigate to http://localhost:5000/email/domains
- Click "Add Domain" to add new domains
- Configure authentication requirements per domain
- Enable/disable domains as needed
User Management
- Navigate to http://localhost:5000/email/users
- Add users for email authentication
- Associate users with specific domains
- Enable/disable user accounts
IP Whitelist Management
- Navigate to http://localhost:5000/email/ips
- Add IP addresses for authentication-free sending
- Associate IPs with specific domains
- Manage IP access permissions
DKIM Key Management
- Navigate to http://localhost:5000/email/dkim
- Generate DKIM keys automatically when adding domains
- View DNS records that need to be configured
- Check DNS propagation status
- Regenerate keys if needed
Example Setup Workflow
Development Setup
- Start the application:
python app.py --debug - Open browser to: http://localhost:5000/email
- Add domain: localhost.dev
- Add user: dev@localhost.dev with password devpass123
- Add IP: 127.0.0.1 for localhost.dev
- Generate and configure DKIM key
Production Setup
- Start the application:
python app.py - Open browser to: http://localhost:5000/email
- Add your company domain
- Add notification/alert users with strong passwords
- Add your application server IPs to whitelist
- Generate DKIM keys and update DNS records
Database Direct Access (if needed)
# Check domains
sqlite3 email_server/server_data/smtp_server.db "SELECT * FROM domains;"
# Check users
sqlite3 email_server/server_data/smtp_server.db "SELECT email, domain_id FROM users;"
# Check IP whitelist
sqlite3 email_server/server_data/smtp_server.db "SELECT ip_address, domain_id FROM whitelisted_ips;"
# Check DKIM keys
sqlite3 email_server/server_data/smtp_server.db "SELECT domain, selector, active FROM dkim_keys;"
# Check email logs
sqlite3 email_server/server_data/smtp_server.db "SELECT message_id, mail_from, rcpt_tos, status, created_at FROM email_logs ORDER BY created_at DESC LIMIT 10;"