summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sendmail/mailstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-12-02 17:30:23 +0000
committerpeter <peter@FreeBSD.org>1995-12-02 17:30:23 +0000
commit88797ecc8d2743a86e4e574fadaac061649931a1 (patch)
treec3349cbdc3f0c451b9b3d949b54a30e08ff75375 /usr.sbin/sendmail/mailstats
parent78d9d5927fb62a9d93abb0c1a0027bdd84b89117 (diff)
downloadFreeBSD-src-88797ecc8d2743a86e4e574fadaac061649931a1.zip
FreeBSD-src-88797ecc8d2743a86e4e574fadaac061649931a1.tar.gz
Import Sendmail-8.7.2 as discussed on -current.
The conflict merge will happen shortly after.
Diffstat (limited to 'usr.sbin/sendmail/mailstats')
-rw-r--r--usr.sbin/sendmail/mailstats/mailstats.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/usr.sbin/sendmail/mailstats/mailstats.c b/usr.sbin/sendmail/mailstats/mailstats.c
index 1e11b01..97ec33b 100644
--- a/usr.sbin/sendmail/mailstats/mailstats.c
+++ b/usr.sbin/sendmail/mailstats/mailstats.c
@@ -40,7 +40,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)mailstats.c 8.3 (Berkeley) 12/27/93";
+static char sccsid[] = "@(#)mailstats.c 8.4 (Berkeley) 8/14/94";
#endif /* not lint */
#include <sendmail.h>
@@ -126,14 +126,32 @@ main(argc, argv)
break;
case 'O': /* option -- see if .st file */
- if (*b++ != 'S')
+ if (strncasecmp(b, " StatusFile", 11) == 0 &&
+ !isalnum(b[11]))
+ {
+ /* new form -- find value */
+ b = strchr(b, '=');
+ if (b == NULL)
+ continue;
+ while (isspace(*++b))
+ continue;
+ }
+ else if (*b++ != 'S')
+ {
+ /* something else boring */
continue;
+ }
- /* yep -- save this */
+ /* this is the S or StatusFile option -- save it */
strcpy(sfilebuf, b);
- b = strchr(sfilebuf, '\n');
- if (b != NULL)
- *b = '\0';
+ b = strchr(sfilebuf, '#');
+ if (b == NULL)
+ b = strchr(sfilebuf, '\n');
+ if (b == NULL)
+ b = &sfilebuf[strlen(sfilebuf)];
+ while (isspace(*--b))
+ continue;
+ *++b = '\0';
if (sfile == NULL)
sfile = sfilebuf;
OpenPOWER on IntegriCloud