<?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: how can I convert mailbox or maildir to splunk ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82533#M181926</link>
    <description>&lt;P&gt;One approach I like is using procmail.  A fairly simple procmail recipe can write each message into its own file in a given directory.  From there, configure Splunk to read files from said directory as a "sinkhole" style input - meaning Splunk deletes the file after indexing it.&lt;/P&gt;

&lt;P&gt;A &lt;CODE&gt;.procmailrc&lt;/CODE&gt; that does this looks something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LOGFILE=$HOME/.procmail.log
VERBOSE=yes

:0
* Subject: security system alert.*
/home/foo/securityalerts
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each message then gets written -- headers and all -- into its own file in &lt;CODE&gt;/home/foo/securityalerts&lt;/CODE&gt;.  From there, it's pretty easy to let Splunk ingest that.&lt;/P&gt;

&lt;P&gt;Then to configure Splunk:&lt;/P&gt;

&lt;P&gt;(inputs.conf)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[batch:///home/foo/securityalerts]
move_policy = sinkhole
whitelist = /msg\..*$
crcSalt = &amp;lt;SOURCE&amp;gt;
sourcetype = securityalerts
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(props.conf)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[securityalerts]
SHOULD_LINEMERGE = FALSE
LINE_BREAKER = 12345678900987654321qwertyuiopasdfghjkllkjhgfdsapoiuytrewq
TIME_PREFIX = ^Date:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 07 Oct 2012 15:28:46 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2012-10-07T15:28:46Z</dc:date>
    <item>
      <title>how can I convert mailbox or maildir to splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82531#M181924</link>
      <description>&lt;P&gt;hi all,our security system can not send report via syslog,but can send it via email.&lt;BR /&gt;
I want to use splunk to monitor the report from email and generate the dashboard in splunk.&lt;BR /&gt;
How can I convert mailbox or maildir to splunk ?&lt;BR /&gt;
Thank you !&lt;/P&gt;</description>
      <pubDate>Sun, 07 Oct 2012 06:29:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82531#M181924</guid>
      <dc:creator>perlish</dc:creator>
      <dc:date>2012-10-07T06:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: how can I convert mailbox or maildir to splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82532#M181925</link>
      <description>&lt;P&gt;The easiest thing would probably be to setup some kind of scripted input that checks if any new mails have arrived, checks the mailbox/maildir structure and extracts the relevant parts of any new email before finally outputting it back to Splunk.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/AdvancedDev/ScriptedInputsIntro"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/AdvancedDev/ScriptedInputsIntro&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Oct 2012 07:58:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82532#M181925</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-10-07T07:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: how can I convert mailbox or maildir to splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82533#M181926</link>
      <description>&lt;P&gt;One approach I like is using procmail.  A fairly simple procmail recipe can write each message into its own file in a given directory.  From there, configure Splunk to read files from said directory as a "sinkhole" style input - meaning Splunk deletes the file after indexing it.&lt;/P&gt;

&lt;P&gt;A &lt;CODE&gt;.procmailrc&lt;/CODE&gt; that does this looks something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LOGFILE=$HOME/.procmail.log
VERBOSE=yes

:0
* Subject: security system alert.*
/home/foo/securityalerts
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each message then gets written -- headers and all -- into its own file in &lt;CODE&gt;/home/foo/securityalerts&lt;/CODE&gt;.  From there, it's pretty easy to let Splunk ingest that.&lt;/P&gt;

&lt;P&gt;Then to configure Splunk:&lt;/P&gt;

&lt;P&gt;(inputs.conf)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[batch:///home/foo/securityalerts]
move_policy = sinkhole
whitelist = /msg\..*$
crcSalt = &amp;lt;SOURCE&amp;gt;
sourcetype = securityalerts
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(props.conf)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[securityalerts]
SHOULD_LINEMERGE = FALSE
LINE_BREAKER = 12345678900987654321qwertyuiopasdfghjkllkjhgfdsapoiuytrewq
TIME_PREFIX = ^Date:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Oct 2012 15:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82533#M181926</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-10-07T15:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: how can I convert mailbox or maildir to splunk ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82534#M181927</link>
      <description>&lt;P&gt;Were you able to solve your problem with either of these answers?  Any news or update on your progress?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2012 15:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-can-I-convert-mailbox-or-maildir-to-splunk/m-p/82534#M181927</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-11-11T15:17:37Z</dc:date>
    </item>
  </channel>
</rss>

