<?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: Regexes for Exchange SMTP logs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113895#M30077</link>
    <description>&lt;P&gt;What values of data does the regex returning? I does seems to work with your sample data for me.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jun 2014 20:59:37 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-06-20T20:59:37Z</dc:date>
    <item>
      <title>Regexes for Exchange SMTP logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113890#M30072</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;The sample logs are listed below&lt;BR /&gt;
2014-06-18T02:25:16.879Z,TSEAET01\NEW - Internet receive connector TSEAET01,08D1456B7AFF9BDF,22,147.81.121.139:25,147.81.122.24:61707,&lt;EM&gt;,"CN=Entrust Certification Authority - L1C, OU=""(c) 2009 Entrust, Inc."", OU=&lt;A href="http://www.entrust.net/rpa"&gt;www.entrust.net/rpa&lt;/A&gt; is incorporated by reference, O=""Entrust, Inc."", C=US",Certificate issuer name&lt;BR /&gt;
2014-06-18T02:25:16.879Z,TSEAET01\NEW - Internet receive connector TSEAET01,08D1456B7AFF9BDF,23,147.81.121.139:25,147.81.122.24:61707,&lt;/EM&gt;,4C1B9021,Certificate serial number&lt;BR /&gt;
2014-06-18T02:25:16.879Z,TSEAET01\NEW - Internet receive connector TSEAET01,08D1456B7AFF9BDF,24,147.81.121.139:25,147.81.122.24:61707,&lt;EM&gt;,27A7B6AAACBE39610C3A148D60EF4F5F2BE60FB0,Certificate thumbprint&lt;BR /&gt;
2014-06-18T02:25:16.879Z,TSEAET01\NEW - Internet receive connector TSEAET01,08D1456B7AFF9BDF,25,147.81.121.139:25,147.81.122.24:61707,&lt;/EM&gt;,TSEAET01.tascnet.tasc.com;Mail1.tasc.com;Mail.tasc.com;Mail.tascnet.tasc.com,Certificate alternate names&lt;BR /&gt;
2014-06-18T02:25:16.910Z,TSEAET01\NEW - Internet receive connector TSEAET01,08D1456B7AFF9BDF,26,147.81.121.139:25,147.81.122.24:61707,*,,Received certificate&lt;/P&gt;

&lt;P&gt;The field headers are &lt;/P&gt;

&lt;H1&gt;Fields: date-time,connector-id,session-id,sequence-number,local-endpoint,remote-endpoint,event,data,context&lt;/H1&gt;

&lt;P&gt;My (non-working) regexes are as follows&lt;/P&gt;

&lt;P&gt;(?&lt;DATE_TIME&gt;[^,]+),(?&lt;CONNECTOR_ID&gt;[^,]+),(?&lt;SESSION_ID&gt;[^,]+),(?&lt;SEQUENCE_NUMBER&gt;[^,]+),(?&lt;LOCAL_ENDPOINT&gt;[^,]+),(?&lt;REMOTE_ENDPOINT&gt;[^,]+),(?&lt;EVENT&gt;[^,]+),(?(?=")(?&lt;DATA&gt;.+),)|(?(?=,)(?&lt;DATA&gt;,),)|(?(?=.)(?&lt;DATA&gt;[^,]),),(?&lt;CONTEXT&gt;.+)\r\n&lt;/CONTEXT&gt;&lt;/DATA&gt;&lt;/DATA&gt;&lt;/DATA&gt;&lt;/EVENT&gt;&lt;/REMOTE_ENDPOINT&gt;&lt;/LOCAL_ENDPOINT&gt;&lt;/SEQUENCE_NUMBER&gt;&lt;/SESSION_ID&gt;&lt;/CONNECTOR_ID&gt;&lt;/DATE_TIME&gt;&lt;/P&gt;

&lt;P&gt;I have trouble parsing the field named "data", which can take any one the following forms&lt;BR /&gt;
1) "CN=Entrust Certification Authority - L1C, OU=""(c) 2009 Entrust, Inc."", OU=&lt;A href="http://www.entrust.net/rpa"&gt;www.entrust.net/rpa&lt;/A&gt; is incorporated by reference, O=""Entrust, Inc."", C=US"&lt;BR /&gt;
2) 4C1B9021&lt;BR /&gt;
3) ,&lt;/P&gt;

