root / plugins / powermta / powermta_vmta_recpients @ f41b6861
Historique | Voir | Annoter | Télécharger (1,01 ko)
| 1 |
#!/bin/bash |
|---|---|
| 2 |
|
| 3 |
vmta="208-97-205-153" |
| 4 |
# Lets run the command to pull the vmta's in |
| 5 |
queues=(`pmta show queue */$vmta | awk -F" " '{print $1}'`) # Pull in top queues
|
| 6 |
|
| 7 |
# Now we need to do some further cleanup for blank or erroneous array items |
| 8 |
unset queues[0] |
| 9 |
unset queues[${#queues[@]}]
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
case $1 in |
| 14 |
config) |
| 15 |
|
| 16 |
echo "graph_title RGMTA2 PMTA VMTA $vmta Recipents" |
| 17 |
echo "graph_vlabel recipents" |
| 18 |
echo "graph_scale no" |
| 19 |
echo "graph_category mail" |
| 20 |
for i in ${queues[@]};do
|
| 21 |
queue=(`pmta show queue $i`) |
| 22 |
unset queue[0] |
| 23 |
unset queue[${#queue[@]}]
|
| 24 |
|
| 25 |
domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'`
|
| 26 |
domain2=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1`
|
| 27 |
echo $domain'.label '$domain2 |
| 28 |
echo $domain'.draw STACK' |
| 29 |
done |
| 30 |
exit 0;; |
| 31 |
esac |
| 32 |
|
| 33 |
for i in ${queues[@]};do
|
| 34 |
queue=(`pmta show queue $i`) |
| 35 |
unset queue[0] |
| 36 |
unset queue[${#queue[@]}]
|
| 37 |
|
| 38 |
domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'`
|
| 39 |
recpts=${queue[8]}
|
| 40 |
conns=${queue[10]}
|
| 41 |
echo $domain'.value '$recpts |
| 42 |
done |
