remove DEBUG
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 2 Jan 1989 09:17:55 +0000 (01:17 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 2 Jan 1989 09:17:55 +0000 (01:17 -0800)
SCCS-vsn: usr.sbin/sendmail/src/alias.c 5.17
SCCS-vsn: usr.sbin/sendmail/src/clock.c 5.7
SCCS-vsn: usr.sbin/sendmail/src/collect.c 5.7
SCCS-vsn: usr.sbin/sendmail/src/conf.h 5.15
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 5.29
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 5.26
SCCS-vsn: usr.sbin/sendmail/src/domain.c 5.19
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 5.18
SCCS-vsn: usr.sbin/sendmail/src/headers.c 5.13
SCCS-vsn: usr.sbin/sendmail/src/macro.c 5.6
SCCS-vsn: usr.sbin/sendmail/src/main.c 5.25
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 5.10
SCCS-vsn: usr.sbin/sendmail/src/queue.c 5.26
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 5.17
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 5.14
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 5.11
SCCS-vsn: usr.sbin/sendmail/src/stab.c 5.6
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 5.12

18 files changed:
usr/src/usr.sbin/sendmail/src/alias.c
usr/src/usr.sbin/sendmail/src/clock.c
usr/src/usr.sbin/sendmail/src/collect.c
usr/src/usr.sbin/sendmail/src/conf.h
usr/src/usr.sbin/sendmail/src/daemon.c
usr/src/usr.sbin/sendmail/src/deliver.c
usr/src/usr.sbin/sendmail/src/domain.c
usr/src/usr.sbin/sendmail/src/envelope.c
usr/src/usr.sbin/sendmail/src/headers.c
usr/src/usr.sbin/sendmail/src/macro.c
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/parseaddr.c
usr/src/usr.sbin/sendmail/src/queue.c
usr/src/usr.sbin/sendmail/src/readcf.c
usr/src/usr.sbin/sendmail/src/recipient.c
usr/src/usr.sbin/sendmail/src/savemail.c
usr/src/usr.sbin/sendmail/src/stab.c
usr/src/usr.sbin/sendmail/src/usersmtp.c

index fa3cc5b..a8d0ff6 100644 (file)
@@ -18,9 +18,9 @@
 
 #ifndef lint
 #ifdef DBM
 
 #ifndef lint
 #ifdef DBM
-static char sccsid[] = "@(#)alias.c    5.16 (Berkeley) %G% (with DBM)";
+static char sccsid[] = "@(#)alias.c    5.17 (Berkeley) %G% (with DBM)";
 #else
 #else
-static char sccsid[] = "@(#)alias.c    5.16 (Berkeley) %G% (without DBM)";
+static char sccsid[] = "@(#)alias.c    5.17 (Berkeley) %G% (without DBM)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -77,10 +77,8 @@ alias(a, sendq)
        extern ADDRESS *sendto();
        extern char *aliaslookup();
 
        extern ADDRESS *sendto();
        extern char *aliaslookup();
 
-# ifdef DEBUG
        if (tTd(27, 1))
                printf("alias(%s)\n", a->q_paddr);
        if (tTd(27, 1))
                printf("alias(%s)\n", a->q_paddr);
-# endif
 
        /* don't realias already aliased names */
        if (bitset(QDONTSEND, a->q_flags))
 
        /* don't realias already aliased names */
        if (bitset(QDONTSEND, a->q_flags))
@@ -104,11 +102,9 @@ alias(a, sendq)
        **      Deliver to the target list.
        */
 
        **      Deliver to the target list.
        */
 
-# ifdef DEBUG
        if (tTd(27, 1))
                printf("%s (%s, %s) aliased to %s\n",
                    a->q_paddr, a->q_host, a->q_user, p);
        if (tTd(27, 1))
                printf("%s (%s, %s) aliased to %s\n",
                    a->q_paddr, a->q_host, a->q_user, p);
-# endif
        message(Arpa_Info, "aliased to %s", p);
        AliasLevel++;
        a->q_child = sendto(p, 1, a, 0);
        message(Arpa_Info, "aliased to %s", p);
        AliasLevel++;
        a->q_child = sendto(p, 1, a, 0);
@@ -327,10 +323,8 @@ readaliases(aliasfile, init)
 
        if ((af = fopen(aliasfile, "r")) == NULL)
        {
 
        if ((af = fopen(aliasfile, "r")) == NULL)
        {
-# ifdef DEBUG
                if (tTd(27, 1))
                        printf("Can't open %s\n", aliasfile);
                if (tTd(27, 1))
                        printf("Can't open %s\n", aliasfile);
-# endif
                errno = 0;
                NoAlias++;
                return;
                errno = 0;
                NoAlias++;
                return;
@@ -613,17 +607,13 @@ forward(user, sendq)
        char buf[60];
        extern bool safefile();
 
        char buf[60];
        extern bool safefile();
 
-# ifdef DEBUG
        if (tTd(27, 1))
                printf("forward(%s)\n", user->q_paddr);
        if (tTd(27, 1))
                printf("forward(%s)\n", user->q_paddr);
-# endif DEBUG
 
        if (user->q_mailer != LocalMailer || bitset(QBADADDR, user->q_flags))
                return;
 
        if (user->q_mailer != LocalMailer || bitset(QBADADDR, user->q_flags))
                return;
-# ifdef DEBUG
        if (user->q_home == NULL)
                syserr("forward: no home");
        if (user->q_home == NULL)
                syserr("forward: no home");
-# endif DEBUG
 
        /* good address -- look for .forward file in home */
        define('z', user->q_home, CurEnv);
 
        /* good address -- look for .forward file in home */
        define('z', user->q_home, CurEnv);
index 2eebd16..6b15609 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)clock.c    5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)clock.c    5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -52,13 +52,11 @@ setevent(intvl, func, arg)
        auto time_t now;
        extern tick();
 
        auto time_t now;
        extern tick();
 
-# ifdef DEBUG
        if (intvl <= 0)
        {
                syserr("setevent: intvl=%ld\n", intvl);
                return (NULL);
        }
        if (intvl <= 0)
        {
                syserr("setevent: intvl=%ld\n", intvl);
                return (NULL);
        }
-# endif DEBUG
 
        (void) time(&now);
 
 
        (void) time(&now);
 
@@ -78,11 +76,9 @@ setevent(intvl, func, arg)
        ev->ev_link = *evp;
        *evp = ev;
 
        ev->ev_link = *evp;
        *evp = ev;
 
-# ifdef DEBUG
        if (tTd(5, 5))
                printf("setevent: intvl=%ld, for=%ld, func=%x, arg=%d, ev=%x\n",
                        intvl, now + intvl, func, arg, ev);
        if (tTd(5, 5))
                printf("setevent: intvl=%ld, for=%ld, func=%x, arg=%d, ev=%x\n",
                        intvl, now + intvl, func, arg, ev);
-# endif DEBUG
 
        tick();
        return (ev);
 
        tick();
        return (ev);
@@ -105,10 +101,8 @@ clrevent(ev)
 {
        register EVENT **evp;
 
 {
        register EVENT **evp;
 
-# ifdef DEBUG
        if (tTd(5, 5))
                printf("clrevent: ev=%x\n", ev);
        if (tTd(5, 5))
                printf("clrevent: ev=%x\n", ev);
-# endif DEBUG
        if (ev == NULL)
                return;
 
        if (ev == NULL)
                return;
 
@@ -155,10 +149,8 @@ tick()
        (void) alarm(0);
        now = curtime();
 
        (void) alarm(0);
        now = curtime();
 
-# ifdef DEBUG
        if (tTd(5, 4))
                printf("tick: now=%ld\n", now);
        if (tTd(5, 4))
                printf("tick: now=%ld\n", now);
-# endif DEBUG
 
        while ((ev = EventQueue) != NULL &&
               (ev->ev_time <= now || ev->ev_pid != mypid))
 
        while ((ev = EventQueue) != NULL &&
               (ev->ev_time <= now || ev->ev_pid != mypid))
@@ -170,11 +162,9 @@ tick()
                /* process the event on the top of the queue */
                ev = EventQueue;
                EventQueue = EventQueue->ev_link;
                /* process the event on the top of the queue */
                ev = EventQueue;
                EventQueue = EventQueue->ev_link;
-# ifdef DEBUG
                if (tTd(5, 6))
                        printf("tick: ev=%x, func=%x, arg=%d, pid=%d\n", ev,
                                ev->ev_func, ev->ev_arg, ev->ev_pid);
                if (tTd(5, 6))
                        printf("tick: ev=%x, func=%x, arg=%d, pid=%d\n", ev,
                                ev->ev_func, ev->ev_arg, ev->ev_pid);
-# endif DEBUG
 
                /* we must be careful in here because ev_func may not return */
                (void) signal(SIGALRM, tick);
 
                /* we must be careful in here because ev_func may not return */
                (void) signal(SIGALRM, tick);
index c26fa42..daa760a 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)collect.c  5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)collect.c  5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <errno.h>
 #endif /* not lint */
 
 # include <errno.h>
@@ -142,10 +142,8 @@ maketemp(from)
                        break;
        } while (sfgets(buf, MAXFIELD, InChannel) != NULL);
 
                        break;
        } while (sfgets(buf, MAXFIELD, InChannel) != NULL);
 
