星期三, 12月 13, 2006

awstats config - mail

vi /etc/awstats/awstats.mail.conf
------------------------------------------
LogFile="perl /usr/local/awstats/tools/maillogconvert.pl standard < /var/log/maillog |"
LogType=M
LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"
LevelForBrowsersDetection=
LevelForOSDetection=0
LevelForRefererAnalyze=0
LevelForRobotsDetection=0
LevelForWormsDetection=0
LevelForSearchEnginesDetection=
LevelForFileTypesDetection=
AllowToUpdateStatsFromBrowser=0
SiteDomain="mail.stl-tech.com"
HostAliases="192.168.0.3 localhost 127.0.0.1"
DirData="/var/lib/awstats"
DirIcons="/awstatsicons"
ShowMenu=1
ShowMonthStats=HB
ShowDaysOfMonthStats=HB
ShowDaysOfWeekStats=HB
ShowHoursStats=HB
ShowDomainsStats=0
ShowHostsStats=HBL
ShowAuthenticatedUsers=0
ShowRobotsStats=0
ShowEMailSenders=HBML
ShowEMailReceivers=HBML
ShowSessionsStats=0
ShowPagesStats=0
ShowFileTypesStats=0
ShowFileSizesStats=0
ShowBrowsersStats=0
ShowOSStats=0
ShowOriginStats=0
ShowKeyphrasesStats=0
ShowKeywordsStats=0
ShowMiscStats=0
ShowHTTPErrorsStats=0
ShowSMTPErrorsStats=1
------------------------------------------
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mail -update

測試:http://IP/awstats/awstats.pl?config=mail
------------------------------------------
#定時更新
vi /etc/crontab
50 4 * * * root /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mail -update >/dev/null 2>&1

2.若有多個設定檔要執行的話可以執行
/usr/local/awstats/tools/awstats_updateall.pl now
vi /etc/crontab
0 23 * * * root /usr/local/awstats/tools/awstats_updateall.pl now >/dev/null 2>&1

沒有留言: