From cbcd7b2234d4f6e31e7782dccd9a0407f6d0267f Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Tue, 23 Feb 1993 00:59:05 -0800 Subject: [PATCH] delete -R flag (RcptLogFile handling) SCCS-vsn: usr.sbin/sendmail/src/recipient.c 6.15 SCCS-vsn: usr.sbin/sendmail/src/main.c 6.25 --- usr/src/usr.sbin/sendmail/src/main.c | 21 ++----------- usr/src/usr.sbin/sendmail/src/recipient.c | 36 +---------------------- 2 files changed, 3 insertions(+), 54 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/main.c b/usr/src/usr.sbin/sendmail/src/main.c index 565eaa4963..52c5c26d1d 100644 --- a/usr/src/usr.sbin/sendmail/src/main.c +++ b/usr/src/usr.sbin/sendmail/src/main.c @@ -13,7 +13,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)main.c 6.24 (Berkeley) %G%"; +static char sccsid[] = "@(#)main.c 6.25 (Berkeley) %G%"; #endif /* not lint */ #define _DEFINE @@ -87,19 +87,6 @@ char **Argv = NULL; /* pointer to argument vector */ char *LastArgv = NULL; /* end of argv */ # endif /* SETPROCTITLE */ -/* -** The file in which to log raw recipient information. -** This is logged before aliasing, forwarding, and so forth so we -** can see how our addresses are being used. For example, this -** would give us the names of aliases (instead of what they alias -** to), the pre-MX hostnames, and so forth. -** -** This is specified on the command line, not in the config file, -** and is therefore really only useful for logging SMTP RCPTs. -*/ - -char *RcptLogFile = NULL; /* file name */ - static void obsolete(); #ifdef DAEMON @@ -219,7 +206,7 @@ main(argc, argv, envp) ** to the run that froze the configuration. */ nothaw = FALSE; -#define OPTIONS "b:C:cd:e:F:f:h:Iimno:p:q:R:r:sTtv" +#define OPTIONS "b:C:cd:e:F:f:h:Iimno:p:q:r:sTtv" while ((j = getopt(argc, argv, OPTIONS)) != EOF) { switch (j) @@ -492,10 +479,6 @@ main(argc, argv, envp) break; # endif /* DBM */ - case 'R': /* log raw recipient info */ - RcptLogFile = newstr(optarg); - break; - default: ExitStat = EX_USAGE; finis(); diff --git a/usr/src/usr.sbin/sendmail/src/recipient.c b/usr/src/usr.sbin/sendmail/src/recipient.c index 4c2a873f7e..f58724718e 100644 --- a/usr/src/usr.sbin/sendmail/src/recipient.c +++ b/usr/src/usr.sbin/sendmail/src/recipient.c @@ -7,7 +7,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)recipient.c 6.14 (Berkeley) %G%"; +static char sccsid[] = "@(#)recipient.c 6.15 (Berkeley) %G%"; #endif /* not lint */ # include @@ -200,7 +200,6 @@ addrref(a, r) */ extern ADDRESS *getctladdr(); -extern char *RcptLogFile; ADDRESS * ADDRESS * @@ -295,39 +294,6 @@ recipient(a, sendq, e) *pq = a; a->q_next = NULL; - if (a->q_alias == NULL && RcptLogFile != NULL && - !bitset(QDONTSEND, a->q_flags)) - { - static int RcptLogFd = -1; - - /* - ** Log the incoming recipient name before aliasing, - ** expanding, forwarding, rewriting, and all that jazz. - ** We'll use this to track down out-of-date aliases, - ** host names, and so forth. - */ - - if (RcptLogFd < 0) - { - /* try to open the log file */ - RcptLogFd = open(RcptLogFile, O_WRONLY|O_APPEND|O_CREAT, 0666); - if (RcptLogFd >= 0) - (void) fcntl(RcptLogFd, F_SETFD, 1); - } - if (RcptLogFd >= 0) - { - int l = strlen(a->q_paddr); - - a->q_paddr[l] = '\n'; - if (write(RcptLogFd, a->q_paddr, l + 1) < 0) - { - (void) close(RcptLogFd); - RcptLogFd = -1; - } - a->q_paddr[l] = '\0'; - } - } - /* ** Alias the name and handle special mailer types. */ -- 2.20.1