-# ifdef DEBUG
        if (tTd(30, 1))
                printf("EOH\n");
        if (tTd(30, 1))
                printf("EOH\n");
-# endif DEBUG
 
        /* throw away a blank line */
        if (buf[0] == '\0')
 
        /* throw away a blank line */
        if (buf[0] == '\0')
@@ -225,10 +223,8 @@ maketemp(from)
                {
                        if (q->q_alias != NULL)
                                continue;
                {
                        if (q->q_alias != NULL)
                                continue;
-# ifdef DEBUG
                        if (tTd(30, 3))
                                printf("Adding Apparently-To: %s\n", q->q_paddr);
                        if (tTd(30, 3))
                                printf("Adding Apparently-To: %s\n", q->q_paddr);
-# endif DEBUG
                        addheader("apparently-to", q->q_paddr, CurEnv);
                }
        }
                        addheader("apparently-to", q->q_paddr, CurEnv);
                }
        }
@@ -300,10 +296,8 @@ eatfrom(fm)
        register char *p;
        register char **dt;
 
        register char *p;
        register char **dt;
 
-# ifdef DEBUG
        if (tTd(30, 2))
                printf("eatfrom(%s)\n", fm);
        if (tTd(30, 2))
                printf("eatfrom(%s)\n", fm);
-# endif DEBUG
 
        /* find the date part */
        p = fm;
 
        /* find the date part */
        p = fm;
index cfebee5..4640030 100644 (file)
@@ -15,7 +15,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *     @(#)conf.h      5.14 (Berkeley) %G%
+ *     @(#)conf.h      5.15 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -49,7 +49,6 @@
 
 # define DBM           1       /* use DBM library (requires -ldbm) */
 # define NDBM          1       /* new DBM library available (requires DBM) */
 
 # define DBM           1       /* use DBM library (requires -ldbm) */
 # define NDBM          1       /* new DBM library available (requires DBM) */
-# define DEBUG         1       /* enable debugging */
 # define LOG           1       /* enable logging */
 # define SMTP          1       /* enable user and server SMTP */
 # define QUEUE         1       /* enable queueing */
 # define LOG           1       /* enable logging */
 # define SMTP          1       /* enable user and server SMTP */
 # define QUEUE         1       /* enable queueing */
index 9bae582..b398456 100644 (file)
@@ -22,9 +22,9 @@
 
 #ifndef lint
 #ifdef DAEMON
 
 #ifndef lint
 #ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c   5.28 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c   5.29 (Berkeley) %G% (with daemon mode)";
 #else
 #else
-static char sccsid[] = "@(#)daemon.c   5.28 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c   5.29 (Berkeley) %G% (without daemon mode)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -116,10 +116,8 @@ getrequests()
        **  Try to actually open the connection.
        */
 
        **  Try to actually open the connection.
        */
 
-# ifdef DEBUG
        if (tTd(15, 1))
                printf("getrequests: port 0x%x\n", SendmailAddress.sin_port);
        if (tTd(15, 1))
                printf("getrequests: port 0x%x\n", SendmailAddress.sin_port);
-# endif DEBUG
 
        /* get a socket for the SMTP connection */
        DaemonSocket = socket(AF_INET, SOCK_STREAM, 0);
 
        /* get a socket for the SMTP connection */
        DaemonSocket = socket(AF_INET, SOCK_STREAM, 0);
@@ -134,11 +132,9 @@ getrequests()
                finis();
        }
 
                finis();
        }
 
-#ifdef DEBUG
        /* turn on network debugging? */
        if (tTd(15, 15))
                (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on);
        /* turn on network debugging? */
        if (tTd(15, 15))
                (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on);
-#endif DEBUG
 
        (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof on);
        (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_KEEPALIVE, (char *)&on, sizeof on);
 
        (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof on);
        (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_KEEPALIVE, (char *)&on, sizeof on);
@@ -158,10 +154,8 @@ getrequests()
 
        (void) signal(SIGCHLD, reapchild);
 
 
        (void) signal(SIGCHLD, reapchild);
 
-# ifdef DEBUG
        if (tTd(15, 1))
                printf("getrequests: %d\n", DaemonSocket);
        if (tTd(15, 1))
                printf("getrequests: %d\n", DaemonSocket);
-# endif DEBUG
 
        struct wh wbuf;
 
 
        struct wh wbuf;
 
@@ -279,11 +273,9 @@ makeconnection(host, port, outfile, infile)
        */
 
 again:
        */
 
 again:
-# ifdef DEBUG
        if (tTd(16, 1))
                printf("makeconnection (%s [%s])\n", host,
                    inet_ntoa(SendmailAddress.sin_addr.s_addr));
        if (tTd(16, 1))
                printf("makeconnection (%s [%s])\n", host,
                    inet_ntoa(SendmailAddress.sin_addr.s_addr));
-# endif DEBUG
 
 #ifdef NVMUNIX
        s = socket(AF_INET, SOCK_STREAM, 0, 0);
 
 #ifdef NVMUNIX
        s = socket(AF_INET, SOCK_STREAM, 0, 0);
@@ -297,7 +289,6 @@ again:
                goto failure;
        }
 
                goto failure;
        }
 
-# ifdef DEBUG
        if (tTd(16, 1))
                printf("makeconnection: %d\n", s);
 
        if (tTd(16, 1))
                printf("makeconnection: %d\n", s);
 
@@ -307,7 +298,6 @@ again:
                int on = 1;
                (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on);
        }
                int on = 1;
                (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on);
        }
-# endif DEBUG
        (void) fflush(CurEnv->e_xfp);                   /* for debugging */
        errno = 0;                                      /* for debugging */
 #ifdef NVMUNIX
        (void) fflush(CurEnv->e_xfp);                   /* for debugging */
        errno = 0;                                      /* for debugging */
 #ifdef NVMUNIX
index 82a8d86..e97a0cc 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)deliver.c  5.25 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c  5.26 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sendmail.h>
 #endif /* not lint */
 
 #include <sendmail.h>
@@ -91,11 +91,9 @@ deliver(e, firstto)
        m = to->q_mailer;
        host = to->q_host;
 
        m = to->q_mailer;
        host = to->q_host;
 
-# ifdef DEBUG
        if (tTd(10, 1))
                printf("\n--deliver, mailer=%d, host=`%s', first user=`%s'\n",
                        m->m_mno, host, to->q_user);
        if (tTd(10, 1))
                printf("\n--deliver, mailer=%d, host=`%s', first user=`%s'\n",
                        m->m_mno, host, to->q_user);
-# endif DEBUG
 
        /*
        **  If this mailer is expensive, and if we don't want to make
 
        /*
        **  If this mailer is expensive, and if we don't want to make
@@ -226,13 +224,11 @@ deliver(e, firstto)
                if (sizeof tobuf - (strlen(to->q_paddr) + strlen(tobuf) + 2) < 0)
                        break;
 
                if (sizeof tobuf - (strlen(to->q_paddr) + strlen(tobuf) + 2) < 0)
                        break;
 
-# ifdef DEBUG
                if (tTd(10, 1))
                {
                        printf("\nsend to ");
                        printaddr(to, FALSE);
                }
                if (tTd(10, 1))
                {
                        printf("\nsend to ");
                        printaddr(to, FALSE);
                }
-# endif DEBUG
 
                /* compute effective uid/gid when sending */
                if (to->q_mailer == ProgMailer)
 
                /* compute effective uid/gid when sending */
                if (to->q_mailer == ProgMailer)
