Alerting

Search filter csv emails based off of another csv?

sulaimancds
Engager
index=mail
| lookup email_domain_whitelist domain AS RecipientDomain output domain as domain_match
| where isnull(domain_match)
| table subject sender values(recipient) values(RecipientDomain) Count values(size)```
| stats values(recipient) values(subject) count by RecipientDomain sender
| sort -count



 

i have this search running daily. based on the results from the search,  i want to compare the sender field result with another csv file call 123.csv in lookup , there is a field call Email Address in this csv, give me the results if there is a match.

 

Please help.

Thank you.

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Am I missing something or isn't the answer in the question?

| lookup 123.csv "Email Address" as sender

sulaimancds
Engager

hi where do i add this line , because it is showing me all the results , not those which match the 123.csv?

0 Karma

Tom_Lundie
Contributor

Add this to the bottom of your search:

| lookup 123.csv "Email Address" as sender
| where isnotnull('Email Address')

 To filter the results for only the Email Addresses in 123.csv

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...