diff options
author | Ian Darwin <ian@cvs.openbsd.org> | 2009-08-08 19:16:42 +0000 |
---|---|---|
committer | Ian Darwin <ian@cvs.openbsd.org> | 2009-08-08 19:16:42 +0000 |
commit | d668af588e459c472873610ab99600ae24b4eb00 (patch) | |
tree | 626ae7cee784ebb91f44213bb653e5014f17ef16 | |
parent | f6939b544ffd76a08ffced959c0324e3890518fb (diff) |
mailq is a common sendmail alias for showing the queue; make smtpctl
implement this, ignoring sendmail options for now.
OK gilles@, jackekm@
-rw-r--r-- | usr.sbin/smtpd/smtpctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index e652986bb3a..756236d4e1e 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.32 2009/08/08 00:16:49 gilles Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.33 2009/08/08 19:16:41 ian Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -96,7 +96,12 @@ main(int argc, char *argv[]) /* parse options */ if (strcmp(__progname, "sendmail") == 0 || strcmp(__progname, "send-mail") == 0) sendmail = 1; - else if (strcmp(__progname, "smtpctl") == 0) { + else if (strcmp(__progname, "mailq") == 0) { + if (geteuid()) + errx(1, "need root privileges"); + show_queue(PATH_QUEUE, 0); + return 0; + } else if (strcmp(__progname, "smtpctl") == 0) { /* check for root privileges */ if (geteuid()) errx(1, "need root privileges"); |