Update README documentation for dual-port SMTP setup

Co-authored-by: setoelkahfi <1797197+setoelkahfi@users.noreply.github.com>

copilot-swe-agent[bot] committed Oct 14, 2025 at 11:03 UTC e12a2ad720f1d2f8d91568caa2305f6af14b439b
1 file changed +12 -1
README.md
+12 -1
@@ -10,6 +10,7 @@ A basic SMTP and IMAP server implementation in Rust with TLS/STARTTLS support.
10 - ✅ Self-signed certificate generation for TLS
11 - ✅ Multiple recipient support
12 - ✅ Command validation and error handling
13 +- ✅ Dual-mode operation: separate ports for incoming and outgoing mail
14
15 ### IMAP
16 - ✅ IMAP4rev1 protocol implementation
@@ -31,7 +32,11 @@ A basic SMTP and IMAP server implementation in Rust with TLS/STARTTLS support.
32 cargo run
33 ```
34
34 -The SMTP server listens on `127.0.0.1:2525` and the IMAP server listens on `127.0.0.1:1143` by default.
35 +The SMTP server listens on two ports:
36 +- `127.0.0.1:2525` - **Receive mode**: For incoming mail from other servers (messages stored in INBOX)
37 +- `127.0.0.1:2526` - **Submit mode**: For outgoing mail submission from clients (messages logged and relayed)
38 +
39 +The IMAP server listens on `127.0.0.1:1143` by default.
40
41 ## Testing
42
@@ -39,10 +44,16 @@ The SMTP server listens on `127.0.0.1:2525` and the IMAP server listens on `127.
44
45 You can test the SMTP server using `nc` (netcat) or `telnet`:
46
47 +**Testing receive mode (port 2525):**
48 ```bash
49 echo -e "EHLO test.com\r\nMAIL FROM: <sender@example.com>\r\nRCPT TO: <recipient@example.com>\r\nDATA\r\nSubject: Test\r\n\r\nTest message\r\n.\r\nQUIT\r\n" | nc localhost 2525
50 ```
51
52 +**Testing submit mode (port 2526):**
53 +```bash
54 +echo -e "EHLO test.com\r\nMAIL FROM: <sender@example.com>\r\nRCPT TO: <recipient@example.com>\r\nDATA\r\nSubject: Outgoing Test\r\n\r\nOutgoing message\r\n.\r\nQUIT\r\n" | nc localhost 2526
55 +```
56 +
57 ### Testing IMAP
58
59 You can test the IMAP server using `nc` (netcat) or `telnet`: