--- sendmail-8.12.9/sendmail/mailq.1.orig Thu Mar 22 19:21:27 2007 +++ sendmail-8.12.9/sendmail/mailq.1 Sat Jan 11 21:39:47 2014 @@ -13,13 +13,12 @@ .\" .TH MAILQ 1 "$Date: 2007/03/22 18:21:27 $" .SH NAME -mailq -\- print the mail queue +mailq \- print the mail queue .SH SYNOPSIS -.B mailq -.RB [ \-Ac ] -.RB [ \-q... ] -.RB [ \-v ] +.LP +\fBmailq\fR [\fB-Ac\fR] [\fB-qL\fR] [\fB-qQ\fR] [\fB-q\fR [\fB!\fR]{\fBI\fR|\fBQ\fR|\fBR\fR|\fBS\fR}\fIstr\fR] [\fB-v\fR] +.fi + .SH DESCRIPTION .B Mailq prints a summary of the mail messages queued for future delivery. @@ -46,6 +45,7 @@ .PP .B Mailq is identical to ``sendmail -bp''. + .PP The relevant options are as follows: .TP @@ -122,12 +122,56 @@ unless a .B -q option is used to limit the processed jobs. -.PP -The -.B mailq -utility exits 0 on success, and >0 if an error occurs. + +.SH EXIT STATUS +.TP +\fB0\fR +Successful completion. + +.TP +\fB>0\fR +An error occurred. + +.SH FILES +.TP +\fB/etc/security/prof_attr\fR +local source for execution profile attributes + +.TP +\fB/var/spool/mqueue\fR +default server queue + +.TP +\fB/var/spool/clientmqueue\fR +default client queue + .SH SEE ALSO -sendmail(8) +.LP +\fBsendmail\fR(8), \fBpfexec\fR(8), \fBprofiles\fR(1), \fBprof_attr\fR(4), +\fBusermod\fR(8) + +.SH NOTE +.LP +The mailq utilitity bundled with Solaris is actually a privilege aware wrapper +around "sendmail -bp ...", which checks for the authorization attribute +\fBsolaris.mail.mailq\fR. If the check for the invoking user succeeds, +\fBsendmail\fR \fB-bp\fR is executed with the remaining argument vector. +Otherwise, an error message is printed. This authorization attribute is by +default enabled for all users. It can be disabled by modifying the Basic +Solaris User entry in \fBprof_attr\fR(4). +.LP +This version of mailq is like on most OS and the original Berkley sendmail +just a symlink to /usr/lib/sendmail, which implicitly tells \fBsendmail\fR +to operate as if -bp has been specified on the command line. Since sendmail +is not privilege aware this means that per default a user having only the +\fBBasic Solaris User\fR profile assigned, is able to check the sendmail +\fBclient queue\fR using the \fB-Ac\fR option, only. +.LP +To check the \fBserver queue\fR, one explicitly needs the profile +\fBMail Management\fR and run the mailq or sendmail utility using +\fBpfexec\fR(8) explicitly (unless the running shell is already a privilege +aware shell aka pf*sh). + .SH HISTORY The .B mailq