<?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: Ironport email - list out the email errors in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Ironport-email-list-out-the-email-errors/m-p/130490#M184540</link>
    <description>&lt;P&gt;It seems like there is not a lot of consistency between the types of errors, the formats of the lines, etc.&lt;BR /&gt;
If you only have a few types of errors, you could do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
 | eval errorType=case(
    match(_raw,"Bounced:\sDCID\s\d+.*?Unknown address error \(.550"),"Unknown address error 550",
    match(_raw,"Connection Error.*?ERROR\: Mail refused.*?reason\: unexpected SMTP response"),"Mail refused"
    1==1,"No error"
    )
| where errorType!="No error"
| timechart span=1h count by errorType
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the &lt;CODE&gt;case&lt;/CODE&gt; function may get unwieldy very quickly. I suggest that you use &lt;CODE&gt;eventtypes&lt;/CODE&gt; to distinguish the types of errors. An eventtype defines a category of events based on a search - each eventtype has its own search. This facility can make things very simple - especially if you name all of the eventtypes with a simple prefix like &lt;CODE&gt;esa_&lt;/CODE&gt; (for example &lt;CODE&gt;esa_450_host_rejected&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;Once you have your eventtypes set up, your search and report could be very very simple:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype=esa*
| timechart span=1h count by eventtype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Learn about eventtypes in the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Classifyandgroupsimilarevents"&gt;Knowledge Manager manual&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2014 06:07:57 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2014-01-30T06:07:57Z</dc:date>
    <item>
      <title>Ironport email - list out the email errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ironport-email-list-out-the-email-errors/m-p/130489#M184539</link>
      <description>&lt;P&gt;Can anyone provide some sample search query to list out the errors?&lt;/P&gt;

&lt;P&gt;I have the error log shown as below and I want to do a statistic hourly/daily for different type of errors(450 -&lt;BR /&gt;
Client host rejected， Cannot resolve PTR; 505 - client was not authenticated etc) happened.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Jan 30 01:56:28 10.0.0.12 Jan 30 09:59:56 Test_log_server: Info: Bounced: DCID 2415126 MID 3878944 to RID 0 - Bounced by destination server with response: 5.1.0 - Unknown address error ('550', ['User not found: &lt;A href="mailto:testing@yahoo.com" target="_blank"&gt;testing@yahoo.com&lt;/A&gt;']) &lt;/P&gt;

&lt;P&gt;Jan 30 01:55:00 10.0.0.12 Jan 30 09:58:27 Test_log_server: Info: Connection Error: DCID 2478960 domain: satx.rr.com IP: 75.321.123.243 port: 25 details: 554-'5.7.1 - ERROR: Mail refused - &amp;lt;10.0.0.125&amp;gt; - See htttp :// postmaster.rr.com/amIBlockedByRR?ip=10.0.0.125' interface: 10.0.0.125 reason: unexpected SMTP response&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ironport-email-list-out-the-email-errors/m-p/130489#M184539</guid>
      <dc:creator>vickileong</dc:creator>
      <dc:date>2020-09-28T15:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Ironport email - list out the email errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ironport-email-list-out-the-email-errors/m-p/130490#M184540</link>
      <description>&lt;P&gt;It seems like there is not a lot of consistency between the types of errors, the formats of the lines, etc.&lt;BR /&gt;
If you only have a few types of errors, you could do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
 | eval errorType=case(
    match(_raw,"Bounced:\sDCID\s\d+.*?Unknown address error \(.550"),"Unknown address error 550",
    match(_raw,"Connection Error.*?ERROR\: Mail refused.*?reason\: unexpected SMTP response"),"Mail refused"
    1==1,"No error"
    )
| where errorType!="No error"
| timechart span=1h count by errorType
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the &lt;CODE&gt;case&lt;/CODE&gt; function may get unwieldy very quickly. I suggest that you use &lt;CODE&gt;eventtypes&lt;/CODE&gt; to distinguish the types of errors. An eventtype defines a category of events based on a search - each eventtype has its own search. This facility can make things very simple - especially if you name all of the eventtypes with a simple prefix like &lt;CODE&gt;esa_&lt;/CODE&gt; (for example &lt;CODE&gt;esa_450_host_rejected&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;Once you have your eventtypes set up, your search and report could be very very simple:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype=esa*
| timechart span=1h count by eventtype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Learn about eventtypes in the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Classifyandgroupsimilarevents"&gt;Knowledge Manager manual&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 06:07:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ironport-email-list-out-the-email-errors/m-p/130490#M184540</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-01-30T06:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ironport email - list out the email errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Ironport-email-list-out-the-email-errors/m-p/130491#M184541</link>
      <description>&lt;P&gt;hi Iguinn, Thank you very much.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2014 01:13:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Ironport-email-list-out-the-email-errors/m-p/130491#M184541</guid>
      <dc:creator>vickileong</dc:creator>
      <dc:date>2014-02-05T01:13:30Z</dc:date>
    </item>
  </channel>
</rss>

