Record SMTP Telnet timeout evidence
This commit is contained in:
Regular → Executable
+9
@@ -267,6 +267,7 @@ def main() -> int:
|
||||
test_configuration = copy.deepcopy(original)
|
||||
test_configuration["socket_timeout"] = SOCKET_TIMEOUT
|
||||
results: list[str] = []
|
||||
test_error: BaseException | None = None
|
||||
restore_error: BaseException | None = None
|
||||
try:
|
||||
replace_configuration(test_configuration)
|
||||
@@ -279,6 +280,8 @@ def main() -> int:
|
||||
paced = check_paced(host, port, name)
|
||||
results.append(
|
||||
f"{name}=idle:{idle:.2f}s,paced-idle:{paced:.2f}s")
|
||||
except BaseException as error:
|
||||
test_error = error
|
||||
finally:
|
||||
try:
|
||||
replace_configuration(original)
|
||||
@@ -289,8 +292,14 @@ def main() -> int:
|
||||
except BaseException as error:
|
||||
restore_error = error
|
||||
if restore_error is not None:
|
||||
if test_error is not None:
|
||||
raise TelnetTimeoutError(
|
||||
f"test failed ({test_error}) and SMTP configuration "
|
||||
f"restoration also failed ({restore_error})")
|
||||
raise TelnetTimeoutError(
|
||||
f"failed to restore SMTP configuration: {restore_error}")
|
||||
if test_error is not None:
|
||||
raise test_error
|
||||
|
||||
print(
|
||||
"SMTP-32 PASS "
|
||||
|
||||
@@ -131,7 +131,7 @@ inputs and outputs is absent from the ZIP.
|
||||
| SMTP-06 | Local authenticated delivery from test1 to test2 | [PASS](test-evidence/0.7-r1.md#smtp-06) | | |
|
||||
| SMTP-30 | curl, swaks, Xeams, GNU Mailutils, and paced Telnet delivery over authenticated submission and unauthenticated port 25/26 | [PASS](test-evidence/0.7-r1.md#smtp-30) | | |
|
||||
| SMTP-31 | Unprivileged sendmail-compatible local submission without the Bongo system credential | [PASS](test-evidence/0.7-r1.md#smtp-31) | | |
|
||||
| SMTP-32 | Telnet activity resets the configured per-operation timeout; abandoned port 25/26 sessions close | | | |
|
||||
| SMTP-32 | Telnet activity resets the configured per-operation timeout; abandoned port 25/26 sessions close | [PASS](test-evidence/0.7-r1.md#smtp-32) | | |
|
||||
| SMTP-07 | Internet delivery prefers STARTTLS and follows opportunistic fallback | | | |
|
||||
| SMTP-08 | Required TLS and `REQUIRETLS` defer rather than downgrade | | | |
|
||||
| SMTP-27 | DANE takes precedence; MTA-STS enforce/testing/cache and MX wildcard policy | | | |
|
||||
|
||||
@@ -2264,3 +2264,41 @@ SMTP-31 PASS user=1000 sendmail=/usr/sbin/sendmail clients=sendmail,GNU-mail mas
|
||||
The test removed both exact Store objects and any matching Queue entries.
|
||||
The maildrop spool was empty afterward. No Internet recipient or external
|
||||
relay was used.
|
||||
|
||||
## SMTP-32
|
||||
|
||||
Result: **PASS**
|
||||
|
||||
The SMTP listener previously read `socket_timeout` from the Store but started
|
||||
ConnIO with a fixed 600-second value. Source commit
|
||||
`95d4273fef2b3f6104bf68606dba783a738731e3` makes the ConnIO default a
|
||||
run-time setting, changes the fresh-install default to Postfix's normal 300
|
||||
seconds, and rejects values outside 1 through 3600 seconds. The complete GCC
|
||||
debug build and all 96 CTests passed, including the new ConnIO default-timeout
|
||||
test and configuration-model bounds test.
|
||||
|
||||
The reusable `smtp-telnet-timeout-check.py` then changed the installed test
|
||||
instance to a three-second timeout. It opened a real Telnet client in a
|
||||
pseudo-terminal against both port 25 and trusted-device port 26. For each
|
||||
listener it first waited without sending a command. It then opened a second
|
||||
connection and waited two seconds after each server reply before typing
|
||||
`EHLO`, `NOOP`, and `RSET`. Those paced sessions lasted longer than three
|
||||
seconds in total, proving that activity resets the next-operation timer, then
|
||||
were deliberately abandoned.
|
||||
|
||||
```sh
|
||||
export BONGO_ALLOW_LIVE_SMTP_TEST=1
|
||||
./contrib/testing/smtp-telnet-timeout-check.py
|
||||
```
|
||||
|
||||
The installed-service run reported:
|
||||
|
||||
```text
|
||||
SMTP-32 PASS configured-timeout=3s command-delay=2s sessions=inbound=idle:3.00s,paced-idle:3.00s;internal=idle:3.00s,paced-idle:3.00s paced-commands=EHLO,NOOP,RSET config-restored=yes service=active
|
||||
```
|
||||
|
||||
All four abandoned sessions closed at the configured boundary. The original
|
||||
SMTP document was restored and its canonical `bongo-admin __config-read smtp`
|
||||
output had SHA-256
|
||||
`7666db995baf210638d92ae241f7bb10e0991efc7334d980bbb5fcd438f23925`.
|
||||
`bongo.service` was active after the final restart.
|
||||
|
||||
Reference in New Issue
Block a user