&lt;P&gt;It appears that the time stamp is processed correctly, however.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:48:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113890#M30072</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2014-06-20T17:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regexes for Exchange SMTP logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113891#M30073</link>
      <description>&lt;P&gt;Is there some reason you are not using INDEXED_EXTRACTIONS?&lt;/P&gt;

&lt;P&gt;Here is a blog post about the feature:&lt;BR /&gt;
    &lt;A href="http://blogs.splunk.com/2013/10/18/iis-logs-and-splunk-6/"&gt;http://blogs.splunk.com/2013/10/18/iis-logs-and-splunk-6/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It deals with IIS logs, but the same principal can be used.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:52:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113891#M30073</guid>
      <dc:creator>ahall_splunk</dc:creator>
      <dc:date>2014-06-20T17:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regexes for Exchange SMTP logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113892#M30074</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(?&amp;lt;date_time&amp;gt;[^,]+),(?&amp;lt;connector_id&amp;gt;[^,]+),(?&amp;lt;session_id&amp;gt;[^,]+),(?&amp;lt;sequence_number&amp;gt;[^,]+),(?&amp;lt;local_endpoint&amp;gt;[^,]+),(?&amp;lt;remote_endpoint&amp;gt;[^,]+),(?&amp;lt;event&amp;gt;[^,]*),(?P&amp;lt;data&amp;gt;.*),(?P&amp;lt;context&amp;gt;.*)$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jun 2014 19:34:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113892#M30074</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-20T19:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regexes for Exchange SMTP logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113893#M30075</link>
      <description>&lt;P&gt;Thank you for promptness.&lt;/P&gt;

&lt;P&gt;A _&lt;BR /&gt;
The suggested regex does not work. It cannot parse the "data" field as listed below&lt;BR /&gt;
1) "CN=Entrust Certification Authority - L1C, OU=""(c) 2009 Entrust, Inc."", OU=&lt;A href="http://www.entrust.net/rpa"&gt;www.entrust.net/rpa&lt;/A&gt; is incorporated by reference, O=""Entrust, Inc."", C=US"&lt;BR /&gt;
2) 4C1B9021&lt;BR /&gt;
3) ,&lt;/P&gt;

&lt;P&gt;B _&lt;/P&gt;

&lt;P&gt;The blogs is about the IIS format, not MS Exchange SMTP logs format.  In fact, I have tried to parse a sample file using the "IIS" existing source type.  That attempts fails too.&lt;/P&gt;

&lt;P&gt;Looking forward to a working solution.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 20:20:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113893#M30075</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2014-06-20T20:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regexes for Exchange SMTP logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113894#M30076</link>
      <description>&lt;P&gt;Thank you for promptness.&lt;/P&gt;

&lt;P&gt;A _&lt;BR /&gt;
The suggested regex does not work. It cannot parse the "data" field as listed below&lt;BR /&gt;
1) "CN=Entrust Certification Authority - L1C, OU=""(c) 2009 Entrust, Inc."", OU=&lt;A href="http://www.entrust.net/rpa"&gt;www.entrust.net/rpa&lt;/A&gt; is incorporated by reference, O=""Entrust, Inc."", C=US"&lt;BR /&gt;
2) 4C1B9021&lt;BR /&gt;
3) ,&lt;/P&gt;

&lt;P&gt;B _&lt;/P&gt;

&lt;P&gt;The blogs is about the IIS format, not MS Exchange SMTP logs format.  In fact, I have tried to parse a sample file using the "IIS" existing source type.  That attempts fails too.&lt;/P&gt;

