175 Commits

Author SHA1 Message Date
6ee1d6e917 feat(ops-dashboard): implement OpsServer and dashboard component with initial rendering 2025-06-01 19:46:10 +00:00
f877ad9676 fix(dependencies): add ui catalog for minimal local dashboard with statistics. 2025-05-31 16:34:39 +00:00
fe817dde00 feat(logging): add professional startup logging to DcRouter
- Add logStartupSummary() method with clean ASCII art header
- Display service status for SmartProxy, Email, DNS, and Storage
- Show detailed configuration info for each service
- Replace verbose console logs with structured startup summary
2025-05-31 15:58:56 +00:00
272973702e feat(dns): implement DKIM record serving and proactive key generation
- Add loadDkimRecords() method to read DKIM records from JSON files
- Integrate DKIM records into DNS server during startup
- Add initializeDkimForEmailDomains() for proactive DKIM key generation
- Ensure DKIM records are available immediately after server startup
- Update documentation with DKIM implementation status

DKIM records are now automatically loaded from .nogit/data/dns/*.dkimrecord.json
and served via DNS. Keys are generated for all configured email domains at startup.
2025-05-31 12:53:29 +00:00
c776dab2c0 fix(nameservers): fix ip records 2025-05-30 20:11:44 +00:00
74692c4aa5 fix(dns): Fixed Soa records 2025-05-30 19:54:48 +00:00
71183b35c0 fix(dns): register separate handlers for each DNS record to serve multiple records
The previous implementation grouped records by domain and only returned the first
matching record. This prevented serving multiple NS records for a domain, which
caused GoDaddy to reject the nameservers.

Changes:
- Modified registerDnsRecords to register a separate handler for each record
- This works around smartdns limitation where it breaks after first handler match
- Now all NS records are properly served in DNS responses
- Added readme.smartdns.md documenting the underlying issue in smartdns module

The root cause is in smartdns DnsServer which breaks after finding the first
matching handler, preventing multiple records of the same type from being served.
2025-05-30 16:44:10 +00:00
ae73de19b2 fix(dns): update DnsManager to use new DNS configuration properties
The DnsManager was still checking for the old dnsDomain property that was
replaced by dnsNsDomains and dnsScopes in the DNS Architecture Improvements.

Changes:
- Replace dnsDomain checks with dnsNsDomains and dnsScopes validation
- Add check to ensure email domain is included in dnsScopes array
- Update NS delegation check to work with multiple nameservers
- Update error messages to guide users to the new configuration format
2025-05-30 16:26:31 +00:00
a2b413a78f fix(test): repair SMTP test suite after rate limiter integration
The test helper's mock email server was missing the getRateLimiter() method
that was added during the rate limiting feature implementation. This caused
all SMTP tests to fail with "getRateLimiter is not a function" error.

Changes:
- Add getRateLimiter() method to mock email server that returns a mock rate limiter
- Update mock rate limiter method signatures to match actual implementation
- Fix TypeScript type issue with auth options by adding explicit casting
2025-05-30 16:17:02 +00:00
739eeb63aa update 2025-05-30 15:04:12 +00:00
eb26a62a87 fix(config): Update dns config interface within DcRouter 2025-05-30 10:34:50 +00:00
ad0ab6c103 test(dns): add comprehensive tests for DNS record creation
- Add test.dns-manager-creation.ts to verify DNS record creation
- Test MX, SPF, DMARC, and DKIM record registration
- Verify records are stored in StorageManager
- Update readme.hints.md with DNS architecture refactoring notes
2025-05-30 09:29:03 +00:00
37e1ecefd2 refactor(dns): extend DnsValidator to DnsManager with DNS record creation
- Rename DnsValidator to DnsManager to better reflect its expanded responsibilities
- Move DNS record creation logic from UnifiedEmailServer to DnsManager
- Add ensureDnsRecords() method that handles both validation and creation
- Consolidate internal DNS record creation (MX, SPF, DMARC) in one place
- Keep DKIM key generation in UnifiedEmailServer but move DNS registration to DnsManager
- Update all imports and tests to use DnsManager instead of DnsValidator
- Improve code organization and discoverability of DNS functionality
2025-05-30 08:52:07 +00:00
e6251ab655 docs(readme): update documentation with StorageManager and domain configuration features
- Add flexible storage system section with backend examples
- Document email domain configuration with DNS modes
- Update configuration interfaces with storage options
- Add examples for filesystem, custom, and memory storage
- Include data migration examples between backends
- Document storage usage patterns and key structure
- Update test suite documentation with new test categories
2025-05-30 07:06:00 +00:00
53b64025f3 feat(storage): implement StorageManager with filesystem support and component integration
- Add StorageManager with filesystem, custom, and memory backends
- Update DKIMCreator and BounceManager to use StorageManager
- Remove component-level storage warnings (handled by StorageManager)
- Fix list() method for filesystem backend
- Add comprehensive storage and integration tests
- Implement DNS mode switching tests
- Complete Phase 4 testing tasks from plan
2025-05-30 07:00:59 +00:00
40db395591 feat(integration): components now play nicer with each other 2025-05-30 05:30:06 +00:00
2c244c4a9a update 2025-05-29 21:21:59 +00:00
0baf2562b7 fix(plan): create plan for improving email setup. 2025-05-29 21:21:27 +00:00
64da8d9100 test(socket-handler): add comprehensive tests for DNS and email socket-handler functionality
- Add unit tests for DNS route generation and socket handler creation
- Add unit tests for email route generation in both modes
- Add integration tests for combined DNS and email configuration
- Test TLS handling differences between email ports
- Verify socket-handler vs traditional forwarding mode behavior
- All tests pass without requiring actual port binding
- Mark implementation plan as complete with full test coverage
2025-05-29 16:44:34 +00:00
b11fea7334 feat(socket-handler): implement direct socket passing for DNS and email services
- Add socket-handler mode eliminating internal port binding for improved performance
- Add `dnsDomain` config option for automatic DNS-over-HTTPS (DoH) setup
- Add `useSocketHandler` flag to email config for direct socket processing
- Update SmartProxy route generation to support socket-handler actions
- Integrate smartdns with manual HTTPS mode for DoH without port binding
- Add automatic route creation for DNS paths when dnsDomain is configured
- Update documentation with socket-handler configuration and benefits
- Improve resource efficiency by eliminating internal port forwarding
2025-05-29 16:26:19 +00:00
6c8458f63c update 2025-05-28 18:07:07 +00:00
455b0085ec update 2025-05-28 15:32:35 +00:00
2b2fe940c4 fix(test): update tests 2025-05-28 15:24:34 +00:00
e1a7b3e8f7 Complete email router implementation and documentation
- Cleaned up interface definitions to only include implemented features
- Updated readme.md with comprehensive route-based configuration examples
- Added common email routing patterns and troubleshooting guide
- Removed legacy DomainRouter and IDomainRule interfaces
- Updated all imports and exports to use new EmailRouter system
- Verified build and core functionality tests pass

The match/action pattern implementation is now complete and production-ready.
2025-05-28 14:12:50 +00:00
191c4160c1 Complete match/action pattern integration testing
 All integration tests passing
- Route-based forwarding with priority: 5/5 scenarios
- CIDR IP matching: 4/4 test cases
- Authentication-based routing: 3/3 scenarios
- Pattern caching performance: Working
- Dynamic route updates: Working

The match/action pattern implementation is now complete and fully functional.
2025-05-28 13:45:03 +00:00
2e75961d1c feat: implement comprehensive route-based email routing system
Replace legacy domain-rule based routing with flexible route-based system that supports:
- Multi-criteria matching (recipients, senders, IPs, authentication)
- Four action types (forward, process, deliver, reject)
- Moved DKIM signing to delivery phase for signature validity
- Connection pooling for efficient email forwarding
- Pattern caching for improved performance

This provides more granular control over email routing with priority-based matching and comprehensive test coverage.
2025-05-28 13:23:45 +00:00
88099e120a feat: implement route-based email routing system
- Add core interfaces (IEmailRoute, IEmailMatch, IEmailAction, IEmailContext)
- Create EmailRouter class with comprehensive matching capabilities
- Support for recipient/sender patterns, IP/CIDR matching, auth checks
- Add content matching (headers, size, subject, attachments)
- Implement pattern caching for performance
- Update plan with completed steps
2025-05-28 12:07:37 +00:00
77ff948404 update 2025-05-28 11:39:54 +00:00
0e610cba16 update 2025-05-28 11:39:46 +00:00
8d59d617f1 fix(interfaces): Remove legacy interfaces 2025-05-27 21:03:17 +00:00
6aa54d974e fix(mail options): simplify mail options 2025-05-27 19:28:12 +00:00
2aeb52bf13 fix(structure): Unify structure even further 2025-05-27 18:00:14 +00:00
243a45d24c feat(structure): Use unified Email class 2025-05-27 15:38:34 +00:00
cfea44742a update 2025-05-27 15:06:44 +00:00
073c8378c7 update 2025-05-27 14:06:22 +00:00
af408d38c9 feat(plan): simplify structure 2025-05-27 12:56:12 +00:00
c3b14c0f58 update 2025-05-27 10:39:29 +00:00
69304dc839 update 2025-05-26 16:14:49 +00:00
a3721f7a74 update 2025-05-26 14:50:55 +00:00
20583beb35 update 2025-05-26 12:23:19 +00:00
b8ea8f660e update 2025-05-26 10:35:50 +00:00
5a45d6cd45 update 2025-05-26 04:09:29 +00:00
84196f9b13 update 2025-05-25 19:05:43 +00:00
4c9fd22a86 update 2025-05-25 19:02:18 +00:00
5b33623c2d update 2025-05-25 11:18:12 +00:00
58f4a123d2 update 2025-05-24 18:12:08 +00:00
11a2ae6b27 update 2025-05-24 17:00:59 +00:00
4e4c7df558 update 2025-05-24 16:19:19 +00:00
3d669ed9dd update 2025-05-24 14:50:24 +00:00
6e19e30f87 update 2025-05-24 14:39:48 +00:00