Changes

From SME Server
Jump to navigationJump to search
486 bytes added ,  07:03, 25 March 2016
Line 363: Line 363:  
#for compatibility with older versions without rpm, testing
 
#for compatibility with older versions without rpm, testing
 
if [  `/sbin/e-smith/db configuration getprop LearnAsSpam dir` ]; then
 
if [  `/sbin/e-smith/db configuration getprop LearnAsSpam dir` ]; then
LearnAsSpam=`/sbin/e-smith/db configuration getprop LearnAsHam dir`;
+
LearnAsSpam=`/sbin/e-smith/db configuration getprop LearnAsSpam dir`;
 
else
 
else
 
LearnAsSpam='LearnAsSpam';
 
LearnAsSpam='LearnAsSpam';
Line 376: Line 376:  
JunkMail='junkmail';
 
JunkMail='junkmail';
   −
echo
   
echo
 
echo
 
date
 
date
Line 400: Line 399:  
   tnseen=$tnseen+$nseen
 
   tnseen=$tnseen+$nseen
 
done
 
done
 +
popd >>/dev/nul
 +
  spam=`ls -1 /home/e-smith/Maildir/.$LearnAsSpam/cur |wc -l`
 +
  ham=`ls -1 /home/e-smith/Maildir/.$LearnAsHam/cur |wc -l`
 +
  left=`ls -1 /home/e-smith/Maildir/.$JunkMail/cur |wc -l`
 +
  nseen=`ls -1 /home/e-smith/Maildir/.$JunkMail/new |wc -l`
 +
  if  [[ $spam > 0 ]] || [[ $ham > 0 ]] || [[ $left > 0 ]] || [[ $nseen > 0 ]];  then
 +
    printf "%25s %10d %10d %10d %10d \n" "admin" $spam $ham $left $nseen
 +
  fi
 +
  tspam=$tspam+$spam
 +
  tham=$tham+$ham
 +
  tleft=$tleft+$left
 +
  tnseen=$tnseen+$nseen
 
echo "----------------------------------------------------------------------"
 
echo "----------------------------------------------------------------------"
 
printf "%25s %10d %10d %10d %10d \n" "Total:" $tspam $tham $tleft $tnseen
 
printf "%25s %10d %10d %10d %10d \n" "Total:" $tspam $tham $tleft $tnseen
popd >>/dev/nul
   
echo
 
echo
   
</pre>
 
</pre>
  
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,250

edits

Navigation menu