<?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 get ip address from postfix logs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-get-ip-address-from-postfix-logs/m-p/135952#M37190</link>
    <description>&lt;P&gt;Hi saito0910,&lt;/P&gt;

&lt;P&gt;try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=mailhost1 | rex field=client "(?&amp;lt;myIP&amp;gt;(\d+\.){3}\d+)&amp;#1;]$" | top limit=100 myIP
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this will get the IP form the client field and returns it as new field &lt;CODE&gt;myIP&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Fri, 18 Apr 2014 05:58:52 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-04-18T05:58:52Z</dc:date>
    <item>
      <title>How can i get ip address from postfix logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-get-ip-address-from-postfix-logs/m-p/135951#M37189</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;How can i get ip address from like under log??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;---
Sep 13 23:55:42 mailhost1 postfix/smtpd[15824]: [ID 197553 mail.info] connect from example.com[1.1.1.1]
---
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I use search command "host=mailhost1 | top  limit=100 client ",&lt;BR /&gt;
and result is "example.com[1.1.1.1]".(source type is postfix_syslog)&lt;/P&gt;

&lt;P&gt;I need only ip address to use geoip.&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2014 05:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-get-ip-address-from-postfix-logs/m-p/135951#M37189</guid>
      <dc:creator>saito0910</dc:creator>
      <dc:date>2014-04-18T05:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: How can i get ip address from postfix logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-get-ip-address-from-postfix-logs/m-p/135952#M37190</link>
      <description>&lt;P&gt;Hi saito0910,&lt;/P&gt;

&lt;P&gt;try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=mailhost1 | rex field=client "(?&amp;lt;myIP&amp;gt;(\d+\.){3}\d+)&amp;#1;]$" | top limit=100 myIP
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this will get the IP form the client field and returns it as new field &lt;CODE&gt;myIP&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2014 05:58:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-get-ip-address-from-postfix-logs/m-p/135952#M37190</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-04-18T05:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can i get ip address from postfix logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-get-ip-address-from-postfix-logs/m-p/135953#M37191</link>
      <description>&lt;P&gt;Thanks MuS! That worked well! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2014 07:48:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-get-ip-address-from-postfix-logs/m-p/135953#M37191</guid>
      <dc:creator>saito0910</dc:creator>
      <dc:date>2014-04-18T07:48:03Z</dc:date>
    </item>
  </channel>
</rss>

