Re: Postscreen status script
On 1/30/2013 at 3:55 AM Eliezer Croitoru wrote:
|On 1/29/2013 8:07 PM, Mike. wrote:
|> I implemented the postscreen capability on a small MTA I run for
|> friends and family. Once I got postscreen configuration producing
|> results I wanted, I soon tired of watching the detailed maillog to
|> how postscreen was operating. So I wrote a quick shell script to
|> summarize the log file and give me an overview of how well
|> is working.
|> I offer the script to anyone who would like to use it. One company
|> worked for would not allow open source software into the company
|> there was an explicit license on the software, so I put the BSD
|> on the script.
|> You can download the script from here:
|The concept is really good but I must say it's a script for very small
|logs but in a system that the logs are in sizes of more then 100MB I
|assume your script will be very slow.
|How are you in other scripting languages?
|I have been working with Ruby\Perl\Python\Bash and for me Ruby is the
|most intuitive and seems like capable of doing this task easily.
I've tried it on logs up to 40MB, and it ran to completion in around
five seconds. However, for that test, I copied the log file off the
production mail server and on to a lightly loaded box.
- On 1/30/2013 4:32 PM, Mike. wrote:
> =============It's a pretty decent speed.
> I've tried it on logs up to 40MB, and it ran to completion in around
> five seconds. However, for that test, I copied the log file off the
> production mail server and on to a lightly loaded box.
I have wrote a script to analyze squid\apache logs before and it's more
complicated then just match a line to a string.
grep in general is faster for exact matches in most cases I have seen
yet and it's amazing.
The same lookup on any other scripting lang will take *3-4 or more.