mailq-summary - Filter producing summary of sendmail's mailq output
mailq -v | mailq-summary [ options ]
mailq-summary --help
mailq-summary --man
This program processes the output of sendmail's mailq tool to produce a summary of the queued emails. The summary has three header lines and then continuous rows of data.
The verbose option to mailq is needed to avoid the truncation of the sender and recipient email addresses.
This option allows you to exclude these emails, possibly giving a more accurate indication of domains that are failing.
This option allows you to access the raw data for additional processing, that is, seconds and bytes.
There is real confusion and the potential for incompatibility in standards and in implemented systems surrounding the use of prefixes. See the following site for more information.
I recommend using the tee(1) utility to allow you to make several invocations of this script with different options, for example,
$ mailq -v | tee mailq-v.txt | mailq-summary
$ mailq-summary --sort=domain < mailq-v.txt
$ mailq-summary --sort=number < mailq-v.txt
This script will exit with zero upon successfull completion, non-zero on any error. All debugging or diagnostic output is written to STDERR. Please do not ignore STDERR.
Mark Suter <mark.suter@miju.com.au>
Copyright (c) 2002,2003,2004 Mark Suter <mark.suter@miju.com.au>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or from the following webpage.
http://www.gnu.org/licenses/gpl.txt