postfix/check_mail_queue
Peter Varkoly fee3f5190a - Missing posttls-finger in postfix though changes mention it
(bsc#1221501)

- Missing posttls-finger in postfix though changes mention it
  (bsc#1221501)

OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=496
2024-09-24 08:48:37 +00:00

25 lines
477 B
Bash

#!/bin/bash
nm()
{
NM=$( /usr/bin/mailq 2> /dev/null | tail -1 | /usr/bin/gawk '{ print $5 }' )
if [ "$NM" ]
then
return 0
else
return 1
fi
}
test -e /var/run/check_mail_queue.pid && exit;
echo $$ > /var/run/check_mail_queue.pid
while( nm )
do
/etc/init.d/postfix status || /etc/init.d/postfix start
sleep 10
/usr/sbin/postfix flush
done
/etc/init.d/postfix status && /etc/init.d/postfix stop
rm /var/run/check_mail_queue.pid