[ale] Matching from and to envelope in sendmail log files

Jeff Lightner jlightner at water.com
Mon Sep 17 11:01:38 EDT 2007


Does anyone have a tool that will do something like the following:
<command> -from user at ourdomain -to cellphone at providerdomain

and just get a count of the records that are from the user at ourdomain to
the cellphone at providerdomain?



DETAILS:
There is a request to find all emails from a given user to any cell
phone domain for a given month.

While pattern matching has been worked out to match msgid of the "from="
line to the "to=" this is taking forever (days) as a shell script owing
to the fact that the log file is huge (we're trying to get stats for a
full month).

On doing Google things have been found that purport to do this in perl
that don't seem to work when tested.  Much of what is out there seems to
be more for total stats rather than specifics like the above.  It seems
unlikely we're the first to want to do something like this so hopefully
someone on the list has and can share what they use for it.  

Essentially I want to do something like 

<command> -from user at ourdomain -to cellphone at providerdomain

And just get a count of the records that are from the user at ourdomain to
the cellphone at providerdomain.   

This would be simple if the from and to were on the same line or if the
to line always was the next line after the from but that isn't the case.
Also of course is the fact that I'd like to rule out error lines and
resends to that it is finding unique entries.

Please don't suggest breaking the log file up - I've already got ideas
about manually reducing the files processed - I'm trying to get
something that would eliminate the need for that so this can be
automated for future.
----------------------------------

CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.

----------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list