Postfix + awstats
Fedora core 4
1.
apt-get install awststs
2.
cd /etc/awstats
cp awststs.model.conf awstats.mail.conf
vi awstats.mail.conf
LogFile="perl /usr/share/awstats/tools/maillogconvert.pl standard < /var/log/maillog |"
#LogFile="gzip -cd /var/log/maillog.0.gz | /usr/share/awstats/tools/maillogconvert.pl standard |"
LogType=M
LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"
LevelForBrowsersDetection=0
LevelForOSDetection=0
LevelForRefererAnalyze=0
LevelForRobotsDetection=0
LevelForWormsDetection=0
LevelForSearchEnginesDetection=0
LevelForFileTypesDetection=0ShowMenu=1
ShowSummary=HB
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=1SiteDomain="mail.ssorc.tw"
3. 執行分析
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=mail -update
4. 瀏覽
http://xxxxx/awstats/awstats.pl?config=mail
5. 排程
10 * * * * root /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=mail -update
附註: cat /etc/httpd/conf.d/awstats.conf
Alias /awstatsclasses "/usr/share/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/share/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/share/awstats/wwwroot/cgi-bin/"#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/share/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Additional Perl modules
<IfModule mod_env.c>
SetEnv PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
</IfModule>
http://awstats.sourceforge.net/docs/awstats_contrib.html#RELATED
http://www.neo.com.tw/archives/000059.html
http://phorum.study-area.org/viewtopic.php?p=124130#124130
留言