I can't wrap my head around how to accomplish this, but postfix logs two separate events for one email. The first event contains the from address:
The second event contains the to address, status and other goodies:
I want to build a search based on the from address, but do stats on the status (separate counts for deffered, sent, reject etc.). Anyway I could make splunk realize these two events are related?
You could use the transaction command to build a transaction for these events. I don't have a great deal of experience with Postfix, is the DE82B40611 unique to these events?
So something you could do to merge these into one event if that is unique to this email is;
This would produce one event per all events that contain the MaybeUnique field which is the string I mentioned above in extracted form.
The other option is to do something like;
Which should build a transaction based on the contents of the first event matching startswith and the last event in the transaction matching endswith with a max time between events of 5seconds
answered 17 Feb '12, 03:56