[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AUTH LOGIN and logging



> I compiled Zmailer-2.99.50s18 with openssl support. I got it up and
> running with no problems at all. Great piece of work, Matti. I still 
> have one question. How do I prevent smtpserver from logging users
> encoded password in its logfile? AFAIK, it is of no use to me.

	"fix" is now in the CVS.

Index: smtpserver/smtpauth.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtpauth.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- smtpauth.c  1999/05/15 17:25:53     1.12
+++ smtpauth.c  1999/05/25 01:21:02     1.13
@@ -170,10 +170,18 @@
 
     i = s_gets(SS, abuf, sizeof(abuf), &rc, &co, &c );
     abuf[sizeof(abuf)-1] = 0;
+#if 0
+    /* This logs encoded password, usually that is *not* desired */
     if (logfp != NULL) {
       fprintf(logfp, "%dr\t%s\n", pid, abuf);
       fflush(logfp);
     }
+#else
+    if (logfp != NULL) {
+      fprintf(logfp, "%dr\t**base64-password**\n", pid);
+      fflush(logfp);
+    }
+#endif
     if (i == 0)        { /* EOF ??? */
       if (uname) free(uname);
       return;


> -- 
>   Eino Tuominen, eino@utu.fi

/Matti Aarnio