wildduck/imap-core
titanism 70aed51373
fix(connection-management): implement connection management, POP3 timeout fixes, and comprehensive documentation (#835)
* feat: implement connection management, POP3 timeout fixes, and comprehensive documentation

- feat(imap,pop3): add onConnect and onClose handlers (closes #721)
  * Implement onConnect handlers for connection filtering and rate limiting
  * Implement onClose handlers for custom cleanup logic
  * Add support for IP blocking and connection overflow prevention
  * Enable custom connection management and monitoring
  * Maintain full backward compatibility

- feat(pop3): reset socket timeout after each command processing (closes #709)
  * Add timeout reset in processQueue() after successful command execution
  * Add timeout reset for continue data processing
  * Prevents active POP3 connections from timing out unexpectedly
  * Maintains backward compatibility with existing timeout settings

- docs: add comprehensive documentation with proper navigation (related to #770)
  * Add Connection Management guide with implementation examples
  * Add CONDSTORE Extension guide with RFC 4551 compliance details
  * Update README with Recent Improvements section
  * Add proper sidebar navigation links for discoverability
  * Add cross-references in protocol support documentation
  * Ensure GitHub pages compatibility and multiple discovery paths
  * Fix documentation accuracy to match actual codebase implementation

- test: add comprehensive test coverage for new features
  * Add IMAP onConnect/onClose handler tests (7 tests)
  * Add POP3 onConnect/onClose handler tests (9 tests)
  * Add POP3 timeout reset functionality tests (3 tests)
  * Fix test file path issues for proper execution
  * All 19 tests passing with full coverage
  * Perfect ESLint compliance across all test files

- refactor: enhance features documentation
  * Add Advanced Connection Management
  * Add Smart POP3 Timeout Handling
  * Add CONDSTORE Extension Support
  * Update main project README with practical examples

- fix: correct test file paths for proper execution
  * Fix hardcoded absolute paths in POP3 timeout tests
  * Use relative paths for better portability
  * Apply whitespace cleanup across all JS and MD files

Related to #770 (CONDSTORE functionality verified and documented accurately)

* fix: fixed tests via server.listen(0) approach

* fix: implemented changes from @NickOvt per #835

- Added `const TEST_PORT = 0;` to all appropriate test files where `.listen(0` was used
- Replaced all instances of `.listen(0, with .listen(TEST_PORT,`
- Added abrupt connection close test via `"should handle abrupt connection close properly"` which verifies both onConnect and onClose handlers are called (for both IMAP and POP3)
- Added async handler test via `"should work with async onConnect handler"` which simulates Redis or other async operations (for both IMAP and POP3)
- Simplified CONDSTORE documentation
- Removed redundant RFC explanations
- Removed AI-written style phrases like "use WeakMap ... etc. etc."
2025-07-23 10:46:13 +03:00
..
lib fix(connection-management): implement connection management, POP3 timeout fixes, and comprehensive documentation (#835) 2025-07-23 10:46:13 +03:00
test fix(connection-management): implement connection management, POP3 timeout fixes, and comprehensive documentation (#835) 2025-07-23 10:46:13 +03:00
index.js Changed quota handling 2017-03-29 20:06:09 +03:00