Linux Training

Linux training for private, public & voluntary sector.

0800 024 8425

City LinUX sample scripts - rmq

NAME

rmq - checks the mail queue on a remote server.

SYNOPSIS

rmq [ -c <config> ] [ -d ] [ -v ] [ -V ] < clientid >

AVAILABILITY

rmq is a Bourne shell script which should work equally well on all versions of UNIX, Linux and Mac OS X.

DESCRIPTION

rmq uses ssh and sudo where necessary to return a summary of the current mail queue on a remote server. The configuration file ( /usr/local/etc/rmq.cf by default) is used to determine the mail transfer agent on the remote host and relevant hostname using the " client id " supplied on the command line. If the configuration file does not exist or there is no entry for the client id supplied, rmq will assume that " client id " = " hostname ".

The script assumes that trying to use root to probe remote systems will lead to problems so attempts to run with an id less than 500 cause an error and the script terminates.

OPTIONS

-c    <config_file> Use the named configuration file in preference to the default " /usr/local/etc/rmq.cf ".

-d    Start in debug mode. The script will run in a shell with the -x    option set.

-l    The summary returned is logged using the local syslog facility. This is particularly useful for compiling reports on the number of checks made and facilitates calculation of the average queue length.

-v    Set verbose mode. Ordinarily rmq operates silently unless problems are detected. In verbose mode rmq reports on each significant action and returns a list of items in the queue.

-V    Print version details and exit.

EXAMPLES

rmq -l  billpayers

Using the client id " billpayers " as the look up key, rmq will extract the details of the remote host and mail transport agent being used.

FILES

.IR /usr/local/etc/rmq.cf

BUGS

The script has more error checking than most but is still quite crude having been developed to resolve specific client issues. File permissions are critical and sudo is be used execute commands where root privileges are required.

SEE ALSO

backup, chkftpd, chkfw, chkup, report, rhost.

AUTHOR

Clifford W Fulford, City Linux. Contact fulford@fulford.net or +44 (0)709 229 5385.


The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.