{
############################
# Config file for Qmail
############################
use warnings;
use esmith::ConfigDB;
my $configDB = esmith::ConfigDB->open or die("can't open Config DB");
my $domain = $configDB->get( 'DomainName' )->value;
my $DNREG = ($domain =~ s|\.|\\.|r);

$OUT =<<HERE
#LogFile="/home/e-smith/awstats/qmail-preprocessor.sh|"
LogFile="/etc/e-smith/web/panels/manager/cgi-bin/.awstats/qmail-preprocessor.sh|"
LogType=M
LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"
LogSeparator=" "
SiteDomain="mail.$domain"
HostAliases="localhost 127.0.0.1 REGEX[${DNREG}\$]"
DNSLookup=2
#DirData="/home/e-smith/awstats"
DirData="/home/e-smith/files/users/admin/home/awstats"
DirCgi="/cgi-bin"
DirIcons="../../awstats"
UseFramesWhenCGI=0
AllowToUpdateStatsFromBrowser=0
AllowFullYearView=3
EnableLockForUpdate=0
DNSStaticCacheFile="dnscache.txt"
DNSLastUpdateCacheFile="dnscachelastupdate.txt"
SkipDNSLookupFor=""
AllowAccessFromWebToAuthenticatedUsersOnly=0
AllowAccessFromWebToFollowingAuthenticatedUsers=""
AllowAccessFromWebToFollowingIPAddresses=""
CreateDirDataIfNotExists=0
BuildHistoryFormat=text
BuildReportFormat=html
SaveDatabaseFilesWithPermissionsForEveryone=0
PurgeLogFile=0
ArchiveLogRecords=0
KeepBackupOfHistoricFiles=0
DefaultFile="index.html"
SkipHosts=""
SkipUserAgents=""
SkipFiles=""
SkipReferrersBlackList=""
OnlyHosts=""
OnlyUserAgents=""
OnlyFiles=""
NotPageList="css js class gif jpg jpeg png bmp ico swf"
ValidHTTPCodes="200 304"
ValidSMTPCodes="1 250"
AuthenticatedUsersNotCaseSensitive=0
URLNotCaseSensitive=0
URLWithAnchor=0
URLQuerySeparators="?;"
URLWithQuery=0
URLWithQueryWithOnlyFollowingParameters=""
URLWithQueryWithoutFollowingParameters=""
URLReferrerWithQuery=0
WarningMessages=1
ErrorMessages=""
DebugMessages=0
NbOfLinesForCorruptedLog=50
WrapperScript=""
DecodeUA=0
MiscTrackerUrl="/js/awstats_misc_tracker.js"
LevelForBrowsersDetection=2         
LevelForOSDetection=2               
LevelForRefererAnalyze=2            
LevelForRobotsDetection=2           
LevelForSearchEnginesDetection=2    
LevelForKeywordsDetection=2         
LevelForFileTypesDetection=2        
LevelForWormsDetection=0            
DetailedReportsOnNewWindows=1
Expires=0
MaxRowsInHTMLOutput=1000
Lang="auto"
DirLang="./lang"
ShowMenu=1					
ShowSummary=HBM
ShowMonthStats=HBM
ShowDaysOfMonthStats=HBM
ShowDaysOfWeekStats=HBM
ShowHoursStats=HBM
ShowDomainsStats=0
ShowHostsStats=HBL
ShowAuthenticatedUsers=0
ShowRobotsStats=0
ShowWormsStats=0
ShowEMailSenders=HBML
ShowEMailReceivers=HBML
ShowSessionsStats=0
ShowPagesStats=0
ShowFileTypesStats=0
ShowFileSizesStats=0		
ShowOSStats=0
ShowBrowsersStats=0
ShowScreenSizeStats=0
ShowOriginStats=0
ShowKeyphrasesStats=0
ShowKeywordsStats=0
ShowMiscStats=0
ShowHTTPErrorsStats=0
ShowSMTPErrorsStats=1
ShowClusterStats=0
AddDataArrayMonthStats=1
AddDataArrayShowDaysOfMonthStats=1
AddDataArrayShowDaysOfWeekStats=1
AddDataArrayShowHoursStats=1
IncludeInternalLinksInOriginSection=0
MaxNbOfDomain = 10
MinHitDomain  = 1
MaxNbOfHostsShown = 10
MinHitHost    = 1
MaxNbOfLoginShown = 10
MinHitLogin   = 1
MaxNbOfRobotShown = 10
MinHitRobot   = 1
MaxNbOfPageShown = 10
MinHitFile    = 1
MaxNbOfOsShown = 10
MinHitOs      = 1
MaxNbOfBrowsersShown = 10
MinHitBrowser = 1
MaxNbOfScreenSizesShown = 5
MinHitScreenSize = 1
MaxNbOfWindowSizesShown = 5
MinHitWindowSize = 1
MaxNbOfRefererShown = 10
MinHitRefer   = 1
MaxNbOfKeyphrasesShown = 10
MinHitKeyphrase = 1
MaxNbOfKeywordsShown = 10
MinHitKeyword = 1
MaxNbOfEMailsShown = 20
MinHitEMail   = 1
FirstDayOfWeek=1
ShowFlagLinks=""
ShowLinksOnUrl=1
UseHTTPSLinkForUrl=""
MaxLengthOfShownURL=64
HTMLHeadSection=""
HTMLEndSection=""
Logo="awstats_logo6.png"
LogoLink="awstats.pl?config=mail"
BarWidth   = 260
BarHeight  = 90
StyleSheet=""
color_Background="FFFFFF"		
color_TableBGTitle="CCCCDD"		
color_TableTitle="000000"		
color_TableBG="CCCCDD"			
color_TableRowTitle="FFFFFF"	
color_TableBGRowTitle="ECECEC"	
color_TableBorder="ECECEC"		
color_text="000000"				
color_textpercent="606060"		
color_titletext="000000"		
color_weekend="EAEAEA"			
color_link="0011BB"				
color_hover="605040"			
color_u="FFAA66"				
color_v="F4F090"				
color_p="4477DD"				
color_h="66DDEE"				
color_k="2EA495"				
color_s="8888DD"				
color_e="CEC2E8"				
color_x="C1B2E2"				
ExtraTrackedRowsLimit=500

HERE
}