One more - to log the IP address on SSL errors, since I keep getting
occasional "Unexpected SSL connection shutdown" without knowing who it is
affecting. (Maybe that particular message should be at DEBUG: level too?)
Cheers,
Brian.
diff -uNr courier-imap-1.6.0.20021025.orig/tcpd/starttls.c
courier-imap-1.6.0.20021025/tcpd/starttls.c
--- courier-imap-1.6.0.20021025.orig/tcpd/starttls.c Tue Sep 10 22:43:37 2002
+++ courier-imap-1.6.0.20021025/tcpd/starttls.c Tue Nov 5 16:55:13 2002
@@ -85,7 +85,9 @@
static void ssl_errmsg(const char *errmsg, void *dummy)
{
- fprintf(errfp, "%s\n", errmsg);
+const char *p = getenv("TCPREMOTEIP");
+
+ fprintf(errfp, "%s, ip=[%s]\n", errmsg, p ? p : "");
}
static void nonsslerror(const char *pfix)
diff -uNr courier-imap-1.6.0.20021025.orig/tcpd/libcouriertls.c
courier-imap-1.6.0.20021025/tcpd/libcouriertls.c
--- courier-imap-1.6.0.20021025.orig/tcpd/libcouriertls.c Mon Oct 21 12:27:35
2002
+++ courier-imap-1.6.0.20021025/tcpd/libcouriertls.c Tue Nov 5 16:57:24 2002
@@ -240,7 +240,7 @@
{
if (rc == 0)
{
- (*info->tls_err_msg)("Unexpected SSL connection shutdown.",
+ (*info->tls_err_msg)("Unexpected SSL connection shutdown",
info->app_data);
return;
}