tests: classify SMTP relay clients as remote
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user