Code to Copy an ActivMail 1.3 log file to a database:
<cffile action="READ" file="c:your_log_file.log" variable="File">
<!--- find the first line of the file
skip the comments
--->
<cfset pos1 = Find("""", file)>
<cfset file = Right(file, Len(file)-pos1+1)>
<!--- loop through each line of the file --->
<cfloop list="#file#" delimiters="#Chr(13)#" index="line">
<!--- remove any extra line feeds --->
<cfset line = Replace(line, Chr(10), "", "ALL")>
<!--- replace " with ' --->
<cfset line = Replace(line, """", "'", "ALL")>
<cfset line = Trim(line)>
<!--- add to the db --->
<cfif ListLen(line) IS 11>
<cfquery datasource="your_datasource">
INSERT INTO logfile(DateTime,Mode,Status,MailServer,MessageID,[To],QueueTime,ErrorType,LastCommand,ErrorMsg,QueryRowNumber)
VALUES (#PreserveSingleQuotes(line)#)
</cfquery>
</cfif>
</cfloop>