https://bugs.exim.org/show_bug.cgi?id=3138
Bug ID: 3138 Summary: Connection reuse does not take TCP port + wrong port logged Product: Exim Version: 4.97 Hardware: x86 OS: Linux Status: NEW Severity: bug Priority: medium Component: Unfiled Assignee: unalloca...@exim.org Reporter: e...@ancel1.fr CC: exim-dev@lists.exim.org When a message is successfully delivered, Exim looks in the queue if other messages can be delivered through the existing TCP/IP connection. However, Exim only looks for the host address, not the host/port tuple. When relaying multiple domains with manual routes to the same host address but different TCP port, like so: - a.domain.tld: 1.2.3.4::2525 - b.domain.tld: 1.2.3.4::2526 - c.domain.tld: 1.2.3.4::2527 Email from one domain might be delivered to the wrong host/port tuple. Here is an (redacted) example of sending an email to cont...@b.domain.tld where 1.2.3.4::2526 is not listening or blocked: 2025-02-13 20:20:06 1tiekj-0000000Cd9d-2KfJ <= a...@example.com H=some.host.tld [1.1.1.1] P=esmtps X=TLS1.3:TLS_AES_256_GCM_SHA384:256 S=4207 DKIM=example.tld id=a-b-c-...@example.com 2025-02-13 20:22:16 1tiekj-0000000Cd9d-2KfJ H=1.2.3.4 [1.2.3.4]:2526: Remote host closed connection in response to initial connection 2025-02-13 20:22:16 1tiekj-0000000Cd9d-2KfJ == cont...@b.domain.tld R=relay T=remote_smtp defer (-18) H=1.2.3.4 [1.2.3.4]:2526 DT=2m9s: Remote host closed connection in response to initial connection ... 2025-02-13 20:23:37 1tieo4-0000000CiBD-2myr => some.recipi...@a.domain.tld R=relay T=remote_smtp H=1.2.3.4 [1.2.3.4]:2525 X=TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256 C="250 2.6.0 <xxxxx> [InternalId=178172423307302, Hostname=mta.a.domain.tld] 49931 bytes in 0.199, 244,401 KB/sec Queued mail for delivery" DT=0s 2025-02-13 20:23:37 1tieo4-0000000CiBD-2myr Completed ... 2025-02-13 20:23:37 1tiekj-0000000Cd9d-2KfJ => cont...@b.domain.tld R=relay T=remote_smtp H=1.2.3.4 [1.2.3.4]:2526* X=TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256 C="250 2.6.0 <a-b-c-...@example.com> [InternalId=178172423307303, Hostname=mta.a.domain.tld] 5613 bytes in 0.149, 36,657 KB/sec Queued mail for delivery" DT=0s 2025-02-13 20:23:37 1tiekj-0000000Cd9d-2KfJ Completed The mail has been delivered to the wrong host/port tuple (1.2.3.4::2525 instead of 1.2.3.4::2526), and the log says it has been delivered to the configured host and not the one it has been actually delivered to. -- You are receiving this mail because: You are on the CC list for the bug. -- ## subscription configuration (requires account): ## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/ ## unsubscribe (doesn't require an account): ## exim-dev-unsubscr...@lists.exim.org ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/