From 8a4656aa96994919045ee63fe479b55fa12ca320 Mon Sep 17 00:00:00 2001 From: Sam Varshavchik Date: Thu, 5 Sep 2019 21:40:19 -0400 Subject: Log remote port numbers. --- imap/imaptoken.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'imap/imaptoken.c') diff --git a/imap/imaptoken.c b/imap/imaptoken.c index a11310a..153450a 100644 --- a/imap/imaptoken.c +++ b/imap/imaptoken.c @@ -60,13 +60,16 @@ void bye_msg(const char *type) if (a && *a) fprintf(stderr, "%s, user=%s, " - "ip=[%s], headers=%lu, body=%lu, rcvd=%lu, sent=%lu, time=%s%s\n", + "ip=[%s], port=[%s], headers=%lu, body=%lu, rcvd=%lu, sent=%lu, time=%s%s\n", type, - a, getenv("TCPREMOTEIP"), header_count, body_count, bytes_received_count, bytes_sent_count, + a, getenv("TCPREMOTEIP"), + getenv("TCPREMOTEPORT"), + header_count, body_count, bytes_received_count, bytes_sent_count, buf, tls); else - fprintf(stderr, "DEBUG: Disconnected, ip=[%s], time=%s%s\n", + fprintf(stderr, "DEBUG: Disconnected, ip=[%s], port=[%s], time=%s%s\n", getenv("TCPREMOTEIP"), + getenv("TCPREMOTEPORT"), buf, tls); } -- cgit v1.2.3