<?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 Re: In a Splunk search, how do you match &amp;quot;from address&amp;quot; and &amp;quot;to address&amp;quot; event IDS to obtain table of emails? in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398838#M6730</link>
    <description>&lt;P&gt;@renjith.nair, thank you for putting the time into creating dummy data generation to help me find a solution. Your example you provided with the results it yielded is exactly what I am looking for.&lt;/P&gt;

&lt;P&gt;I have further fixed more of the issue by extracting a new field, called "To_or_From_MSD_Number" which uses specific regex to capture the MSD number ONLY if it is a To or From email event. This has given me near exactly the results I needed when using your new search query. &lt;/P&gt;

&lt;P&gt;However, what I have found is that this email application will re-use the MSD number further in the same day, making results have multiple values in the From and To columns. Due to this unfortunate detail, I wonder if this is beyond the scope of Splunk's ability. The search query would have to somehow get the msd matched To and From events that are within the same hour. Or maybe I could throw the source ip that is in the To event into the query somewhere to isolate the results.&lt;/P&gt;

&lt;P&gt;Here is an example, where I specified 1 MSD number because it has been used twice already today:&lt;BR /&gt;
search query:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;host = hostIp To_or_From_MSD_Number="10092" | stats values(Email_From_Address) as From,values(Email_To_Address) as To, count by To_or_From_MSD_Number|where count&amp;gt;1| fields - count&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Results:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;To_or_From_MSD_Number:          From:                           To:&lt;BR /&gt;
10092                                                &lt;A href="mailto:from@first.com" target="_blank"&gt;from@first.com&lt;/A&gt;          &lt;A href="mailto:to@first.com" target="_blank"&gt;to@first.com&lt;/A&gt;&lt;BR /&gt;
                                                           &lt;A href="mailto:from@second.com" target="_blank"&gt;from@second.com&lt;/A&gt;    &lt;A href="mailto:to@second.com" target="_blank"&gt;to@second.com&lt;/A&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;And here would be the actual To and From events from the results:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Oct 8 06:27:19 mail msd[10092] MAIL command received, args: FROM: &lt;A href="mailto:from@first.com" target="_blank"&gt;from@first.com&lt;/A&gt;&lt;BR /&gt;
Oct 8 06:27:19 mail msd[10092] RCPT command received (1.1.1.1), args: TO: &lt;A href="mailto:to@first.com" target="_blank"&gt;to@first.com&lt;/A&gt;&lt;BR /&gt;
Oct 8 08:20:10 mail msd[10092] MAIL command received, args: FROM: &lt;A href="mailto:from@second.com" target="_blank"&gt;from@second.com&lt;/A&gt;&lt;BR /&gt;
Oct 8 08:20:11 mail msd[10092] RCPT command received (2.2.2.2), args: TO: &lt;A href="mailto:to@second.com" target="_blank"&gt;to@second.com&lt;/A&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;After looking at the events here I noticed that the source ip in the To events differs, is it possible to separate the joined results from our search query by using that source ip? (meaning the 1.1.1.1 and the 2.2.2.2 ips in the To events)&lt;/P&gt;

&lt;P&gt;The results I would hope could be achievable would look something like this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Source IP:          MSD Number:          From:                              To:&lt;BR /&gt;
1.1.1.1                10092                        &lt;A href="mailto:from@first.com" target="_blank"&gt;from@first.com&lt;/A&gt;             &lt;A href="mailto:to@first.com" target="_blank"&gt;to@first.com&lt;/A&gt;&lt;BR /&gt;
2.2.2.2                10092                        &lt;A href="mailto:from@second.com" target="_blank"&gt;from@second.com&lt;/A&gt;       &lt;A href="mailto:to@second.com" target="_blank"&gt;to@second.com&lt;/A&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I apologize for this difficult request. I will accept that what I ask for is over-complicated and not achievable if necessary.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:31:42 GMT</pubDate>
    <dc:creator>silverlink34</dc:creator>
    <dc:date>2020-09-29T21:31:42Z</dc:date>
    <item>
      <title>In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398827#M6719</link>
      <description>&lt;P&gt;I have a qmail type email server sending in SMTP logs. The log entries have separate events for the "from email address" and the "to email address" for an email transaction, but they share the same MSD number (message id). I've located these specific events and extracted the following fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Email_From_Address
Email_To_Address
Email_From_MSD_Number
Email_To_MSD_Number
Email_To_Domain
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, I extracted a generic field "msd_number", which will match to both Email_From_MSD_Number and Email_To_MSD_Number&lt;/P&gt;

&lt;P&gt;I was hoping that with these fields I could get the following data: (using different searches of course.)&lt;/P&gt;

&lt;P&gt;-table with the top 10 senders with count of total emails sent (this one I can manage, simply count the Email_From_Address by Email_From Address)&lt;/P&gt;

