Unfortunately the way the Smartermail logs are output is that there are multiple lines of logs for each email transaction (the biggest problem is that the recipient and sender email address are on two different lines).
This makes it very difficult to automate searching the logs for specific scenarios. For example right now we have a user that somehow their email forwarder setting is blank (no idea how as Smartermail won't let you even create an email forwarder with no forwarding address). This was working fine for a long time but somehow it got wiped out.
The user wants to know who emailed their address during the time this was broken, so we need to search the logs for their email address and then find the corresponding sender email address.
I need to search a lot of email transactions so trying to find a way to automate this.
So there are 2 search operations that have to happen (first finding all lines that contain a particular recipient email address), and then parsing the ID code from each and searching on that to find the sender email address.
At this point I don't care if this is a WIndows application, Perl Script, Bash Script, or Powershell script, or whatever but pretty desperate to find something that can do this. Even if the output isn't pretty and contains more info that I need that is fine.
Something that runs on WIndows would be ideal but if I have to copy the logs to a linux box to get this done that's fine too.
Can anyone recommend a tool or script that can search this way?
Thank you