<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Filter Email Address Country of Origin Using Lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filter-Email-Address-Country-of-Origin-Using-Lookup/m-p/509090#M142242</link>
    <description>&lt;P&gt;Assume I have a simple search that lists in a table the email addresses of those who recently sent an email:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=email | table sender&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The email index does not have a field that identifies the country the sender address is from; however, it is known that the listed sender addresses are from many different countries. If I have a lookup that contains all the email addresses located in the US using the format:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;email country
address1@mail.com US
address2@mail.com US
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;How can I filter my search results to only contain sender email addresses from those located in the US (based off of the lookup), while also adding a field to the table that shows US?&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jul 2020 15:46:59 GMT</pubDate>
    <dc:creator>griffins</dc:creator>
    <dc:date>2020-07-14T15:46:59Z</dc:date>
    <item>
      <title>Filter Email Address Country of Origin Using Lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-Email-Address-Country-of-Origin-Using-Lookup/m-p/509090#M142242</link>
      <description>&lt;P&gt;Assume I have a simple search that lists in a table the email addresses of those who recently sent an email:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=email | table sender&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The email index does not have a field that identifies the country the sender address is from; however, it is known that the listed sender addresses are from many different countries. If I have a lookup that contains all the email addresses located in the US using the format:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;email country
address1@mail.com US
address2@mail.com US
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;How can I filter my search results to only contain sender email addresses from those located in the US (based off of the lookup), while also adding a field to the table that shows US?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 15:46:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-Email-Address-Country-of-Origin-Using-Lookup/m-p/509090#M142242</guid>
      <dc:creator>griffins</dc:creator>
      <dc:date>2020-07-14T15:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Email Address Country of Origin Using Lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-Email-Address-Country-of-Origin-Using-Lookup/m-p/509093#M142244</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223696"&gt;@griffins&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can use something simple like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=email | table sender | lookup lookup_name email as sender output country | dedup country&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OR you can try with subsearch. Since the query only searches the senders from the lookup you can add country as US&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=email [ | inputlookup lookup_name | rename email as sender | table sender | format] | eval country="US" | table sender country &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 15:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-Email-Address-Country-of-Origin-Using-Lookup/m-p/509093#M142244</guid>
      <dc:creator>anilchaithu</dc:creator>
      <dc:date>2020-07-14T15:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Email Address Country of Origin Using Lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-Email-Address-Country-of-Origin-Using-Lookup/m-p/509094#M142245</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/204579"&gt;@anilchaithu&lt;/a&gt;&amp;nbsp;This works great! Thank you so much.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 16:04:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-Email-Address-Country-of-Origin-Using-Lookup/m-p/509094#M142245</guid>
      <dc:creator>griffins</dc:creator>
      <dc:date>2020-07-14T16:04:57Z</dc:date>
    </item>
  </channel>
</rss>

