0

I am in the process of writing a ssh command to process certain email log entries with awk into a nice readable format. This script is to be run only on entries to /var/log/exim_mainlog that are from the last 24 hours. I am not very familiar with time searching options. Any suggestions on the best way to grep the email logs for only entries that are dated in the last 24 hours? preferably a grep option or something similar. Any help is greatly appreciated

mr.pribesh
  • 187
  • 1
  • 13

2 Answers2

0

Perhaps sawmill does what you want? It parses exim mail logs and allows you to filter by time. Let me know if this is helpful.

hd1
  • 33,938
  • 5
  • 80
  • 91
  • although this would be helpful, I actually have to write the script so using some software is out of the question. Thanks – mr.pribesh Dec 25 '12 at 01:54
0

Have a look at the exiqgrep command which may already be installed on your system.

Brett Freer
  • 266
  • 1
  • 3
  • I do have exigrep installed, but I am not so sure if it can be used to manipulate the exim_mainlog the way I want to. essentially I am looking to grab all logs with "No Such User Here" in them within the last 24 hours, and then format that output using awk – mr.pribesh Dec 25 '12 at 02:12