Would it not be quite simple to mysqlimport this into a mysql table?
Just create a table mailstat with the fields in the mailstat.csv and run
mysqlimport.

Jean-Paul

----- Original Message -----
From: "Doug Monroe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 19, 2003 7:51 PM
Subject: Re: [Qmail-scanner-general]qmail-scanner as an auditing tool


> Payal Rathod wrote:
>
> > On Fri, Dec 19, 2003 at 08:40:00AM -0500, Doug Monroe wrote:
> >
> >
> >>that can be done with
> >>  --log-details=yes
> >>which will dump those fields to mailstats.csv, an easily parsable
> >>tab-separated file.
> >
> >
> > Great. mailstats.cvs is great indeed. Anyone knows a good parser for it?
>
> yes...perl ;)
>
> a few starter suggestions
>
> shell:
> cat mailstats.csv|cut -f5,6,7
>
> perl:
> open(CSV,"/var/spool/qmailscan/mailstats.csv");
> while (<CSV>) {
>    @data = split(/\t/);
>    $datetime = $data[0];
>    $from = $data[4];
>    $to = $data[5];
>    #etc...
>    # do something with data
>    # e.g. INSERT into mySQL?
> }
> close(CSV);
>
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Qmail-scanner-general mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general
>
>



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to