<?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 How can I mask email id's when indexing? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298168#M93735</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I want to mask email id from Message tracking logs,but it mask the whole event.Could you pelase help me in masking only emailid's and no other data from the event.&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[emailaddr-anonymizer]
REGEX = ([A-z0-9._%+-]+@[A-z0-9.-]+\.[A-z]{2,63})
FORMAT = ********@*********
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[&amp;lt;given_source_type&amp;gt;]

TRANSFORMS-anonymize = emailaddr-anonymizer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;gotsomething,somename@something.com,junk files for,somename@somedomain.com,this is a test log with some emails,myname@mydomain.net,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Expected output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;gotsomething,xxxxx@xxxxxxx,junk files for,xxxxxx@xxxxxxx,this is a test log with some emails,xxxxx@xxxxxxx,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2017 08:49:43 GMT</pubDate>
    <dc:creator>ansif</dc:creator>
    <dc:date>2017-11-20T08:49:43Z</dc:date>
    <item>
      <title>How can I mask email id's when indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298168#M93735</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I want to mask email id from Message tracking logs,but it mask the whole event.Could you pelase help me in masking only emailid's and no other data from the event.&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[emailaddr-anonymizer]
REGEX = ([A-z0-9._%+-]+@[A-z0-9.-]+\.[A-z]{2,63})
FORMAT = ********@*********
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[&amp;lt;given_source_type&amp;gt;]

TRANSFORMS-anonymize = emailaddr-anonymizer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;gotsomething,somename@something.com,junk files for,somename@somedomain.com,this is a test log with some emails,myname@mydomain.net,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Expected output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;gotsomething,xxxxx@xxxxxxx,junk files for,xxxxxx@xxxxxxx,this is a test log with some emails,xxxxx@xxxxxxx,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 08:49:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298168#M93735</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2017-11-20T08:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I mask email id's when indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298169#M93736</link>
      <description>&lt;P&gt;Hi ansif,&lt;BR /&gt;
try to replace your transform.conf with the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[emailaddr-anonymizer]
REGEX = ,[^@]*@[^,]*,
FORMAT = ,********@*********,
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can test it at &lt;A href="https://regex101.com/r/z1JhxR/1"&gt;https://regex101.com/r/z1JhxR/1&lt;/A&gt;&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 09:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298169#M93736</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-20T09:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I mask email id's when indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298170#M93737</link>
      <description>&lt;P&gt;Thanks Giuseppe, but the above thing is not working as expected output&lt;/P&gt;

&lt;P&gt;Expected output is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; gotsomething,xxxxx@xxxxxxx,junk files for,xxxxxx@xxxxxxx,this is a test log with some emails,xxxxx@xxxxxxx,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I am getting:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;,********@*********,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And one more thing,the logs might have email id's without a comma like:&lt;/P&gt;

&lt;P&gt;gotsomething,&lt;A href="mailto:somename@something.com"&gt;somename@something.com&lt;/A&gt;,junk files for,&lt;A href="mailto:somename@somedomain.com"&gt;somename@somedomain.com&lt;/A&gt;,this is a test log with some emails,&lt;A href="mailto:myname@mydomain.net"&gt;myname@mydomain.net&lt;/A&gt;,&lt;A href="mailto:addedmail@domain.net"&gt;addedmail@domain.net&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 09:22:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298170#M93737</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2017-11-20T09:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I mask email id's when indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298171#M93738</link>
      <description>&lt;P&gt;Hi ansif,&lt;BR /&gt;
did yu seen &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedata"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedata&lt;/A&gt; ?&lt;BR /&gt;
using a sed script in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[given_source_type]
SEDCMD-emails = s/,[^@]*@[^,]*,/,********@*********,/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or using transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[emailaddr-anonymizer]
REGEX = ,[^@]*@[^,]*,
FORMAT = $1,********@*********,$2
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 09:36:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298171#M93738</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-20T09:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I mask email id's when indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298172#M93739</link>
      <description>&lt;P&gt;Working fine with below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [MSExchange:2013:MessageTracking]
    SEDCMD-emails = s/,?([A-z0-9._%+-]+@[A-z0-9.-]+\.[A-z]{2,63},?)/,********@*********,/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;@Giuseppe :: Please let me know how can I include domain name.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 10:51:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298172#M93739</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2017-11-20T10:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I mask email id's when indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298173#M93740</link>
      <description>&lt;P&gt;It is resolved:&lt;/P&gt;

&lt;P&gt;Tried below code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[MSExchange:2013:MessageTracking]
SEDCMD-emails = s/,?([A-z0-9._%+-]+@,?)/,********@/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Nov 2017 11:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-mask-email-id-s-when-indexing/m-p/298173#M93740</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2017-11-20T11:42:54Z</dc:date>
    </item>
  </channel>
</rss>

