tests: classify SMTP relay clients as remote

This commit is contained in:
Mario Fetka
2026-07-28 13:52:05 +02:00
parent 8daa2dfbfd
commit 9f4bcf6741
@@ -371,10 +371,11 @@ def validate_xforward(delivery: Delivery) -> None:
raise SMTP22Error(
f"expected one XFORWARD command, received {commands!r}")
command = commands[0]
for attribute in ("ADDR=", "PORT=", "IDENT=", "SOURCE=LOCAL"):
for attribute in ("ADDR=", "PORT=", "IDENT=", "SOURCE=REMOTE"):
if attribute not in command:
raise SMTP22Error(
f"XFORWARD omitted advertised attribute {attribute}")
f"XFORWARD omitted advertised attribute {attribute}: "
f"{command!r}")
for attribute in ("PROTO=", "HELO=", "LOGIN=", "DESTADDR=", "DESTPORT="):
if attribute in command:
raise SMTP22Error(