Finding mail per hour

Hi,

i have a logfile of a mail server it looks like this:
d k 1004210238.380677500 1004210238.454490500 1004210238.679567500 3621 <VOLENDAM@Malawi.com> local.EDAM@Frankrijk.com 6053 81

I have got the following script to set the time in normal gmt time
and to filter de failed messages, but i want that the script asks me what date and what time i want to filter at the beginning of the script.

BEGIN{{print "list of failed mails:"}

{print "---------------------------------------------"}}
{if ($1 ~ /d/ && $2 ~ /z/) {nr =nr+1 ; printf $7" ""%s\n%s\n",(""), strftime("%c", $3) }}
END {{print "---------------------------------------------"}
{print "there are:",nr " failed mails"}}

Can anybody help me ?

Greetz Joost

okay i have the input part its like :

BEGIN {
                printf "Date ?? (YYYY MM DD HH MM SS) "
                getline date < "-"
                start = mktime(date)
                print "list of failed emails", date
                print "-----------------------------------------------"
}
$1 == "d" && $2 == "d" && $3 >= start {
        nr++
        printf $7 "%s\n%s\n",(""), strftime("%c", $3)
}
END {
                print "-----------------------------------------------"
                print "there are:", nr, "failed emails"
}

But if i type my date at the beginning i have to put all info in there, YYYY,MM,DD,HH,MM,SS

I want that i only have to say the year, month,day

Can some body help me ?

Hi,

Could you tell us pls which mail server you are using?

Regards,
Bash