<?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 Script to parse mail in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602787#M855963</link>
    <description>Greetings,&lt;BR /&gt;&lt;BR /&gt;I am working on a shell script that I would add to my .forward file:&lt;BR /&gt;&lt;BR /&gt;\rui, "|~/bin/mail_parser.sh"&lt;BR /&gt;&lt;BR /&gt;For each incoming mail, it would search for a given pattern (eg. subject). Upon detection of a given pattern, it would perform a given action (eg. send a mail,...).&lt;BR /&gt;&lt;BR /&gt;Any help or suggestion is welcome.&lt;BR /&gt;&lt;BR /&gt;TIA,&lt;BR /&gt;&lt;BR /&gt;Kind Regards,&lt;BR /&gt;&lt;BR /&gt;Rui</description>
    <pubDate>Sat, 27 Oct 2001 18:02:18 GMT</pubDate>
    <dc:creator>Rui Vilao</dc:creator>
    <dc:date>2001-10-27T18:02:18Z</dc:date>
    <item>
      <title>Script to parse mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602787#M855963</link>
      <description>Greetings,&lt;BR /&gt;&lt;BR /&gt;I am working on a shell script that I would add to my .forward file:&lt;BR /&gt;&lt;BR /&gt;\rui, "|~/bin/mail_parser.sh"&lt;BR /&gt;&lt;BR /&gt;For each incoming mail, it would search for a given pattern (eg. subject). Upon detection of a given pattern, it would perform a given action (eg. send a mail,...).&lt;BR /&gt;&lt;BR /&gt;Any help or suggestion is welcome.&lt;BR /&gt;&lt;BR /&gt;TIA,&lt;BR /&gt;&lt;BR /&gt;Kind Regards,&lt;BR /&gt;&lt;BR /&gt;Rui</description>
      <pubDate>Sat, 27 Oct 2001 18:02:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602787#M855963</guid>
      <dc:creator>Rui Vilao</dc:creator>
      <dc:date>2001-10-27T18:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script to parse mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602788#M855964</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;man procmail&lt;BR /&gt;man procmailex&lt;BR /&gt;&lt;BR /&gt;E.</description>
      <pubDate>Sat, 27 Oct 2001 18:25:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602788#M855964</guid>
      <dc:creator>Eugen Cocalea</dc:creator>
      <dc:date>2001-10-27T18:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Script to parse mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602789#M855965</link>
      <description>Oops, I thought it's a Linux question, sorry :) Let's check if there is a procmail for HPUX :)&lt;BR /&gt;&lt;BR /&gt;Found it:&lt;BR /&gt;&lt;A href="http://hpux.tn.tudelft.nl/hppd/hpux/Networking/Mail/procmail-3.21/" target="_blank"&gt;http://hpux.tn.tudelft.nl/hppd/hpux/Networking/Mail/procmail-3.21/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;E.</description>
      <pubDate>Sat, 27 Oct 2001 18:28:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602789#M855965</guid>
      <dc:creator>Eugen Cocalea</dc:creator>
      <dc:date>2001-10-27T18:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script to parse mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602790#M855966</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;Hrm, I should get the good habit to research first and answer after. No more 3 replies in a row then :)&lt;BR /&gt;&lt;BR /&gt;Anyway, this is how it goes with procmail (on my linux at least, but should work the same on HPUX):&lt;BR /&gt;&lt;BR /&gt;I have a .procmailrc file on my homedir. Any email that I get gets filtered by it. An example for subject parsing is (lines from .procmailrc):&lt;BR /&gt;&lt;BR /&gt;:0:&lt;BR /&gt;* ^Subject:. pattern&lt;BR /&gt;mail/folder_for_pattern&lt;BR /&gt;&lt;BR /&gt;This will save the mail with a certain pattern in their subject in the folder mail/... on my home dir.&lt;BR /&gt;You can run certain programs as well in the event that a match occurs (ie send an email, send a SMS, etc).&lt;BR /&gt;&lt;BR /&gt;E.</description>
      <pubDate>Sat, 27 Oct 2001 18:33:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602790#M855966</guid>
      <dc:creator>Eugen Cocalea</dc:creator>
      <dc:date>2001-10-27T18:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Script to parse mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602791#M855967</link>
      <description>Hi Rui,&lt;BR /&gt;&lt;BR /&gt;I put the following in aliases:&lt;BR /&gt;&lt;BR /&gt;parse: "|/usr/local/bin/parse_mail.sh"&lt;BR /&gt;&lt;BR /&gt;Where /usr/local/bin/parse_mail.sh contains:&lt;BR /&gt;&lt;BR /&gt;=========================================&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;while read line ; do&lt;BR /&gt; echo $line | grep -i subject &amp;amp;&amp;amp; echo "The subject is $line" &amp;gt; /tmp/parse.out&lt;BR /&gt;done&lt;BR /&gt;==========================================&lt;BR /&gt;&lt;BR /&gt;Sending to "parse" on this machine updated the /tmp/parse.out file.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Mon, 29 Oct 2001 08:18:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-parse-mail/m-p/2602791#M855967</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-10-29T08:18:33Z</dc:date>
    </item>
  </channel>
</rss>

