Getting Data In

Getting full mail transaction with Exim

leonrtx
Explorer

I want to display all mail to and from a client, with the subject, relayed host and status in one dashboard. The dashboard has a form search where you enter a mail address. Using the transaction command works, but it takes to long to be usable. Here's my transaction search:

sourcetype="exim-mainlog" | transaction host,Exim_Message_ID | table exim_message_id,from_address,to_address,T,H

I tried using subsearches, but it doesn't work. Looks like subsearches might be broken in Splunk 5

sourcetype="exim-mainlog" [sourcetype="exim-mainlog" from_address="address" OR to_address="address" | table Exim_Message_ID]

Any other ideas on how I can do this?

Tags (1)
0 Karma

lostpassword
Explorer

To add Exim messsage ID field, try to add attribute by Regular expression.
In my case, message ID can be extracted by this expression:
"(?\w\w\w\w\w\w-\w\w\w\w\w\w-\w\w)"

0 Karma

lostpassword
Explorer

I'm writing all this by memory, so some parts may be incorrect. By the way, I haven't yet found a way to make Splunk understand Exim logs. I'm quite interested whether it is possible. If you will be able to achieve some progress, please spend a minute and share it here - or mail me at igonin.a.arsreu.ru.

0 Karma

lostpassword
Explorer

Well, I'm new too.)
I don't know whether it is right approach... But you can try this: "Data models" ->

0 Karma

ipchristian
New Member

I'm new to splunk - is there a link to explain how to add the regular expression into splunk, so it can show the message ID?

0 Karma

jgreenhalgh
New Member

Hi, where is Exim_Message_ID coming from? I've just started pointing Splunk at some exim logs and it's not one of the fields I'm seeing.

0 Karma

leonrtx
Explorer

OK, so sub searches has been fixed in version 5.0.3. SPL-62457 and is working now.

0 Karma

leonrtx
Explorer

ah, wrong in the post, but was correct in Splunk. sourcetype="exim-mainlog" [search sourcetype="exim-mainlog" from_address="address" OR to_address="address" | table Exim_Message_ID]

When I run the subsearch I get no results but when I inspect the search, it's build the search correctly. So when I inspect it build the search:
sourcetype="exim-mainlog ((Exim_Message_ID=####) OR (Exim_Message_ID =####))
If I copy and paste the search from the inspect page into the search box it return the correct results. So why doesn't I see any results in the sub search?

0 Karma

Ayn
Legend

Subsearches broken? That's kind of a bold statement 🙂 Subsearches are used extensively not just by the users but also in the core product - if it was broken, trust me, you would have found out long ago. Your syntax in your example is off though. You need to explicitly specify "search" at the beginning of the subsearch.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...