Subject: Small bugfix - installemnt 2

From: Eugene Crosser <[email-masked]>
Date: 16 Oct 2002 19:18:15 +0400

Another obvious thing.  The bugs are in the code that I contributed a
few years ago.  I am trying to log "whoson" information before it is
collected.  Result - always empty field.  Another thing: when "on the
fly" translation is activated, it is impossible to report error to the
peer at the point I am trying to do: SSL is not yet initialized at this
point.  Trying to "type()" leads to smtpserver busyloop.

--- smtpserver/smtpserver.c     2002/10/07 08:50:43     1.128
+++ smtpserver/smtpserver.c     2002/10/16 14:50:11
@@ -776,25 +776,15 @@
                " [port %d]", SS.rport);

        if (smtp_syslog && ident_flag) {
-#ifdef HAVE_WHOSON_H
-           zsyslog((LOG_INFO, "connection from %s@%s (whoson: $s)\n",
-                    SS.ident_username, SS.rhostname, SS.whoson_data));
-#else
            zsyslog((LOG_INFO, "connection from %s@%s\n",
                     SS.ident_username, SS.rhostname));
-#endif
        }

        pid = getpid();
        settrusteduser();       /* dig out the trusted user ID */
        openlogfp(&SS, daemon_flg);
-#ifdef HAVE_WHOSON_H
-       type(NULL,0,NULL,"connection from %s:%d ident: %s whoson: %s",
-            SS.rhostname, SS.rport, SS.ident_username, SS.whoson_data);
-#else
        type(NULL,0,NULL,"connection from %s:%d ident: %s",
             SS.rhostname, SS.rport, SS.ident_username);
-#endif

 #if 0
        SIGNAL_HANDLE(SIGCHLD, SIG_DFL);
@@ -1944,8 +1934,11 @@
     }
     if (!(*lang) || (X_settrrc < 0)) {
        /* we don't know our codetable, hush client away */
+       /* Oops!  With version 2.99.56-pre1 you cannot use type()
+          before some initialization of SS is performed!
        type(SS, 451, NULL, "Server could not setup translation.",
NULL);
        typeflush(SS);
+       */
        sleep(2);
        exit(0);
 #endif                         /* USE_TRANSLATION */

-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to [email-masked]