@@ -709,13 +705,11 @@ openmailer(m, pvp, ctladdr, clever, pmfile, prfile)
        FILE *rfile;
        extern FILE *fdopen();
 
        FILE *rfile;
        extern FILE *fdopen();
 
-# ifdef DEBUG
        if (tTd(11, 1))
        {
                printf("openmailer:");
                printav(pvp);
        }
        if (tTd(11, 1))
        {
                printf("openmailer:");
                printav(pvp);
        }
-# endif DEBUG
        errno = 0;
 
        CurHostName = m->m_mailer;
        errno = 0;
 
        CurHostName = m->m_mailer;
@@ -729,7 +723,6 @@ openmailer(m, pvp, ctladdr, clever, pmfile, prfile)
        **  We also handle a debug version that just talks to stdin/out.
        */
 
        **  We also handle a debug version that just talks to stdin/out.
        */
 
-#ifdef DEBUG
        /* check for Local Person Communication -- not for mortals!!! */
        if (strcmp(m->m_mailer, "[LPC]") == 0)
        {
        /* check for Local Person Communication -- not for mortals!!! */
        if (strcmp(m->m_mailer, "[LPC]") == 0)
        {
@@ -737,7 +730,6 @@ openmailer(m, pvp, ctladdr, clever, pmfile, prfile)
                *prfile = stdin;
                return (0);
        }
                *prfile = stdin;
                return (0);
        }
-#endif DEBUG
 
        if (strcmp(m->m_mailer, "[IPC]") == 0)
        {
 
        if (strcmp(m->m_mailer, "[IPC]") == 0)
        {
@@ -1334,13 +1326,11 @@ sendall(e, mode)
                        mode = SendMode;
        }
 
                        mode = SendMode;
        }
 
-#ifdef DEBUG
        if (tTd(13, 1))
        {
                printf("\nSENDALL: mode %c, sendqueue:\n", mode);
                printaddr(e->e_sendqueue, TRUE);
        }
        if (tTd(13, 1))
        {
                printf("\nSENDALL: mode %c, sendqueue:\n", mode);
                printaddr(e->e_sendqueue, TRUE);
        }
-#endif DEBUG
 
        /*
        **  Do any preprocessing necessary for the mode we are running.
 
        /*
        **  Do any preprocessing necessary for the mode we are running.
@@ -1436,13 +1426,11 @@ sendall(e, mode)
        {
                register ADDRESS *qq;
 
        {
                register ADDRESS *qq;
 
-# ifdef DEBUG
                if (tTd(13, 3))
                {
                        printf("Checking ");
                        printaddr(q, FALSE);
                }
                if (tTd(13, 3))
                {
                        printf("Checking ");
                        printaddr(q, FALSE);
                }
-# endif DEBUG
 
                /* only send errors if the message failed */
                if (!bitset(QBADADDR, q->q_flags))
 
                /* only send errors if the message failed */
                if (!bitset(QBADADDR, q->q_flags))
@@ -1467,10 +1455,8 @@ sendall(e, mode)
                        if (aliaslookup(obuf) == NULL)
                                continue;
 
                        if (aliaslookup(obuf) == NULL)
                                continue;
 
-# ifdef DEBUG
                        if (tTd(13, 4))
                                printf("Errors to %s\n", obuf);
                        if (tTd(13, 4))
                                printf("Errors to %s\n", obuf);
-# endif DEBUG
 
                        /* owner list exists -- add it to the error queue */
                        sendtolist(obuf, (ADDRESS *) NULL, &e->e_errorqueue);
 
                        /* owner list exists -- add it to the error queue */
                        sendtolist(obuf, (ADDRESS *) NULL, &e->e_errorqueue);
index fe5a913..fb40bf1 100644 (file)
@@ -20,9 +20,9 @@
 
 #ifndef lint
 #ifdef NAMED_BIND
 
 #ifndef lint
 #ifdef NAMED_BIND
-static char sccsid[] = "@(#)domain.c   5.18 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c   5.19 (Berkeley) %G% (with name server)";
 #else
 #else
