fix: revert recent readme changes, keep only necessary info (#848)

This commit is contained in:
NickOvt 2025-08-01 10:46:03 +03:00 committed by GitHub
parent c209b3af26
commit 0f1a55c1c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,28 +18,6 @@ WildDuck uses a distributed database (sharded + replicated MongoDB) as a backend
WildDuck tries to follow Gmail in product design. If there's a decision to be made then usually the answer is to do whatever Gmail has done.
## Recent Improvements
### Enhanced Connection Management
- **onConnect/onClose Handlers**: Full support for custom connection handling in both IMAP and POP3 servers
- IP-based connection filtering and rate limiting
- Custom authentication and authorization logic
- Connection monitoring and logging capabilities
- Backward compatible - handlers are optional
### Improved POP3 Reliability
- **Smart Timeout Management**: POP3 connections now automatically reset timeouts during active command processing
- Prevents unexpected disconnections during legitimate usage
- Maintains security timeouts for idle connections
- Seamless operation with existing timeout configurations
### CONDSTORE Support
- **RFC 4551 Compliance**: Full CONDSTORE (Conditional STORE) extension support
- ENABLE CONDSTORE extension
- STORE and UID STORE with UNCHANGESINCE modifier
- MODIFIED response codes for conflict detection
- Enhanced synchronization capabilities for modern email clients
## Links
- [Website](https://wildduck.email)
@ -47,78 +25,6 @@ WildDuck tries to follow Gmail in product design. If there's a decision to be ma
- [Installation instructions](https://docs.wildduck.email/docs/general/install)
- [API Documentation](https://docs.wildduck.email/docs/category/wildduck-api)
## Configuration Examples
### IMAP Server with Connection Handlers
```javascript
const { IMAPServer } = require('wildduck/imap-core');
const server = new IMAPServer({
// Connection filtering and rate limiting
onConnect: (session, callback) => {
// Block specific IPs
if (blockedIPs.includes(session.remoteAddress)) {
return callback(new Error('IP blocked'));
}
// Rate limiting
if (connectionCount[session.remoteAddress] > 10) {
return callback(new Error('Too many connections'));
}
console.log(`New IMAP connection from ${session.remoteAddress}`);
callback();
},
// Connection cleanup
onClose: (session) => {
console.log(`IMAP connection closed: ${session.id}`);
// Custom cleanup logic here
}
});
```
### POP3 Server with Connection Management
```javascript
const POP3Server = require('wildduck/lib/pop3/server');
const server = new POP3Server({
// Enhanced timeout handling (automatic)
socketTimeout: 300000, // 5 minutes
// Connection filtering
onConnect: (session, callback) => {
// Custom authentication logic
if (!isAllowedConnection(session)) {
return callback(new Error('Connection not allowed'));
}
callback();
},
// Connection monitoring
onClose: (session) => {
logConnectionStats(session);
}
});
```
### CONDSTORE Usage
```javascript
// Enable CONDSTORE extension
A1 ENABLE CONDSTORE
// Conditional STORE operations
A2 STORE 1:5 (UNCHANGEDSINCE 12345) +FLAGS (\Seen)
// Response: A2 OK [MODIFIED 3,5] Conditional STORE completed
// UID STORE with UNCHANGEDSINCE
A3 UID STORE 100:200 (UNCHANGEDSINCE 67890) FLAGS (\Deleted)
// Response: A3 OK [MODIFIED 150,175] Conditional STORE completed
```
## License
WildDuck Mail Server is licensed under the [European Union Public License 1.2](https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12) or later.