11 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Logfile analyzer
FromSent OnAttachments
Martin HorakDec 4, 2003 10:58 am 
Evelyn PichlerDec 4, 2003 11:06 pm 
Joe EmenakerDec 4, 2003 11:19 pm 
Martin HorakDec 5, 2003 12:58 am 
Evelyn PichlerDec 5, 2003 8:01 am.courierlog
Bowie BaileyDec 5, 2003 9:32 am 
Ricardo KleemannDec 18, 2003 3:49 pm 
Sam VarshavchikDec 18, 2003 4:24 pm 
Ricardo KleemannDec 18, 2003 6:47 pm 
Sam VarshavchikDec 18, 2003 7:17 pm 
Thomas von HasselDec 20, 2003 7:05 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Logfile analyzerActions...
From:Evelyn Pichler (ev@evelyn.org)
Date:Dec 5, 2003 8:01:44 am
List:net.sourceforge.lists.courier-users
Attachments:
mk.courierlog - 0.4k

Here is the script

I call it from crontab and pipe the output to a file right before logrotate.

ev At 08:19 05.12.2003, Joe Emenaker wrote:

Evelyn Pichler wrote:

I have a script that finds all successful deliveries and lists size, from and to.

If that is enough for you I can mail it to you.

I'm very interested in that, too. Perhaps you should post it to the list.

If I have time, I'd be interested in hacking it up so that it could store the entries in a mysql db to allow for more intricate queries.

*2*

#!/bin/sh # ex: ts=3 syntax=off

# Apr 7 06:34:13 host courieresmtp:
id=000000C2.3E90FFB2.0000554B,from=<x.@dom.com>,addr=<x@yy.com>,size=3024000,status:
success

egrep 'courieresmtp:.*status: success' /var/log/maillog \ | sed 's/^\(.*addr=<[^<>]*\),\([^<>]*>.*\)$/\1.\2/g' \ | awk '{printf ("%s;%s;%s;\n", substr($4,6), substr($2,7,length($2)-7),
substr($3,7,length($3)-7));}' 'FS=,'