Image

Image

Search This Blog

Tuesday, September 16, 2008

process_exchange
Posted in by rain on December 1st, 2007

#! /bin/bash
cd /etc/initsetup/
rm -f exchange_recipients
/etc/initsetup/getexch.pl && cp exchange_recipients /etc/postfix/ && /usr/sbin/postmap /etc/postfix/exchange_recipients &>/dev/null
/usr/sbin/postfix reload &>/dev/null
/bin/cat tmpnusr | {
awk ‘!x[$0]++’
} > tmpnfuser
wc -l tmpnfuser > tmpnr
nr=`cut -dt -f1 tmpnr`
realnr=$(($nr-10))
rm -f tmpn*
echo “$HOSTNAME users: $realnr” > usernr
echo -en “Expire on: ” >> usernr
grep expd /etc/initsetup/setup.log | cut -d= -f2 >> usernr

No comments:

Post a Comment

Blog Archive