-static char sccsid[] = "@(#)domain.c   5.18 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c   5.19 (Berkeley) %G% (without name server)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -58,11 +58,9 @@ getmxrr(host, mxhosts, localhost, rcode)
        n = res_search(host, C_IN, T_MX, (char *)&answer, sizeof(answer));
        if (n < 0)
        {
        n = res_search(host, C_IN, T_MX, (char *)&answer, sizeof(answer));
        if (n < 0)
        {
-#ifdef DEBUG
                if (tTd(8, 1))
                        printf("getmxrr: res_search failed (errno=%d, h_errno=%d)\n",
                            errno, h_errno);
                if (tTd(8, 1))
                        printf("getmxrr: res_search failed (errno=%d, h_errno=%d)\n",
                            errno, h_errno);
-#endif
                switch (h_errno)
                {
                  case NO_DATA:
                switch (h_errno)
                {
                  case NO_DATA:
@@ -109,11 +107,9 @@ getmxrr(host, mxhosts, localhost, rcode)
                cp += sizeof(u_short) + sizeof(u_long);
                GETSHORT(n, cp);
                if (type != T_MX)  {
                cp += sizeof(u_short) + sizeof(u_long);
                GETSHORT(n, cp);
                if (type != T_MX)  {
-#ifdef DEBUG
                        if (tTd(8, 1) || _res.options & RES_DEBUG)
                                printf("unexpected answer type %d, size %d\n",
                                    type, n);
                        if (tTd(8, 1) || _res.options & RES_DEBUG)
                                printf("unexpected answer type %d, size %d\n",
                                    type, n);
-#endif
                        cp += n;
                        continue;
                }
                        cp += n;
                        continue;
                }
@@ -199,11 +195,9 @@ loop:
        n = res_search(host, C_IN, T_CNAME, (char *)&answer, sizeof(answer));
 # endif
        if (n < 0) {
        n = res_search(host, C_IN, T_CNAME, (char *)&answer, sizeof(answer));
 # endif
        if (n < 0) {
-#ifdef DEBUG
                if (tTd(8, 1))
                        printf("getcanonname:  res_search failed (errno=%d, h_errno=%d)\n",
                            errno, h_errno);
                if (tTd(8, 1))
                        printf("getcanonname:  res_search failed (errno=%d, h_errno=%d)\n",
                            errno, h_errno);
-#endif
                return;
        }
 
                return;
        }
 
@@ -213,10 +207,8 @@ loop:
 
        /* we don't care about errors here, only if we got an answer */
        if (ancount == 0) {
 
        /* we don't care about errors here, only if we got an answer */
        if (ancount == 0) {
-#ifdef DEBUG
                if (tTd(8, 1))
                        printf("rcode = %d, ancount=%d\n", hp->rcode, ancount);
                if (tTd(8, 1))
                        printf("rcode = %d, ancount=%d\n", hp->rcode, ancount);
-#endif
                return;
        }
        cp = (u_char *)&answer + sizeof(HEADER);
                return;
        }
        cp = (u_char *)&answer + sizeof(HEADER);
index e5f2ba7..02243da 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)envelope.c 5.17 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 5.18 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <pwd.h>
 #endif /* not lint */
 
 #include <pwd.h>
@@ -86,14 +86,12 @@ dropenvelope(e)
        bool queueit = FALSE;
        register ADDRESS *q;
 
        bool queueit = FALSE;
        register ADDRESS *q;
 
-#ifdef DEBUG
        if (tTd(50, 1))
        {
                printf("dropenvelope %x id=", e);
                xputs(e->e_id);
                printf(" flags=%o\n", e->e_flags);
        }
        if (tTd(50, 1))
        {
                printf("dropenvelope %x id=", e);
                xputs(e->e_id);
                printf(" flags=%o\n", e->e_flags);
        }
-#endif DEBUG
 #ifdef LOG
        if (LogLevel > 10)
                syslog(LOG_DEBUG, "dropenvelope, id=%s, flags=%o, pid=%d",
 #ifdef LOG
        if (LogLevel > 10)
                syslog(LOG_DEBUG, "dropenvelope, id=%s, flags=%o, pid=%d",
@@ -429,10 +427,8 @@ setsender(from)
        extern bool safefile();
        extern char *FullName;
 
        extern bool safefile();
        extern char *FullName;
 
-# ifdef DEBUG
        if (tTd(45, 1))
                printf("setsender(%s)\n", from == NULL ? "" : from);
        if (tTd(45, 1))
                printf("setsender(%s)\n", from == NULL ? "" : from);
-# endif DEBUG
 
        /*
        **  Figure out the real user executing us.
 
        /*
        **  Figure out the real user executing us.
index c8c58dc..1a698bc 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)headers.c  5.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)headers.c  5.13 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <errno.h>
 #endif /* not lint */
 
 # include <errno.h>
@@ -55,10 +55,8 @@ chompheader(line, def)
        extern char *crackaddr();
        extern ADDRESS *sendto();
 
        extern char *crackaddr();
        extern ADDRESS *sendto();
 
-# ifdef DEBUG
        if (tTd(31, 6))
                printf("chompheader: %s\n", line);
        if (tTd(31, 6))
                printf("chompheader: %s\n", line);
-# endif DEBUG
 
        /* strip off options */
        clrbitmap(mopts);
 
        /* strip off options */
        clrbitmap(mopts);
@@ -300,18 +298,14 @@ eatheader(e)
        register char *p;
        int hopcnt = 0;
 
        register char *p;
        int hopcnt = 0;
 
-#ifdef DEBUG
        if (tTd(32, 1))
                printf("----- collected header -----\n");
        if (tTd(32, 1))
                printf("----- collected header -----\n");
-#endif DEBUG
        for (h = e->e_header; h != NULL; h = h->h_link)
        {
        for (h = e->e_header; h != NULL; h = h->h_link)
        {
-#ifdef DEBUG
                extern char *capitalize();
 
                if (tTd(32, 1))
                        printf("%s: %s\n", capitalize(h->h_field), h->h_value);
                extern char *capitalize();
 
                if (tTd(32, 1))
                        printf("%s: %s\n", capitalize(h->h_field), h->h_value);
-#endif DEBUG
                /* count the number of times it has been processed */
                if (bitset(H_TRACE, h->h_flags))
                        hopcnt++;
                /* count the number of times it has been processed */
                if (bitset(H_TRACE, h->h_flags))
                        hopcnt++;
@@ -341,10 +335,8 @@ eatheader(e)
                }
 #endif LOG
        }
                }
 #endif LOG
        }
-#ifdef DEBUG
        if (tTd(32, 1))
                printf("----------------------------\n");
        if (tTd(32, 1))
                printf("----------------------------\n");
-#endif DEBUG
 
        /* store hop count */
        if (hopcnt > e->e_hopcount)
 
        /* store hop count */
        if (hopcnt > e->e_hopcount)
@@ -495,10 +487,8 @@ crackaddr(addr)
        bool gotaddr;
        register char *bp;
 
        bool gotaddr;
        register char *bp;
 
-# ifdef DEBUG
        if (tTd(33, 1))
                printf("crackaddr(%s)\n", addr);
        if (tTd(33, 1))
                printf("crackaddr(%s)\n", addr);
-# endif DEBUG
 
        (void) strcpy(buf, "");
        rhs = NULL;
 
        (void) strcpy(buf, "");
        rhs = NULL;
@@ -617,10 +607,8 @@ crackaddr(addr)
                (void) strcpy(bp, rhs);
        }
 
                (void) strcpy(bp, rhs);
        }
 
-# ifdef DEBUG
        if (tTd(33, 1))
                printf("crackaddr=>`%s'\n", buf);
        if (tTd(33, 1))
                printf("crackaddr=>`%s'\n", buf);
-# endif DEBUG
 
        return (buf);
 }
 
        return (buf);
 }
@@ -737,10 +725,8 @@ commaize(h, p, fp, oldstyle, m)
        **  mailer and with commas.
        */
 
        **  mailer and with commas.
        */
 
-# ifdef DEBUG
        if (tTd(14, 2))
                printf("commaize(%s: %s)\n", h->h_field, p);
        if (tTd(14, 2))
                printf("commaize(%s: %s)\n", h->h_field, p);
-# endif DEBUG
 
        obp = obuf;
        (void) sprintf(obp, "%s: ", capitalize(h->h_field));
 
        obp = obuf;
        (void) sprintf(obp, "%s: ", capitalize(h->h_field));
index 55d40a5..af03d64 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)macro.c    5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)macro.c    5.6 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -54,14 +54,12 @@ expand(s, buf, buflim, e)
        char xbuf[BUFSIZ];
        extern char *macvalue();
 
        char xbuf[BUFSIZ];
        extern char *macvalue();
 
-# ifdef DEBUG
        if (tTd(35, 24))
        {
                printf("expand(");
                xputs(s);
                printf(")\n");
        }
        if (tTd(35, 24))
        {
                printf("expand(");
                xputs(s);
                printf(")\n");
        }
-# endif DEBUG
 
        skipping = FALSE;
        if (s == NULL)
 
        skipping = FALSE;
        if (s == NULL)
@@ -121,14 +119,12 @@ expand(s, buf, buflim, e)
        }
        *xp = '\0';
 
        }
        *xp = '\0';
 
-# ifdef DEBUG
        if (tTd(35, 24))
        {
                printf("expand ==> ");
                xputs(xbuf);
                printf("\n");
        }
        if (tTd(35, 24))
        {
                printf("expand ==> ");
                xputs(xbuf);
                printf("\n");
        }
-# endif DEBUG
 
        /* recurse as appropriate */
        if (recurse)
 
        /* recurse as appropriate */
        if (recurse)
@@ -209,14 +205,12 @@ define(n, v, e)
        char *v;
        register ENVELOPE *e;
 {
        char *v;
        register ENVELOPE *e;
 {
-# ifdef DEBUG
        if (tTd(35, 9))
        {
                printf("define(%c as ", n);
                xputs(v);
                printf(")\n");
        }
        if (tTd(35, 9))
        {
                printf("define(%c as ", n);
                xputs(v);
                printf(")\n");
        }
-# endif DEBUG
        e->e_macro[n & 0177] = v;
 }
 \f/*
        e->e_macro[n & 0177] = v;
 }
 \f/*
index ff03c3d..6e8eb55 100644 (file)
@@ -23,7 +23,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.24 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.25 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -193,7 +193,6 @@ main(argc, argv, envp)
                }
                else if (strncmp(p, "-bz", 3) == 0)
                        nothaw = TRUE;
                }
                else if (strncmp(p, "-bz", 3) == 0)
                        nothaw = TRUE;
-# ifdef DEBUG
                else if (strncmp(p, "-d", 2) == 0)
                {
                        tTsetup(tTdvect, sizeof tTdvect, "0-99.1");
                else if (strncmp(p, "-d", 2) == 0)
                {
                        tTsetup(tTdvect, sizeof tTdvect, "0-99.1");
@@ -201,7 +200,6 @@ main(argc, argv, envp)
                        setbuf(stdout, (char *) NULL);
                        printf("Version %s\n", Version);
                }
                        setbuf(stdout, (char *) NULL);
                        printf("Version %s\n", Version);
                }
-# endif DEBUG
        }
        if (!nothaw)
                readconfig = !thaw(FreezeFile);
        }
        if (!nothaw)
                readconfig = !thaw(FreezeFile);
@@ -255,20 +253,16 @@ main(argc, argv, envp)
                av = myhostname(jbuf, sizeof jbuf);
                if (jbuf[0] != '\0')
                {
                av = myhostname(jbuf, sizeof jbuf);
                if (jbuf[0] != '\0')
                {
-#ifdef DEBUG
                        if (tTd(0, 4))
                                printf("canonical name: %s\n", jbuf);
                        if (tTd(0, 4))
                                printf("canonical name: %s\n", jbuf);
-#endif DEBUG
                        p = newstr(jbuf);
                        define('w', p, CurEnv);
                        setclass('w', p);
                }
                while (av != NULL && *av != NULL)
                {
                        p = newstr(jbuf);
                        define('w', p, CurEnv);
                        setclass('w', p);
                }
                while (av != NULL && *av != NULL)
                {
-#ifdef DEBUG
                        if (tTd(0, 4))
                                printf("\ta.k.a.: %s\n", *av);
                        if (tTd(0, 4))
                                printf("\ta.k.a.: %s\n", *av);
-#endif DEBUG
                        setclass('w', *av++);
                }
 
                        setclass('w', *av++);
                }
 
@@ -338,7 +332,6 @@ main(argc, argv, envp)
                  case 'C':     /* select configuration file (already done) */
                        break;
 
                  case 'C':     /* select configuration file (already done) */
                        break;
 
-#ifdef DEBUG
                  case 'd':     /* debugging -- redo in case frozen */
                        tTsetup(tTdvect, sizeof tTdvect, "0-99.1");
                        tTflag(&p[2]);
                  case 'd':     /* debugging -- redo in case frozen */
                        tTsetup(tTdvect, sizeof tTdvect, "0-99.1");
                        tTflag(&p[2]);
@@ -347,7 +340,6 @@ main(argc, argv, envp)
                        _res.options |= RES_DEBUG;
 #endif
                        break;
                        _res.options |= RES_DEBUG;
 #endif
                        break;
-#endif
 
                  case 'f':     /* from address */
                  case 'r':     /* obsolete -f flag */
 
                  case 'f':     /* from address */
                  case 'r':     /* obsolete -f flag */
@@ -535,7 +527,6 @@ main(argc, argv, envp)
                break;
        }
 
                break;
        }
 
