#!/bin/sh
#
while read LINE
        do
        if [ "` echo $LINE | grep \"<\" `" != "" ]; then
                mailfrom=`echo $LINE  | cut -d '<' -f2 `
                from=`echo $mailfrom  | cut -d '>' -f1 `
                echo $from
                fi
        done </var/log/maillog

/Lars
----- Original Message ----- 
From: "Chad Osmond" <[EMAIL PROTECTED]>
To: "Courier-Users" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 3:21 PM
Subject: [courier-users] Extracting info from Logs


Hello,

I need to extrapolate some information from the Courier logs, mainly a
list of message senders and recipients.

In pseudo code:
Cat mail log
Search for "<" 
Record text until ">"
Assign to $From

Repeat for next set of "<" to ">" and assign to $To

What utility is good for doing this? Awk? Sed? Perl?

Thanks,

Chad




-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to