&lt;P&gt;Looking forward to a working solution.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 20:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113894#M30076</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2014-06-20T20:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regexes for Exchange SMTP logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113895#M30077</link>
      <description>&lt;P&gt;What values of data does the regex returning? I does seems to work with your sample data for me.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 20:59:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113895#M30077</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-20T20:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regexes for Exchange SMTP logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113896#M30078</link>
      <description>&lt;P&gt;The working regex in props.conf is listed below&lt;/P&gt;

&lt;P&gt;[xchange_agent]&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = false&lt;BR /&gt;
TIME_PREFIX = ^&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%N%Z&lt;BR /&gt;
EXTRACT-xchange_agent =,(?P&lt;SESSIONID&gt;[^,]&lt;EM&gt;),(?P&lt;LOCALENDPOINT&gt;[^,]+),(?P&lt;REMOTEENDPOINT&gt;[^,]+),(?P&lt;ENTEREDORGFROMIP&gt;[^,]+),(?P&lt;MESSAGEID&gt;,|[^,]&lt;/MESSAGEID&gt;&lt;/ENTEREDORGFROMIP&gt;&lt;/REMOTEENDPOINT&gt;&lt;/LOCALENDPOINT&gt;&lt;/EM&gt;),(?P&lt;P1FROMADDRESSES&gt;[^,]&lt;EM&gt;),(?P&amp;lt;21FromAddresses&amp;gt;[^,]&lt;/EM&gt;),(?P&lt;RECIPIENTS&gt;[^,]&lt;EM&gt;),(?P&lt;NUMRECIPIENTS&gt;[^,]&lt;/NUMRECIPIENTS&gt;&lt;/EM&gt;),(?P&lt;AGENT&gt;[^,]&lt;EM&gt;),(?P&lt;EVENT&gt;[^,]&lt;/EVENT&gt;&lt;/EM&gt;),(?P&lt;ACTION&gt;[^,]&lt;EM&gt;),(?P&lt;SMTPRESPONSE&gt;[^,]&lt;/SMTPRESPONSE&gt;&lt;/EM&gt;),(?P&lt;REASON&gt;[^,]&lt;EM&gt;),(?P&lt;REASONDATA&gt;[^,]&lt;/REASONDATA&gt;&lt;/EM&gt;),(?P&lt;DIAGNOSTICS&gt;.*)&lt;/DIAGNOSTICS&gt;&lt;/REASON&gt;&lt;/ACTION&gt;&lt;/AGENT&gt;&lt;/RECIPIENTS&gt;&lt;/P1FROMADDRESSES&gt;&lt;/SESSIONID&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113896#M30078</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2020-09-28T16:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regexes for Exchange SMTP logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113897#M30079</link>
      <description>&lt;P&gt;Sorry, I copied the wrong regex with the previous answer.&lt;BR /&gt;
The correct and working regex in props.conf is listed below&lt;/P&gt;

&lt;P&gt;[xchange_smtp]&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = false&lt;BR /&gt;
TIME_PREFIX = ^&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%N%Z&lt;BR /&gt;
EXTRACT-xchange_smtp =,(?&lt;CONNECTOR_ID&gt;[^,]+),(?&lt;SESSION_ID&gt;[^,]+),(?&lt;SEQUENCE_NUMBER&gt;[^,]+),(?&lt;LOCAL_ENDPOINT&gt;[^,]+),(?&lt;REMOTE_ENDPOINT&gt;[^,]+),(?&lt;EVENT&gt;[^,]&lt;EM&gt;),(?&lt;DATA&gt;".+"|[^,]&lt;/DATA&gt;&lt;/EM&gt;|,),(?&lt;CONTEXT&gt;.*)&lt;/CONTEXT&gt;&lt;/EVENT&gt;&lt;/REMOTE_ENDPOINT&gt;&lt;/LOCAL_ENDPOINT&gt;&lt;/SEQUENCE_NUMBER&gt;&lt;/SESSION_ID&gt;&lt;/CONNECTOR_ID&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regexes-for-Exchange-SMTP-logs/m-p/113897#M30079</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2020-09-28T16:56:19Z</dc:date>
    </item>
  </channel>
</rss>