-# ifdef DEBUG
        if (tTd(0, 15))
        {
                /* print configuration table (or at least part of it) */
        if (tTd(0, 15))
        {
                /* print configuration table (or at least part of it) */
@@ -558,7 +549,6 @@ main(argc, argv, envp)
                        printf("\n");
                }
        }
                        printf("\n");
                }
        }
-# endif DEBUG
 
        /*
        **  Switch to the main envelope.
 
        /*
        **  Switch to the main envelope.
@@ -726,10 +716,8 @@ main(argc, argv, envp)
        if (OpMode != MD_VERIFY)
                markstats(CurEnv, (ADDRESS *) NULL);
 
        if (OpMode != MD_VERIFY)
                markstats(CurEnv, (ADDRESS *) NULL);
 
-# ifdef DEBUG
        if (tTd(1, 1))
                printf("From person = \"%s\"\n", CurEnv->e_from.q_paddr);
        if (tTd(1, 1))
                printf("From person = \"%s\"\n", CurEnv->e_from.q_paddr);
-# endif DEBUG
 
        /*
        **  Actually send everything.
 
        /*
        **  Actually send everything.
@@ -761,10 +749,8 @@ main(argc, argv, envp)
 
 finis()
 {
 
 finis()
 {
-# ifdef DEBUG
        if (tTd(2, 1))
                printf("\n====finis: stat %d e_flags %o\n", ExitStat, CurEnv->e_flags);
        if (tTd(2, 1))
                printf("\n====finis: stat %d e_flags %o\n", ExitStat, CurEnv->e_flags);
-# endif DEBUG
 
        /* clean up temp files */
        CurEnv->e_to = NULL;
 
        /* clean up temp files */
        CurEnv->e_to = NULL;
@@ -1019,7 +1005,6 @@ disconnect(fulldrop)
 {
        int fd;
 
 {
        int fd;
 
-#ifdef DEBUG
        if (tTd(52, 1))
                printf("disconnect: In %d Out %d\n", fileno(InChannel),
                                                fileno(OutChannel));
        if (tTd(52, 1))
                printf("disconnect: In %d Out %d\n", fileno(InChannel),
                                                fileno(OutChannel));
@@ -1028,7 +1013,6 @@ disconnect(fulldrop)
                printf("don't\n");
                return;
        }
                printf("don't\n");
                return;
        }
-#endif DEBUG
 
        /* be sure we don't get nasty signals */
        (void) signal(SIGHUP, SIG_IGN);
 
        /* be sure we don't get nasty signals */
        (void) signal(SIGHUP, SIG_IGN);
index 62de785..bd087d1 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)parseaddr.c        5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c        5.10 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -81,10 +81,8 @@ parseaddr(addr, a, copyf, delim)
        */
 
        CurEnv->e_to = addr;
        */
 
        CurEnv->e_to = addr;
-# ifdef DEBUG
        if (tTd(20, 1))
                printf("\n--parseaddr(%s)\n", addr);
        if (tTd(20, 1))
                printf("\n--parseaddr(%s)\n", addr);
-# endif DEBUG
 
        pvp = prescan(addr, delim, pvpbuf);
        if (pvp == NULL)
 
        pvp = prescan(addr, delim, pvpbuf);
        if (pvp == NULL)
@@ -159,13 +157,11 @@ parseaddr(addr, a, copyf, delim)
        **  Compute return value.
        */
 
        **  Compute return value.
        */
 
-# ifdef DEBUG
        if (tTd(20, 1))
        {
                printf("parseaddr-->");
                printaddr(a, FALSE);
        }
        if (tTd(20, 1))
        {
                printf("parseaddr-->");
                printaddr(a, FALSE);
        }
-# endif DEBUG
 
        return (a);
 }
 
        return (a);
 }
@@ -281,14 +277,12 @@ prescan(addr, delim, pvpbuf)
        state = OPR;
        c = NOCHAR;
        p = addr;
        state = OPR;
        c = NOCHAR;
        p = addr;
-# ifdef DEBUG
        if (tTd(22, 45))
        {
                printf("prescan: ");
                xputs(p);
                (void) putchar('\n');
        }
        if (tTd(22, 45))
        {
                printf("prescan: ");
                xputs(p);
                (void) putchar('\n');
        }
