summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src/deliver.c8
-rw-r--r--src/src/ip.c5
-rw-r--r--test/log/02271
-rw-r--r--test/log/04771
-rw-r--r--test/stderr/02274
5 files changed, 13 insertions, 6 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c
index 47368a860..8f0f350d7 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -3353,8 +3353,8 @@ while (!done)
pipeheader[PIPE_HEADER_SIZE] = '\0';
DEBUG(D_deliver)
- debug_printf("got %ld bytes (pipeheader) from transport process %d\n",
- (long) got, pid);
+ debug_printf("got %ld bytes (pipeheader) '%c' from transport process %d\n",
+ (long) got, *id, pid);
{
/* If we can't decode the pipeheader, the subprocess seems to have a
@@ -3469,7 +3469,7 @@ while (!done)
/* Put the amount of data written into the parlist block */
- case 'S':
+ case 'S': /* Size */
memcpy(&(p->transport_count), ptr, sizeof(transport_count));
ptr += sizeof(transport_count);
break;
@@ -3559,7 +3559,7 @@ while (!done)
if (*subid > '1') setflag(addr, af_tcp_fastopen_data);
break;
- case 'D':
+ case 'D': /* DSN */
if (!addr) goto ADDR_MISMATCH;
memcpy(&(addr->dsn_aware), ptr, sizeof(addr->dsn_aware));
ptr += sizeof(addr->dsn_aware);
diff --git a/src/src/ip.c b/src/src/ip.c
index b50130be3..6ff8fe626 100644
--- a/src/src/ip.c
+++ b/src/src/ip.c
@@ -161,7 +161,10 @@ ip_bind(int sock, int af, uschar *address, int port)
{
union sockaddr_46 sin;
int s_len = ip_addr(&sin, af, address, port);
-return bind(sock, (struct sockaddr *)&sin, s_len);
+int rc = bind(sock, (struct sockaddr *)&sin, s_len);
+if (rc < 0)
+ log_write(0, LOG_MAIN, "bind of [%s]:%d failed", address, port);
+return rc;
}
diff --git a/test/log/0227 b/test/log/0227
index 3f56272cd..fd4c64d10 100644
--- a/test/log/0227
+++ b/test/log/0227
@@ -8,6 +8,7 @@
1999-03-02 09:44:33 H=(test) [V4NET.0.0.1] U=root F=<uncheckable@localhost1> rejected RCPT <z@test.ex>: Sender verify failed
1999-03-02 09:44:33 H=(test) [V4NET.0.0.1] U=root sender verify fail for <uncheckable2@localhost1>: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 Bad-char error for <> topbitchar:\200\377\377
1999-03-02 09:44:33 H=(test) [V4NET.0.0.1] U=root F=<uncheckable2@localhost1> rejected RCPT <z@test.ex>: Sender verify failed
+1999-03-02 09:44:33 bind of [1.1.1.1]:1111 failed
1999-03-02 09:44:33 recipient verify defer (making calloout connection): T=smtp Netwk addr not available
1999-03-02 09:44:33 H=(test) [V4NET.0.0.1] U=root sender verify defer for <bindfail@localhost1>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Netwk addr not available
1999-03-02 09:44:33 H=(test) [V4NET.0.0.1] U=root F=<bindfail@localhost1> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout
diff --git a/test/log/0477 b/test/log/0477
index 8bbf3edc8..3594ad2d0 100644
--- a/test/log/0477
+++ b/test/log/0477
@@ -1,3 +1,4 @@
1999-03-02 09:44:33 10HmaX-000000005vi-0000 <= CALLER@the.local.host.name U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaX-000000005vi-0000 bind of [99.99.99.99]:1111 failed
1999-03-02 09:44:33 10HmaX-000000005vi-0000 H=127.0.0.1 [127.0.0.1] Netwk addr not available
1999-03-02 09:44:33 10HmaX-000000005vi-0000 == userx@test.ex R=r1 T=t1 defer (EEE): Netwk addr not available
diff --git a/test/stderr/0227 b/test/stderr/0227
index 7150fbd72..0a4c4f1df 100644
--- a/test/stderr/0227
+++ b/test/stderr/0227
@@ -115,7 +115,9 @@ LOG: smtp_connection MAIN
SMTP connection from root D=qqs closed by QUIT
LOG: smtp_connection MAIN
SMTP connection from root
-Connecting to 127.0.0.1 [127.0.0.1]:PORT_S from 1.1.1.1 ... unable to bind outgoing SMTP call to 1.1.1.1: Netwk addr not available
+Connecting to 127.0.0.1 [127.0.0.1]:PORT_S from 1.1.1.1 ... LOG: MAIN
+ bind of [1.1.1.1]:1111 failed
+unable to bind outgoing SMTP call to 1.1.1.1: Netwk addr not available
failed: Netwk addr not available
LOG: MAIN PANIC
recipient verify defer (making calloout connection): T=smtp Netwk addr not available