I use Trend Micro Emanager to fight SPAM messages. I am trying to import its logs into a MySQL database to report on the logs. The output log is a mess, and cannot be exported easily into comma or tab format. Im trying to use the LOAD DATA INTO command, however, because the log spans multiple lines, Im having trouble.. Can anyone look at this log snippet to see if you can import the data.
05/14/2004 00:43:52 CONTENT_MANAGEMENT[2700]: Content filter has blocked a sensitive email.
EMAIL\05/14/2004 00:43:52\New car\Erica Holm\Inbound\Delete(nj45.com)\BlackList
The MySQL code Im using is as follows:
LOAD DATA INFILE '/usr/local/mysql/bin/iscan.txt' INTO TABLE iscan
FIELDS TERMINATED BY "\" LINES TERMINATED BY "\r\n";
The database has the following fields
blah TEXT - 05/14/2004 00:43:52 CONTENT_MANAGEMENT[2700]: Content filter has blocked a sensitive email.
junk VARCHAR(6) - EMAIL
date DATE - 05/14/2004 00:43:52
subject VARCHAR(50) - New car
recipient VARCHAR(50) - Erica Holm
direction VARCHAR(10) - Inbound
action VARCHAR(10) - Delete
address VARCHAR(50) - (nj45.com)
policy VARCHAR(30) - BlackList