-# endif DEBUG
 
        do
        {
 
        do
        {
@@ -317,10 +311,8 @@ prescan(addr, delim, pvpbuf)
                                break;
                        c &= ~0200;
 
                                break;
                        c &= ~0200;
 
-# ifdef DEBUG
                        if (tTd(22, 101))
                                printf("c=%c, s=%d; ", c, state);
                        if (tTd(22, 101))
                                printf("c=%c, s=%d; ", c, state);
-# endif DEBUG
 
                        /* chew up special characters */
                        *q = '\0';
 
                        /* chew up special characters */
                        *q = '\0';
@@ -392,10 +384,8 @@ prescan(addr, delim, pvpbuf)
                                break;
 
                        newstate = StateTab[state][toktype(c)];
                                break;
 
                        newstate = StateTab[state][toktype(c)];
-# ifdef DEBUG
                        if (tTd(22, 101))
                                printf("ns=%02o\n", newstate);
                        if (tTd(22, 101))
                                printf("ns=%02o\n", newstate);
-# endif DEBUG
                        state = newstate & TYPE;
                        if (bitset(M, newstate))
                                c = NOCHAR;
                        state = newstate & TYPE;
                        if (bitset(M, newstate))
                                c = NOCHAR;
@@ -407,14 +397,12 @@ prescan(addr, delim, pvpbuf)
                if (tok != q)
                {
                        *q++ = '\0';
                if (tok != q)
                {
                        *q++ = '\0';
-# ifdef DEBUG
                        if (tTd(22, 36))
                        {
                                printf("tok=");
                                xputs(tok);
                                (void) putchar('\n');
                        }
                        if (tTd(22, 36))
                        {
                                printf("tok=");
                                xputs(tok);
                                (void) putchar('\n');
                        }
-# endif DEBUG
                        if (avp >= &av[MAXATOM])
                        {
                                syserr("prescan: too many tokens");
                        if (avp >= &av[MAXATOM])
                        {
                                syserr("prescan: too many tokens");
@@ -544,13 +532,11 @@ rewrite(pvp, ruleset)
 
        for (rwr = RewriteRules[ruleset]; rwr != NULL; )
        {
 
        for (rwr = RewriteRules[ruleset]; rwr != NULL; )
        {
-# ifdef DEBUG
                if (tTd(21, 12))
                {
                        printf("-----trying rule:");
                        printav(rwr->r_lhs);
                }
                if (tTd(21, 12))
                {
                        printf("-----trying rule:");
                        printav(rwr->r_lhs);
                }
-# endif DEBUG
 
                /* try to match on this rule */
                mlp = mlist;
 
                /* try to match on this rule */
                mlp = mlist;
@@ -559,7 +545,6 @@ rewrite(pvp, ruleset)
                while ((ap = *avp) != NULL || *rvp != NULL)
                {
                        rp = *rvp;
                while ((ap = *avp) != NULL || *rvp != NULL)
                {
                        rp = *rvp;
-# ifdef DEBUG
                        if (tTd(21, 35))
                        {
                                printf("ap=");
                        if (tTd(21, 35))
                        {
                                printf("ap=");
@@ -568,7 +553,6 @@ rewrite(pvp, ruleset)
                                xputs(rp);
                                printf("\n");
                        }
                                xputs(rp);
                                printf("\n");
                        }
-# endif DEBUG
                        if (rp == NULL)
                        {
                                /* end-of-pattern before end-of-address */
                        if (rp == NULL)
                        {
                                /* end-of-pattern before end-of-address */
@@ -660,22 +644,18 @@ rewrite(pvp, ruleset)
 
                if (rvp < rwr->r_lhs || *rvp != NULL)
                {
 
                if (rvp < rwr->r_lhs || *rvp != NULL)
                {
-# ifdef DEBUG
                        if (tTd(21, 10))
                                printf("----- rule fails\n");
                        if (tTd(21, 10))
                                printf("----- rule fails\n");
-# endif DEBUG
                        rwr = rwr->r_next;
                        continue;
                }
 
                rvp = rwr->r_rhs;
                        rwr = rwr->r_next;
                        continue;
                }
 
                rvp = rwr->r_rhs;
-# ifdef DEBUG
                if (tTd(21, 12))
                {
                        printf("-----rule matches:");
                        printav(rvp);
                }
                if (tTd(21, 12))
                {
                        printf("-----rule matches:");
                        printav(rvp);
                }
-# endif DEBUG
 
                rp = *rvp;
                if (*rp == CANONUSER)
 
                rp = *rvp;
                if (*rp == CANONUSER)
@@ -715,7 +695,6 @@ rewrite(pvp, ruleset)
                                        syserr("rewrite: ruleset %d: replacement out of bounds", ruleset);
                                        return;
                                }
                                        syserr("rewrite: ruleset %d: replacement out of bounds", ruleset);
                                        return;
                                }
-# ifdef DEBUG
                                if (tTd(21, 15))
                                {
                                        printf("$%c:", rp[1]);
                                if (tTd(21, 15))
                                {
                                        printf("$%c:", rp[1]);
@@ -728,7 +707,6 @@ rewrite(pvp, ruleset)
                                        }
                                        printf("\n");
                                }
                                        }
                                        printf("\n");
                                }
-# endif DEBUG
                                pp = m->first;
                                while (pp <= m->last)
                                {
                                pp = m->first;
                                while (pp <= m->last)
                                {
@@ -871,13 +849,11 @@ rewrite(pvp, ruleset)
                **  Done with rewriting this pass.
                */
 
                **  Done with rewriting this pass.
                */
 
-# ifdef DEBUG
                if (tTd(21, 4))
                {
                        printf("rewritten as:");
                        printav(pvp);
                }
                if (tTd(21, 4))
                {
                        printf("rewritten as:");
                        printav(pvp);
                }
-# endif DEBUG
        }
 
        if (OpMode == MD_TEST || tTd(21, 2))
        }
 
        if (OpMode == MD_TEST || tTd(21, 2))
@@ -1090,8 +1066,6 @@ sameaddr(a, b)
 **             none.
 */
 
 **             none.
 */
 
-# ifdef DEBUG
-
 printaddr(a, follow)
        register ADDRESS *a;
        bool follow;
 printaddr(a, follow)
        register ADDRESS *a;
        bool follow;
@@ -1128,7 +1102,6 @@ printaddr(a, follow)
                printf("[NULL]\n");
 }
 
                printf("[NULL]\n");
 }
 
-# endif DEBUG
 \f/*
 **  REMOTENAME -- return the name relative to the current mailer
 **
 \f/*
 **  REMOTENAME -- return the name relative to the current mailer
 **
@@ -1170,10 +1143,8 @@ remotename(name, m, senderaddress, canonical)
        extern char **prescan();
        extern char *crackaddr();
 
        extern char **prescan();
        extern char *crackaddr();
 
-# ifdef DEBUG
        if (tTd(12, 1))
                printf("remotename(%s)\n", name);
        if (tTd(12, 1))
                printf("remotename(%s)\n", name);
-# endif DEBUG
 
        /* don't do anything if we are tagging it as special */
        if ((senderaddress ? m->m_s_rwset : m->m_r_rwset) < 0)
 
        /* don't do anything if we are tagging it as special */
        if ((senderaddress ? m->m_s_rwset : m->m_r_rwset) < 0)
@@ -1258,9 +1229,7 @@ remotename(name, m, senderaddress, canonical)
        expand(fancy, buf, &buf[sizeof buf - 1], CurEnv);
        define('g', oldg, CurEnv);
 
        expand(fancy, buf, &buf[sizeof buf - 1], CurEnv);
        define('g', oldg, CurEnv);
 
-# ifdef DEBUG
        if (tTd(12, 1))
                printf("remotename => `%s'\n", buf);
        if (tTd(12, 1))
                printf("remotename => `%s'\n", buf);
-# endif DEBUG
        return (buf);
 }
        return (buf);
 }
index ddfef18..a53fd1a 100644 (file)
@@ -20,9 +20,9 @@
 
 #ifndef lint
 #ifdef QUEUE
 
 #ifndef lint
 #ifdef QUEUE
-static char sccsid[] = "@(#)queue.c    5.25 (Berkeley) %G% (with queueing)";
+static char sccsid[] = "@(#)queue.c    5.26 (Berkeley) %G% (with queueing)";
 #else
 #else
-static char sccsid[] = "@(#)queue.c    5.25 (Berkeley) %G% (without queueing)";
+static char sccsid[] = "@(#)queue.c    5.26 (Berkeley) %G% (without queueing)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -90,10 +90,8 @@ queueup(e, queueall, announce)
        }
        (void) chmod(tf, FileMode);
 
        }
        (void) chmod(tf, FileMode);
 
-# ifdef DEBUG
        if (tTd(40, 1))
                printf("queueing %s\n", e->e_id);
        if (tTd(40, 1))
                printf("queueing %s\n", e->e_id);
-# endif DEBUG
 
        /*
        **  If there is no data file yet, create one.
 
        /*
        **  If there is no data file yet, create one.
@@ -155,13 +153,11 @@ queueup(e, queueall, announce)
                                        logdelivery("queued");
                                e->e_to = NULL;
                        }
                                        logdelivery("queued");
                                e->e_to = NULL;
                        }
-#ifdef DEBUG
                        if (tTd(40, 1))
                        {
                                printf("queueing ");
                                printaddr(q, FALSE);
                        }
                        if (tTd(40, 1))
                        {
                                printf("queueing ");
                                printaddr(q, FALSE);
                        }
-#endif DEBUG
                }
        }
 
                }
        }
 
@@ -450,11 +446,9 @@ orderq(doall)
                {
                        /* this may be some random person sending hir msgs */
                        /* syserr("orderq: cannot open %s", cbuf); */
                {
                        /* this may be some random person sending hir msgs */
                        /* syserr("orderq: cannot open %s", cbuf); */
-#ifdef DEBUG
                        if (tTd(41, 2))
                                printf("orderq: cannot open %s (%d)\n",
                                        d->d_name, errno);
                        if (tTd(41, 2))
                                printf("orderq: cannot open %s (%d)\n",
                                        d->d_name, errno);
-#endif DEBUG
                        errno = 0;
                        wn--;
                        continue;
                        errno = 0;
                        wn--;
                        continue;
@@ -518,13 +512,11 @@ orderq(doall)
                WorkQ = w;
        }
 
                WorkQ = w;
        }
 
-# ifdef DEBUG
        if (tTd(40, 1))
        {
                for (w = WorkQ; w != NULL; w = w->w_next)
                        printf("%32s: pri=%ld\n", w->w_name, w->w_pri);
        }
        if (tTd(40, 1))
        {
                for (w = WorkQ; w != NULL; w = w->w_next)
                        printf("%32s: pri=%ld\n", w->w_name, w->w_pri);
        }
-# endif DEBUG
 
        return (wn);
 }
 
        return (wn);
 }
