feat: Implement Deno-native STARTTLS handler and connection wrapper
- Refactored STARTTLS implementation to use Deno's native TLS via Deno.startTls(). - Introduced ConnectionWrapper to provide a Node.js net.Socket-compatible interface for Deno.Conn and Deno.TlsConn. - Updated TlsHandler to utilize the new STARTTLS implementation. - Added comprehensive SMTP authentication tests for PLAIN and LOGIN mechanisms. - Implemented rate limiting tests for SMTP server connections and commands. - Enhanced error handling and logging throughout the STARTTLS and connection upgrade processes.
This commit is contained in:
@@ -76,7 +76,7 @@ Tests for security features and protections.
|
||||
|
||||
| Test ID | Source File | Destination File | Status | Tests | Notes |
|
||||
|---------|-------------|------------------|--------|-------|-------|
|
||||
| SEC-01 | TBD | `test/suite/smtpserver_security/test.sec-01.authentication.test.ts` | 📋 Planned | - | SMTP AUTH mechanisms |
|
||||
| **SEC-01** | (dcrouter test.sec-01.authentication.ts) | `test/suite/smtpserver_security/test.sec-01.authentication.test.ts` | **✅ Ported** | 8/8 | AUTH PLAIN, AUTH LOGIN, invalid credentials, cancellation, authentication enforcement |
|
||||
| SEC-03 | TBD | `test/suite/smtpserver_security/test.sec-03.dkim.test.ts` | 📋 Planned | - | DKIM signing/verification |
|
||||
| SEC-04 | TBD | `test/suite/smtpserver_security/test.sec-04.spf.test.ts` | 📋 Planned | - | SPF record checking |
|
||||
| **SEC-06** | (dcrouter SEC-06 tests) | `test/suite/smtpserver_security/test.sec-06.ip-reputation.test.ts` | **✅ Ported** | 7/7 | IP reputation infrastructure, legitimate traffic acceptance |
|
||||
@@ -146,9 +146,9 @@ Tests for RFC 5321/5322 compliance.
|
||||
|
||||
### Overall Statistics
|
||||
- **Total test files identified**: ~100+
|
||||
- **Files ported**: 11/100+ (11%)
|
||||
- **Total tests ported**: 82/~500+ (16%)
|
||||
- **Tests passing**: 82/82 (100%)
|
||||
- **Files ported**: 12/100+ (12%)
|
||||
- **Total tests ported**: 90/~500+ (18%)
|
||||
- **Tests passing**: 90/90 (100%)
|
||||
|
||||
### By Priority
|
||||
|
||||
@@ -164,14 +164,14 @@ Tests for RFC 5321/5322 compliance.
|
||||
**Phase 1 Progress**: 7/7 complete (100%) ✅ **COMPLETE**
|
||||
|
||||
#### High Priority (Phase 2: Security & Validation)
|
||||
- 📋 SEC-01: Authentication
|
||||
- ✅ SEC-01: Authentication (8 tests)
|
||||
- ✅ SEC-06: IP Reputation (7 tests)
|
||||
- 📋 SEC-08: Rate Limiting
|
||||
- 📋 SEC-10: Header Injection
|
||||
- ✅ ERR-01: Syntax Errors (10 tests)
|
||||
- ✅ ERR-02: Invalid Sequence (10 tests)
|
||||
|
||||
**Phase 2 Progress**: 3/6 complete (50%)
|
||||
**Phase 2 Progress**: 4/6 complete (67%)
|
||||
|
||||
#### Medium Priority (Phase 3: Advanced Features)
|
||||
- 📋 SEC-03: DKIM
|
||||
@@ -240,15 +240,15 @@ assertMatch(text, /pattern/)
|
||||
## Next Steps
|
||||
|
||||
### Immediate (Phase 1 completion)
|
||||
- [ ] EP-01: Basic Email Sending test
|
||||
- [x] EP-01: Basic Email Sending test
|
||||
|
||||
### Phase 2 (Security & Validation)
|
||||
- [ ] SEC-01: Authentication
|
||||
- [ ] SEC-06: IP Reputation
|
||||
- [x] SEC-01: Authentication
|
||||
- [x] SEC-06: IP Reputation
|
||||
- [ ] SEC-08: Rate Limiting
|
||||
- [ ] SEC-10: Header Injection Prevention
|
||||
- [ ] ERR-01: Syntax Error Handling
|
||||
- [ ] ERR-02: Invalid Sequence Handling
|
||||
- [x] ERR-01: Syntax Error Handling
|
||||
- [x] ERR-02: Invalid Sequence Handling
|
||||
|
||||
### Phase 3 (Advanced Features)
|
||||
- [ ] CMD-06: RSET Command
|
||||
|
||||
Reference in New Issue
Block a user