RE: Обработчик лог-файлов.

От: Герасимов Александр Викторович <CGatePro_at_mx_ru>
Дата: Tue 15 May 2007 - 15:28:10 MSD


Регистрация работает, иначе бы другие пользователи не смогли зарегистрироваться. Возможно вы что-то не так делаете.
Очень интересно на каком этапе регистрации вам сообщает что такого пользователя не существует ?

-----Original Message-----
From: CommuniGate Pro Russian Discussions [mailto:CGatePro@mx.ru] Sent: Tuesday, May 15, 2007 9:35 AM
To: CommuniGate Pro Russian Discussions
Subject: Re: [CGP] Обработчик лог-файлов.

> Прикрепленные файлы доступны только для зарегистрированных пользователей.
> Зарегистрируйтесь и тогда увидите прикрепленный файл.

Я пытался зарегистрироваться 2 раза, но получил одинаковые ошибки: *"Такого пользователя не существует."

Не могли бы Вы положить скрипт куда-нибудь в более доступное место?

##################################################################



Сам скрипт, собсно вот:

#!/bin/sh
# CGP_today.pl script pokazyvaet statistiku po reject soedineniejam (soobschenijam)
# za osnovy vjat script ot Dale LaFountain (dalel at darkhorse dot com)
#
# prosto dobav'te v cron
# 59      23      *       *       *       root    /var/CommuniGate/CGP_today.pl | mail -s "CGPro Daily Report"  root 2>&1
#

LOGDIR=/var/CommuniGate/SystemLogs
TODAY=`date +%Y-%m-%d`

cd $LOGDIR

grep " rejected: sender domain does not match SPF records" $TODAY*.log > /tmp/cgpspf$TODAY.log
grep " rejected: address rejected with reverse-check" $TODAY*.log > /tmp/cgprev$TODAY.log
grep " rejected: unknown user account" $TODAY*.log | grep "SMTP" > /tmp/cgpunk$TODAY.log
#grep " Too many protocol errors" $TODAY*.log > /tmp/cgperr$TODAY.log
grep " rejected: your host" $TODAY*.log > /tmp/cgprbl$TODAY.log
grep " rejected: no relay available" $TODAY*.log > /tmp/cgprel$TODAY.log
grep " rejected: host name is unknown" $TODAY*.log > /tmp/cgphos$TODAY.log
grep " rejected: DNS server failure" $TODAY*.log > /tmp/cgpdns$TODAY.log
#grep " "354 Enter mail $TODAY*.log > /tmp/cgpok$TODAY.log
NUMSPF=`cat /tmp/cgpspf$TODAY.log | wc -l`
NUMREV=`cat /tmp/cgprev$TODAY.log | wc -l`
NUMUNK=`cat /tmp/cgpunk$TODAY.log | wc -l`
#NUMERR=`cat /tmp/cgperr$TODAY.log | wc -l` NUMRBL=`cat /tmp/cgprbl$TODAY.log | wc -l` NUMMC=`grep "message content" $TODAY*.log | wc -l`
NUMREL=`cat /tmp/cgprel$TODAY.log | wc -l`
NUMHOS=`cat /tmp/cgphos$TODAY.log | wc -l`
NUMDNS=`cat /tmp/cgpdns$TODAY.log | wc -l`

#NUMOK=`cat /tmp/cgpok$TODAY.log | wc -l`

RBL0=`grep "blacklisted\\." /tmp/cgprbl$TODAY.log | wc -l`
RBL1=`grep "blacklisted by bl.spamcop.net" /tmp/cgprbl$TODAY.log | wc -l`
RBL2=`grep "blacklisted by list.dsbl.org" /tmp/cgprbl$TODAY.log | wc -l`
RBL3=`grep "blacklisted by relays.ordb.org" /tmp/cgprbl$TODAY.log | wc -l`
RBL4=`grep "blacklisted by dnsbl.njabl.org" /tmp/cgprbl$TODAY.log | wc -l`


ATTACHBLOCKED=`find /var/CommuniGate/filter/viruses_or_spam -mtime 1 | grep .msg | wc -l` echo Report for $TODAY
echo
#echo " Total accessepted mails: $NUMOK" #echo

echo "               Rejected with:"               
echo "                   SPF check: $NUMSPF"
echo "               reverse-check: $NUMREV"
echo "        unknown user account: $NUMUNK"
echo "          no relay available: $NUMREL"
echo "        host name is unknown: $NUMHOS"
echo "          DNS server failure: $NUMDNS"
echo "            by contentfilter: $ATTACHBLOCKED"
echo "            by RFC822 blocks: $NUMMC"


echo
#echo " Too many protocol errors: $NUMERR" #echo

echo "            Total RBL blocks: $NUMRBL"
echo "          local blacklisting: $RBL0"
echo "           by bl.spamcop.net: $RBL1"
echo "            by list.dsbl.org: $RBL2"
echo "          by relays.ordb.org: $RBL3"
echo "          by dnsbl.njabl.org: $RBL4"
echo
if [ -s /tmp/cgpspf$TODAY.log ] ; then
 echo Top 10 address rejected with SPF check:  echo Cnt Host
 cat /tmp/cgpspf$TODAY.log | awk -F"\\(" '{print $2}' | awk -F"\\)" '{print $1}' | sort -n | uniq -c | sort -brn | head -n 10  echo
fi
if [ -s /tmp/cgprev$TODAY.log ] ; then
 echo Top 10 address rejected with reverse-check:  echo Cnt Host
 cat /tmp/cgprev$TODAY.log | awk -F"\\(" '{print $2}' | awk -F"\\)" '{print $1}' | sort -n | uniq -c | sort -brn | head -n 10  echo
fi
if [ -s /tmp/cgpunk$TODAY.log ] ; then
 echo Top 10 unknown user delivery attempts came from:  echo Cnt Host
 cat /tmp/cgpunk$TODAY.log | awk -F"\\(" '{print $2}' | awk -F"\\)" '{print $1}' | sort -n | uniq -c | sort -brn | head -n 10  echo
fi
#if [ -s /tmp/cgperr$TODAY.log ] ; then
# echo Top 10 Too many protocol errors, are:
# echo Cnt Host
# cat /tmp/cgperr$TODAY.log | awk -F"\\(" '{print $2}' | awk -F"\\)" '{print $1}' | sort -n | uniq -c | sort -brn | head  -n 10
# echo
#fi

if [ -s /tmp/cgprbl$TODAY.log ] ; then
 echo Top 10 RBL offenders are:
 echo Cnt Host
 cat /tmp/cgprbl$TODAY.log | awk -F"\\(" '{print $2}' | awk -F"\\)" '{print $1}' | sort -n | uniq -c | sort -brn | head -n 10  echo
fi

echo
rm /tmp/cgp* Получено Tue May 15 11:25:08 2007

Этот архив был сгенерирован hypermail 2.1.8 : Fri 24 Apr 2015 - 16:15:37 MSK