@@ -577,10 +569,8 @@ dowork(w)
        register int i;
        extern bool shouldqueue();
 
        register int i;
        extern bool shouldqueue();
 
-# ifdef DEBUG
        if (tTd(40, 1))
                printf("dowork: %s pri %ld\n", w->w_name, w->w_pri);
        if (tTd(40, 1))
                printf("dowork: %s pri %ld\n", w->w_name, w->w_pri);
-# endif DEBUG
 
        /*
        **  Ignore jobs that are too expensive for the moment.
 
        /*
        **  Ignore jobs that are too expensive for the moment.
@@ -722,10 +712,8 @@ readqf(e, full)
                printf("\nRunning %s\n", e->e_id);
        while (fgetfolded(buf, sizeof buf, qfp) != NULL)
        {
                printf("\nRunning %s\n", e->e_id);
        while (fgetfolded(buf, sizeof buf, qfp) != NULL)
        {
-# ifdef DEBUG
                if (tTd(40, 4))
                        printf("+++++ %s\n", buf);
                if (tTd(40, 4))
                        printf("+++++ %s\n", buf);
-# endif DEBUG
                switch (buf[0])
                {
                  case 'R':             /* specify recipient */
                switch (buf[0])
                {
                  case 'R':             /* specify recipient */
@@ -972,10 +960,8 @@ queuename(e, type)
                        }
                        lf[2] = nf[2] = qf[2] = c1;
                        lf[3] = nf[3] = qf[3] = ++c2;
                        }
                        lf[2] = nf[2] = qf[2] = c1;
                        lf[3] = nf[3] = qf[3] = ++c2;
-# ifdef DEBUG
                        if (tTd(7, 20))
                                printf("queuename: trying \"%s\"\n", nf);
                        if (tTd(7, 20))
                                printf("queuename: trying \"%s\"\n", nf);
-# endif DEBUG
 
 # ifdef QUEUE
                        if (access(lf, 0) >= 0 || access(qf, 0) >= 0)
 
 # ifdef QUEUE
                        if (access(lf, 0) >= 0 || access(qf, 0) >= 0)
@@ -1013,23 +999,19 @@ queuename(e, type)
                }
                e->e_id = newstr(&qf[2]);
                define('i', e->e_id, e);
                }
                e->e_id = newstr(&qf[2]);
                define('i', e->e_id, e);
-# ifdef DEBUG
                if (tTd(7, 1))
                        printf("queuename: assigned id %s, env=%x\n", e->e_id, e);
 # ifdef LOG
                if (LogLevel > 16)
                        syslog(LOG_DEBUG, "%s: assigned id", e->e_id);
 # endif LOG
                if (tTd(7, 1))
                        printf("queuename: assigned id %s, env=%x\n", e->e_id, e);
 # ifdef LOG
                if (LogLevel > 16)
                        syslog(LOG_DEBUG, "%s: assigned id", e->e_id);
 # endif LOG
-# endif DEBUG
        }
 
        if (type == '\0')
                return (NULL);
        (void) sprintf(buf, "%cf%s", type, e->e_id);
        }
 
        if (type == '\0')
                return (NULL);
        (void) sprintf(buf, "%cf%s", type, e->e_id);
-# ifdef DEBUG
        if (tTd(7, 2))
                printf("queuename: %s\n", buf);
        if (tTd(7, 2))
                printf("queuename: %s\n", buf);
-# endif DEBUG
        return (buf);
 }
 \f/*
        return (buf);
 }
 \f/*
@@ -1049,13 +1031,11 @@ unlockqueue(e)
        ENVELOPE *e;
 {
        /* remove the transcript */
        ENVELOPE *e;
 {
        /* remove the transcript */
-#ifdef DEBUG
 # ifdef LOG
        if (LogLevel > 19)
                syslog(LOG_DEBUG, "%s: unlock", e->e_id);
 # endif LOG
        if (!tTd(51, 4))
 # ifdef LOG
        if (LogLevel > 19)
                syslog(LOG_DEBUG, "%s: unlock", e->e_id);
 # endif LOG
        if (!tTd(51, 4))
-#endif DEBUG
                xunlink(queuename(e, 'x'));
 
 # ifdef QUEUE
                xunlink(queuename(e, 'x'));
 
 # ifdef QUEUE
index 245e887..cfa1a72 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)readcf.c   5.16 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c   5.17 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -603,8 +603,6 @@ makeargv(p)
 **             prints rewrite rules.
 */
 
 **             prints rewrite rules.
 */
 
-# ifdef DEBUG
-
 printrules()
 {
        register struct rewrite *rwp;
 printrules()
 {
        register struct rewrite *rwp;
@@ -626,7 +624,6 @@ printrules()
        }
 }
 
        }
 }
 
-# endif DEBUG
 \f/*
 **  SETOPTION -- set global processing option
 **
 \f/*
 **  SETOPTION -- set global processing option
 **
@@ -658,10 +655,8 @@ setoption(opt, val, sticky)
        extern bool trusteduser();
        extern char *username();
 
        extern bool trusteduser();
        extern char *username();
 
-# ifdef DEBUG
        if (tTd(37, 1))
                printf("setoption %c=%s", opt, val);
        if (tTd(37, 1))
                printf("setoption %c=%s", opt, val);
-# endif DEBUG
 
        /*
        **  See if this option is preset for us.
 
        /*
        **  See if this option is preset for us.
@@ -669,17 +664,13 @@ setoption(opt, val, sticky)
 
        if (bitnset(opt, StickyOpt))
        {
 
        if (bitnset(opt, StickyOpt))
        {
-# ifdef DEBUG
                if (tTd(37, 1))
                        printf(" (ignored)\n");
                if (tTd(37, 1))
                        printf(" (ignored)\n");
-# endif DEBUG
                return;
        }
 
                return;
        }
 
-#ifdef DEBUG
        if (tTd(37, 1))
                printf("\n");
        if (tTd(37, 1))
                printf("\n");
-#endif DEBUG
 
        switch (opt)
        {
 
        switch (opt)
        {
index 7873eed..0c766cf 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)recipient.c        5.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c        5.14 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <pwd.h>
 #endif /* not lint */
 
 # include <pwd.h>
@@ -70,13 +70,11 @@ sendto(list, copyf, ctladdr, qflags)
        ADDRESS *sibl;          /* sibling pointer in tree */
        ADDRESS *prev;          /* previous sibling */
 
        ADDRESS *sibl;          /* sibling pointer in tree */
        ADDRESS *prev;          /* previous sibling */
 
-# ifdef DEBUG
        if (tTd(25, 1))
        {
                printf("sendto: %s\n   ctladdr=", list);
                printaddr(ctladdr, FALSE);
        }
        if (tTd(25, 1))
        {
                printf("sendto: %s\n   ctladdr=", list);
                printaddr(ctladdr, FALSE);
        }
