π Major Infrastructure & Viewing Enhancements!
OpenEFA now features automatic relay host management with seamless Postfix integration, plus enhanced email viewing with full authentication headers and improved controls.
Update now:
curl -sSL http://install.openefa.com/install.sh | sudo bash
Today's release brings powerful new capabilities for managing email delivery and viewing, making OpenEFA even more flexible and enterprise-ready.
π¬ Automatic Relay Host Management
OpenEFA now includes a complete relay host management system that automatically configures Postfix transport maps based on domain settings. This allows different domains to route to different relay servers after processing.
Key Features
βοΈ Per-Domain Configuration
- Individual Relay Hosts: Set IP or hostname per domain
- Database Storage: Relay settings in client_domains table
- Web Interface: Add/edit relay hosts through GUI
- Installation Support: Configure during initial setup
π Automatic Updates
- Transport Map: Auto-generates /etc/postfix/transport
- Hash Compilation: Runs postmap automatically
- Postfix Reload: Applies changes immediately
- No Manual Steps: Completely automated workflow
How It Works
- Domain Configuration: Add or edit domain with relay host in web interface
- Database Update: Relay host stored in client_domains table
- Automatic Trigger:
update_postfix_transport()
function called - Transport Generation: Queries database and writes /etc/postfix/transport
- Hash Compilation: Runs
postmap /etc/postfix/transport
- Postfix Reload: Executes
sudo postfix reload
(passwordless via sudoers) - Immediate Effect: New routing active for all incoming emails
Use Cases
Route each client domain to their own mail server after threat filtering
Different departments or business units with separate mail infrastructure
Gradually migrate domains to new servers while maintaining security filtering
Technical Implementation
The relay management system integrates deeply with Postfix:
Database Schema
ALTER TABLE client_domains ADD COLUMN relay_host VARCHAR(255)
Transport Map Format
domain.com smtp:[192.168.1.100]
example.org smtp:[mail.example.org]
Sudoers Configuration
# /etc/sudoers.d/spacy-postfix
spacy-filter ALL=(ALL) NOPASSWD: /usr/sbin/postfix reload
π Enhanced Email Viewing
The email detail view has been completely redesigned with powerful new capabilities for viewing headers, authentication results, and managing emails.
New Features
π§ Authentication Headers
- SPF Results: Sender Policy Framework validation
- DKIM Results: DomainKeys Identified Mail signatures
- DMARC Results: Domain-based authentication
- Full Headers: Complete MIME headers on-demand
β‘ Management Actions
- Release Email: Mark as safe and deliver
- Whitelist Sender: Auto-approve future emails
- Mark as Spam: Block and delete
- Delete: Remove from quarantine
Improved User Interface
Several UI improvements enhance the user experience:
- Collapsible Sections: Email body content in collapsible Bootstrap cards for better performance
- Brief Previews: Quarantine view shows 3-5 line previews instead of full content
- Domain Indicators: Clear visual indication of which domain is being viewed in whitelist management
- User Creation Safety: Domain dropdown defaults to "Select Domain" to prevent accidental wrong assignments
Authentication Data Extraction
The system now extracts authentication headers from raw emails during processing:
# Database columns added
raw_email LONGTEXT # Complete MIME email
original_spf VARCHAR(50) # SPF result
original_dkim VARCHAR(50) # DKIM result
original_dmarc VARCHAR(50) # DMARC result
π₯ Installation & Updates
Fresh Installation
All new features are included in the installer. Simply run:
curl -sSL http://install.openefa.com/install.sh | sudo bash
Updating Existing Systems
The installer automatically handles all database schema updates and configuration changes. No manual intervention required!
π What Gets Updated
- Database schema (relay_host and authentication columns)
- Web interface templates
- Email processing modules
- Postfix transport permissions (spacy-filter:postfix 660)
- Sudoers configuration for Postfix reload
- Database backup privileges (mysql.proc access)
π§ Technical Details
Files Modified
Component | File | Changes |
---|---|---|
Database | schema_v1.sql | Added relay_host, raw_email, auth columns |
Backend | app.py | Added update_postfix_transport() function |
Backend | db_processor.py | Extract SPF/DKIM/DMARC headers |
Templates | domain_management.html | Relay host UI fields |
Templates | email_detail.html | Complete rewrite with collapsible sections |
Templates | quarantine.html | Brief content preview |
Installer | database.sh | Insert relay_host with domains |
Installer | postfix.sh | Permissions and sudoers setup |
Security Considerations
- File Permissions: Transport files owned by spacy-filter:postfix with mode 660
- Sudoers Scope: Limited to single command:
postfix reload
- No Password Required: Automated reload without security compromise
- Ownership Preservation: Python file operations maintain correct permissions
β Testing & Validation
All features have been extensively tested:
β Local Installation
- Fresh install successful
- Domain relay configuration working
- Transport file auto-updates verified
- Email forwarding to relay hosts confirmed
β GitHub Curl Install
- Clean uninstall/reinstall cycle
- All features working as expected
- Authentication headers displaying
- Email actions functional
πΊοΈ What's Next
Future enhancements on the roadmap:
- Enhanced Entities Tab: Improved entity extraction visualization
- AI Summary Improvements: Better natural language email summaries
- Multi-Relay Support: Primary and backup relay hosts per domain
- Transport Testing Tool: Test relay connectivity from web UI
- Advanced Reporting: Relay host usage and delivery statistics
π― Summary
This release brings enterprise-level routing capabilities and significantly improved email viewing to OpenEFA. The automatic relay host management makes multi-tenant and MSP deployments seamless, while the enhanced viewing provides administrators with powerful tools for email investigation and management.
Install or update today and experience the improvements!