summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/smtp_out.c2
-rw-r--r--src/src/verify.c24
2 files changed, 25 insertions, 1 deletions
diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c
index e705965ba..02f1fa438 100644
--- a/src/src/smtp_out.c
+++ b/src/src/smtp_out.c
@@ -305,7 +305,7 @@ if (sc->interface)
)
{
HDEBUG(D_transport|D_acl|D_v)
- debug_printf_indent("unable to bind outgoing SMTP call to %s: %s", sc->interface,
+ debug_printf_indent("unable to bind outgoing SMTP call to %s: %s\n", sc->interface,
strerror(errno));
close(sock);
return -1;
diff --git a/src/src/verify.c b/src/src/verify.c
index 228f63020..c420fcac1 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -709,6 +709,30 @@ tls_retry_connection:
if (yield != OK)
{
errno = addr->basic_errno;
+
+ /* For certain errors we want specifically to log the transport name,
+ for ease of fixing config errors. Slightly ugly doing it here, but we want
+ to not leak that also in the SMTP response. */
+ switch (errno)
+ {
+ case EPROTOTYPE:
+ case ENOPROTOOPT:
+ case EPROTONOSUPPORT:
+ case ESOCKTNOSUPPORT:
+ case EOPNOTSUPP:
+ case EPFNOSUPPORT:
+ case EAFNOSUPPORT:
+ case EADDRINUSE:
+ case EADDRNOTAVAIL:
+ case ENETDOWN:
+ case ENETUNREACH:
+ log_write(0, LOG_MAIN|LOG_PANIC,
+ "%s verify %s (making calloout connection): T=%s %s",
+ options & vopt_is_recipient ? "sender" : "recipient",
+ yield == FAIL ? "fail" : "defer",
+ transport_name, strerror(errno));
+ }
+
transport_name = NULL;
deliver_host = deliver_host_address = NULL;
deliver_domain = save_deliver_domain;