-# endif DEBUG
 
        /* heuristic to determine old versus new style addresses */
        if (ctladdr == NULL &&
 
        /* heuristic to determine old versus new style addresses */
        if (ctladdr == NULL &&
@@ -230,13 +228,11 @@ recipient(a, sendq)
        CurEnv->e_to = a->q_paddr;
        m = a->q_mailer;
        errno = 0;
        CurEnv->e_to = a->q_paddr;
        m = a->q_mailer;
        errno = 0;
-# ifdef DEBUG
        if (tTd(26, 1))
        {
                printf("\nrecipient: ");
                printaddr(a, FALSE);
        }
        if (tTd(26, 1))
        {
                printf("\nrecipient: ");
                printaddr(a, FALSE);
        }
-# endif DEBUG
 
        /* break aliasing loops */
        if (AliasLevel > MAXRCRSN)
 
        /* break aliasing loops */
        if (AliasLevel > MAXRCRSN)
@@ -290,13 +286,11 @@ recipient(a, sendq)
        {
                if (!ForceMail && sameaddr(q, a))
                {
        {
                if (!ForceMail && sameaddr(q, a))
                {
-# ifdef DEBUG
                        if (tTd(26, 1))
                        {
                                printf("%s in sendq: ", a->q_paddr);
                                printaddr(q, FALSE);
                        }
                        if (tTd(26, 1))
                        {
                                printf("%s in sendq: ", a->q_paddr);
                                printaddr(q, FALSE);
                        }
-# endif DEBUG
                        if (Verbose && !bitset(QDONTSEND|QPSEUDO, a->q_flags))
                                message(Arpa_Info, "duplicate suppressed");
                        if (!bitset(QPRIMARY, q->q_flags))
                        if (Verbose && !bitset(QDONTSEND|QPSEUDO, a->q_flags))
                                message(Arpa_Info, "duplicate suppressed");
                        if (!bitset(QPRIMARY, q->q_flags))
index f8c1eda..b334f53 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)savemail.c 5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <pwd.h>
 #endif /* not lint */
 
 # include <pwd.h>
@@ -67,10 +67,8 @@ savemail(e)
        extern char *ttypath();
        typedef int (*fnptr)();
 
        extern char *ttypath();
        typedef int (*fnptr)();
 
-# ifdef DEBUG
        if (tTd(6, 1))
                printf("\nsavemail, ErrorMode = %c\n", ErrorMode);
        if (tTd(6, 1))
                printf("\nsavemail, ErrorMode = %c\n", ErrorMode);
-# endif DEBUG
 
        if (bitset(EF_RESPONSE, e->e_flags))
                return;
 
        if (bitset(EF_RESPONSE, e->e_flags))
                return;
@@ -147,10 +145,8 @@ savemail(e)
 
        while (state != ESM_DONE)
        {
 
        while (state != ESM_DONE)
        {
-# ifdef DEBUG
                if (tTd(6, 5))
                        printf("  state %d\n", state);
                if (tTd(6, 5))
                        printf("  state %d\n", state);
-# endif DEBUG
 
                switch (state)
                {
 
                switch (state)
                {
@@ -374,7 +370,6 @@ returntosender(msg, returnq, sendbody)
        static int returndepth;
        register ADDRESS *q;
 
        static int returndepth;
        register ADDRESS *q;
 
-# ifdef DEBUG
        if (tTd(6, 1))
        {
                printf("Return To Sender: msg=\"%s\", depth=%d, CurEnv=%x,\n",
        if (tTd(6, 1))
        {
                printf("Return To Sender: msg=\"%s\", depth=%d, CurEnv=%x,\n",
@@ -382,7 +377,6 @@ returntosender(msg, returnq, sendbody)
                printf("\treturnq=");
                printaddr(returnq, TRUE);
        }
                printf("\treturnq=");
                printaddr(returnq, TRUE);
        }
-# endif DEBUG
 
        if (++returndepth >= MAXRETURNS)
        {
 
        if (++returndepth >= MAXRETURNS)
        {
index bb352a7..72e0388 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)stab.c     5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)stab.c     5.6 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -57,10 +57,8 @@ stab(name, type, op)
        register char *p;
        extern char lower();
 
        register char *p;
        extern char lower();
 
-# ifdef DEBUG
        if (tTd(36, 5))
                printf("STAB: %s %d ", name, type);
        if (tTd(36, 5))
                printf("STAB: %s %d ", name, type);
-# endif DEBUG
 
        /*
        **  Compute the hashing function
 
        /*
        **  Compute the hashing function
@@ -72,10 +70,8 @@ stab(name, type, op)
        for (p = name; *p != '\0'; p++)
                hfunc = (((hfunc << 7) | lower(*p)) & 077777) % STABSIZE;
 
        for (p = name; *p != '\0'; p++)
                hfunc = (((hfunc << 7) | lower(*p)) & 077777) % STABSIZE;
 
-# ifdef DEBUG
        if (tTd(36, 9))
                printf("(hfunc=%d) ", hfunc);
        if (tTd(36, 9))
                printf("(hfunc=%d) ", hfunc);
-# endif DEBUG
 
        ps = &SymTab[hfunc];
        while ((s = *ps) != NULL && (strcasecmp(name, s->s_name) || s->s_type != type))
 
        ps = &SymTab[hfunc];
        while ((s = *ps) != NULL && (strcasecmp(name, s->s_name) || s->s_type != type))
@@ -87,7 +83,6 @@ stab(name, type, op)
 
        if (s != NULL || op == ST_FIND)
        {
 
        if (s != NULL || op == ST_FIND)
        {
-# ifdef DEBUG
                if (tTd(36, 5))
                {
                        if (s == NULL)
                if (tTd(36, 5))
                {
                        if (s == NULL)
@@ -100,7 +95,6 @@ stab(name, type, op)
                                        s->s_type, lp[0], lp[1], lp[2], lp[3]);
                        }
                }
                                        s->s_type, lp[0], lp[1], lp[2], lp[3]);
                        }
                }
-# endif DEBUG
                return (s);
        }
 
                return (s);
        }
 
@@ -108,10 +102,8 @@ stab(name, type, op)
        **  Make a new entry and link it in.
        */
 
        **  Make a new entry and link it in.
        */
 
-# ifdef DEBUG
        if (tTd(36, 5))
                printf("entered\n");
        if (tTd(36, 5))
                printf("entered\n");
-# endif DEBUG
 
        /* make new entry */
        s = (STAB *) xalloc(sizeof *s);
 
        /* make new entry */
        s = (STAB *) xalloc(sizeof *s);
index b27b827..5ca6ddb 100644 (file)
@@ -20,9 +20,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)usersmtp.c 5.11 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 5.12 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)usersmtp.c 5.11 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 5.12 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -87,10 +87,8 @@ smtpinit(m, pvp)
        **  Open the connection to the mailer.
        */
 
        **  Open the connection to the mailer.
        */
 
-#ifdef DEBUG
        if (SmtpState == SMTP_OPEN)
                syserr("smtpinit: already open");
        if (SmtpState == SMTP_OPEN)
                syserr("smtpinit: already open");
-#endif DEBUG
 
        SmtpIn = SmtpOut = NULL;
        SmtpState = SMTP_CLOSED;
 
        SmtpIn = SmtpOut = NULL;
        SmtpState = SMTP_CLOSED;
@@ -99,11 +97,9 @@ smtpinit(m, pvp)
        SmtpPid = openmailer(m, pvp, (ADDRESS *) NULL, TRUE, &SmtpOut, &SmtpIn);
        if (SmtpPid < 0)
        {
        SmtpPid = openmailer(m, pvp, (ADDRESS *) NULL, TRUE, &SmtpOut, &SmtpIn);
        if (SmtpPid < 0)
        {
-# ifdef DEBUG
                if (tTd(18, 1))
                        printf("smtpinit: cannot open %s: stat %d errno %d\n",
                           pvp[0], ExitStat, errno);
                if (tTd(18, 1))
                        printf("smtpinit: cannot open %s: stat %d errno %d\n",
                           pvp[0], ExitStat, errno);
-# endif DEBUG
                if (CurEnv->e_xfp != NULL)
                {
                        register char *p;
                if (CurEnv->e_xfp != NULL)
                {
                        register char *p;
@@ -424,11 +420,9 @@ reply(m)
 # endif ECONNRESET
 
                        message(Arpa_TSyserr, "reply: read error");
 # endif ECONNRESET
 
                        message(Arpa_TSyserr, "reply: read error");
-# ifdef DEBUG
                        /* if debugging, pause so we can see state */
                        if (tTd(18, 100))
                                pause();
                        /* if debugging, pause so we can see state */
                        if (tTd(18, 100))
                                pause();
-# endif DEBUG
 # ifdef LOG
                        syslog(LOG_INFO, "%s", &MsgBuf[4]);
 # endif LOG
 # ifdef LOG
                        syslog(LOG_INFO, "%s", &MsgBuf[4]);
 # endif LOG