&lt;P&gt;-specified Email_From_Address or Email_To_Address and find all corresponding emails from or to based on which one is searched (for example if searching the Email From Address show all Email To Addresses that was sent from the specified Email From Address, or vice versa if Email To Address is specified)&lt;/P&gt;

&lt;P&gt;-table with top 10 Email_From_Address count to Email_To_Domain (example: From column: [&lt;A href="mailto:email@domain.com" target="_blank"&gt;email@domain.com&lt;/A&gt;]  To column: [gmail.com] # emails sent column: [25])&lt;/P&gt;

&lt;P&gt;-setup an interactive search dashboard where you can specify the Email From, Email To, or MSD Number and get a list of events with the corresponding data, such as a search for the Email From will return the Emails To and MSD numbers.&lt;/P&gt;

&lt;P&gt;The problem is that I don't know how to match up the corresponding To or From address fields by using the matching MSD number field. I started trying by using the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host = hostIp | stats list(Email_From_Address) list(Email_to_email_address) by msd_number 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search DOES contain rows with a matching email from and email to by the MSD number, however it also has rows that don't have matching msd_numbers. I don't want those rows.&lt;/P&gt;

&lt;P&gt;I appreciate any time and efforts you may put into helping me understand and find the solution. Thank you kindly.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398827#M6719</guid>
      <dc:creator>silverlink34</dc:creator>
      <dc:date>2020-09-29T21:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398828#M6720</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/141086"&gt;@silverlink34&lt;/a&gt;,&lt;BR /&gt;
I'm assuming that msd_number is unique per email.&lt;BR /&gt;
&lt;CODE&gt;...&amp;lt;index-search-here&amp;gt; | stats list(Email_To_Address) as To, list(Email_From_Address) as From by msd_number&lt;/CODE&gt;&lt;BR /&gt;
Hope this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:25:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398828#M6720</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2020-09-29T21:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398829#M6721</link>
      <description>&lt;P&gt;@silverlink34,&lt;BR /&gt;
Are these fields in the same event or different events? If they are in the same event, can you try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     host = hostIp |where  Email_From_MSD_Number== Email_To_MSD_Number| stats list(Email_From_Address) list(Email_to_email_address) by msd_number 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And if they are in different events, you could add another field &lt;CODE&gt;count&lt;/CODE&gt; to stats and then check if count&amp;gt;1 which will list only those events which has two msd numbers in the events which are same&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 18:10:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398829#M6721</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-03T18:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398830#M6722</link>
      <description>&lt;P&gt;Thank you for your suggestion, I do appreciate your input. However, this gives the same result as my query does. Each event that contains the Email_From_Address or Email_To_Address already contains the msd_number in it, so the results in the stats list does not change. The results from my query returns every msd_number found, but these results have several rows that are missing the Email_From_Address and/or the Email_To_Address. I am unsure of how to only show results that have the same msd_number that is in the Email_From_Address and the Email_To_Address. I will try @renjith.nair's approach and see what that does.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:29:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398830#M6722</guid>
      <dc:creator>silverlink34</dc:creator>
      <dc:date>2020-09-29T21:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398831#M6723</link>
      <description>&lt;P&gt;The events are separate. I am trying to put together the search string with the count&amp;gt;1 suggestion you have proposed. Thank you for helping! I'll let you know where it gets me.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 20:48:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398831#M6723</guid>
      <dc:creator>silverlink34</dc:creator>
      <dc:date>2018-10-03T20:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398832#M6724</link>
      <description>&lt;P&gt;Hi @silverlink34, Can you please share some of the sample of your events and what do you want exactly as result?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 05:55:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398832#M6724</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-10-04T05:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398833#M6725</link>
      <description>&lt;P&gt;Yes sir! Here are the two events I am pulling information from, and the fields pulled from them:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;"&amp;lt;22&amp;gt;Oct  3 15:00:17 mail msd[24056]: MAIL command received, args: FROM:"&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;UL&gt;
&lt;LI&gt;Email_From_MSD_Number = 24056&lt;/LI&gt;
&lt;LI&gt;Email_From_Address = &lt;A href="mailto:silverlink34@domain.com" target="_blank"&gt;silverlink34@domain.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;msd_number = 24056&lt;/LI&gt;
&lt;/UL&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;"&amp;lt;22&amp;gt;Oct  3 15:00:17 mail msd[24056]: RCPT command received (0.0.0.0), args: TO:"&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;OL&gt;
&lt;LI&gt;Email_To_MSD_Number = 24056&lt;/LI&gt;
&lt;LI&gt;Email_To_Address = &lt;A href="mailto:splunkhelp@domain.com" target="_blank"&gt;splunkhelp@domain.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;msd_number = 24056&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;And the results I am trying to get are:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Column1:From                     Column2:To                           Column3:MSD Number&lt;BR /&gt;
&lt;A href="mailto:silverlink34@domain.com" target="_blank"&gt;silverlink34@domain.com&lt;/A&gt;  &lt;A href="mailto:splunkhelp@domain.com" target="_blank"&gt;splunkhelp@domain.com&lt;/A&gt;   24056&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;... and the rest of the rows from the list of results, I want ALL of the Froms, Tos, and MSD numbers.&lt;BR /&gt;
I ONLY want rows that have all three columns, do not want rows that have only From/To/ or MSD Number.&lt;BR /&gt;
And of course once I can figure this out I can span off into my other desired results. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:29:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398833#M6725</guid>
      <dc:creator>silverlink34</dc:creator>
      <dc:date>2020-09-29T21:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398834#M6726</link>
      <description>&lt;P&gt;I've edited query in my answer, try that query. Hope that helps.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 04:31:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398834#M6726</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-10-05T04:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398835#M6727</link>
      <description>&lt;P&gt;@silverlink34,&lt;BR /&gt;
As mentioned in the comment, since you have the address in separate events use the &lt;CODE&gt;count&lt;/CODE&gt; method,&lt;/P&gt;

&lt;P&gt;Below is a run anywhere example to simulate,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults 
|eval Email_From_Address="from@first.com,from@second.com,from@third.com,from@fourth.com",msd_number="1,2,3,4"
|makemv Email_From_Address delim=","| makemv msd_number delim=","
|eval z=mvzip(Email_From_Address,msd_number)|table z|mvexpand z|eval s=split(z,",")
|eval Email_From_Address=mvindex(s,0),msd_number=mvindex(s,1)|fields - z,s
|append [|makeresults 
|eval Email_To_Address="to@first.com,to@second.com,to@third.com,to@fourth.com",msd_number="1,2,13,14"
|makemv Email_To_Address delim=","| makemv msd_number delim=","
|eval z=mvzip(Email_To_Address,msd_number)|table z|mvexpand z|eval s=split(z,",")
|eval Email_To_Address=mvindex(s,0),msd_number=mvindex(s,1)|fields - z,s]
|rename comment as "---------LINES ABOVE ARE FOR DUMMY DATA GENERATION AND HAS NOTHING TO DO WITH THE RESULT------"
|stats values(Email_From_Address) as From,values(Email_To_Address) as To , count by msd_number|where  count&amp;gt;1|fields - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:54:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398835#M6727</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-05T20:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398836#M6728</link>
      <description>&lt;P&gt;If the events are separate, then it should work, added as answer with a dummy search. please try and let me know if it works for you&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:56:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398836#M6728</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-05T20:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398837#M6729</link>
      <description>&lt;P&gt;I thank you all again for your continued support. I have found out why my results are not as expected, which is to two large factors:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Even though the Email_To_MSD_Number and Email_From_MSD_Number fields are always present in ONLY an email To or From event, the generic msd_number field is found not only in Email To and From events, but other events as well. This results in our tested query to give rows without a To or From email address, because when using "by msd_number" it includes the rows that don't have an Email_From_Address or Email_To_Address.&lt;/LI&gt;
&lt;LI&gt;I have found that the msd_number is re-used later in the day, so it is not entirely unique per every message. I would almost have to make sure the Email_From_Address event and Email_To_Address events are within the same hour to ensure the msd_number is unique between them.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398837#M6729</guid>
      <dc:creator>silverlink34</dc:creator>
      <dc:date>2020-09-29T21:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398838#M6730</link>
      <description>&lt;P&gt;@renjith.nair, thank you for putting the time into creating dummy data generation to help me find a solution. Your example you provided with the results it yielded is exactly what I am looking for.&lt;/P&gt;

&lt;P&gt;I have further fixed more of the issue by extracting a new field, called "To_or_From_MSD_Number" which uses specific regex to capture the MSD number ONLY if it is a To or From email event. This has given me near exactly the results I needed when using your new search query. &lt;/P&gt;

&lt;P&gt;However, what I have found is that this email application will re-use the MSD number further in the same day, making results have multiple values in the From and To columns. Due to this unfortunate detail, I wonder if this is beyond the scope of Splunk's ability. The search query would have to somehow get the msd matched To and From events that are within the same hour. Or maybe I could throw the source ip that is in the To event into the query somewhere to isolate the results.&lt;/P&gt;

&lt;P&gt;Here is an example, where I specified 1 MSD number because it has been used twice already today:&lt;BR /&gt;
search query:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;host = hostIp To_or_From_MSD_Number="10092" | stats values(Email_From_Address) as From,values(Email_To_Address) as To, count by To_or_From_MSD_Number|where count&amp;gt;1| fields - count&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Results:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;To_or_From_MSD_Number:          From:                           To:&lt;BR /&gt;
10092                                                &lt;A href="mailto:from@first.com" target="_blank"&gt;from@first.com&lt;/A&gt;          &lt;A href="mailto:to@first.com" target="_blank"&gt;to@first.com&lt;/A&gt;&lt;BR /&gt;
                                                           &lt;A href="mailto:from@second.com" target="_blank"&gt;from@second.com&lt;/A&gt;    &lt;A href="mailto:to@second.com" target="_blank"&gt;to@second.com&lt;/A&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;And here would be the actual To and From events from the results:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Oct 8 06:27:19 mail msd[10092] MAIL command received, args: FROM: &lt;A href="mailto:from@first.com" target="_blank"&gt;from@first.com&lt;/A&gt;&lt;BR /&gt;
Oct 8 06:27:19 mail msd[10092] RCPT command received (1.1.1.1), args: TO: &lt;A href="mailto:to@first.com" target="_blank"&gt;to@first.com&lt;/A&gt;&lt;BR /&gt;
Oct 8 08:20:10 mail msd[10092] MAIL command received, args: FROM: &lt;A href="mailto:from@second.com" target="_blank"&gt;from@second.com&lt;/A&gt;&lt;BR /&gt;
Oct 8 08:20:11 mail msd[10092] RCPT command received (2.2.2.2), args: TO: &lt;A href="mailto:to@second.com" target="_blank"&gt;to@second.com&lt;/A&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;After looking at the events here I noticed that the source ip in the To events differs, is it possible to separate the joined results from our search query by using that source ip? (meaning the 1.1.1.1 and the 2.2.2.2 ips in the To events)&lt;/P&gt;

&lt;P&gt;The results I would hope could be achievable would look something like this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Source IP:          MSD Number:          From:                              To:&lt;BR /&gt;
1.1.1.1                10092                        &lt;A href="mailto:from@first.com" target="_blank"&gt;from@first.com&lt;/A&gt;             &lt;A href="mailto:to@first.com" target="_blank"&gt;to@first.com&lt;/A&gt;&lt;BR /&gt;
2.2.2.2                10092                        &lt;A href="mailto:from@second.com" target="_blank"&gt;from@second.com&lt;/A&gt;       &lt;A href="mailto:to@second.com" target="_blank"&gt;to@second.com&lt;/A&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I apologize for this difficult request. I will accept that what I ask for is over-complicated and not achievable if necessary.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:31:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398838#M6730</guid>
      <dc:creator>silverlink34</dc:creator>
      <dc:date>2020-09-29T21:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398839#M6731</link>
      <description>&lt;P&gt;@silverlink34 , no problem! Are the IPs in both FROM &amp;amp; TO events or only in the TO?&lt;BR /&gt;
If not and if the only way to find it based on time difference,then lets try  &lt;CODE&gt;transaction&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;My sample events&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Oct 8 06:27:19 mail msd=10092 MAIL command received, args: FROM=from@first.com
Oct 8 06:27:19 mail msd=10092 RCPT command received (1.1.1.1), args: TO=to@first.com
Oct 8 06:40:19 mail msd=10098 MAIL command received, args: FROM=from@second.com
Oct 8 06:40:19 mail msd=10099 RCPT command received (1.1.1.1), args: TO=to@second.com
Oct 8 08:20:10 mail msd=10092 MAIL command received, args: FROM=from@third.com
Oct 8 08:20:11 mail msd=10092 RCPT command received (2.2.2.2), args: TO=to@third.com
Oct 8 09:20:10 mail msd=10019 MAIL command received, args: FROM=from@fourth.com
Oct 8 09:20:11 mail msd=10019 RCPT command received (2.2.2.2), args: TO=to@fourth.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Search&lt;/STRONG&gt;&lt;BR /&gt;
    "search terms and field extractions" |transaction MSD startswith="FROM" endswith="TO" keepevicted=false maxspan=1hr|table MSD,FROM,TO&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MSD FROM                         TO
10019   from@fourth.com   to@fourth.com
10092   from@third.com         to@third.com
10092   from@first.com         to@first.com
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Oct 2018 13:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398839#M6731</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-10T13:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: In a Splunk search, how do you match "from address" and "to address" event IDS to obtain table of emails?</title>
      <link>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398840#M6732</link>
      <description>&lt;P&gt;Please close this question. The suggestions to use the transaction search command have prompted me to gather information in a different manner, which has spawned a new question. I will ask the new question separately. Thank you for all time involved.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 17:01:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/In-a-Splunk-search-how-do-you-match-quot-from-address-quot-and/m-p/398840#M6732</guid>
      <dc:creator>silverlink34</dc:creator>
      <dc:date>2018-11-02T17:01:55Z</dc:date>
    </item>
  </channel>
</rss>

