How to parse email in real time?

Discussion in 'Perl Misc' started by http://links.i6networks.com, Aug 18, 2004.

  1. What I want to make is something to automatically analyzing the email
    received

    Is there a way to parse email in real time in Perl or Shell, assuming the
    script is sitting with the mail server.

    I looked into the email format, sometimes, it has something like =3D =0 at
    the end of line. Sometimes, it email looks a like a binary file, but it
    should be text file as only text and html are in the file.
     
    http://links.i6networks.com, Aug 18, 2004
    #1
    1. Advertising

  2. http://links.i6networks.com

    Ed Morton Guest

    http://links.i6networks.com wrote:
    > What I want to make is something to automatically analyzing the email
    > received
    >
    > Is there a way to parse email in real time in Perl or Shell, assuming the
    > script is sitting with the mail server.
    >
    > I looked into the email format, sometimes, it has something like =3D =0 at
    > the end of line. Sometimes, it email looks a like a binary file, but it
    > should be text file as only text and html are in the file.
    >
    >


    Check out procmail (http://www.procmail.org/) and formail (google).

    Ed.
     
    Ed Morton, Aug 18, 2004
    #2
    1. Advertising

  3. http://links.i6networks.com wrote:
    > What I want to make is something to automatically analyzing the email
    > received
    >
    > Is there a way to parse email in real time in Perl or Shell, assuming the
    > script is sitting with the mail server.


    procmail can invoke any executable or script on incoming messages:
    http://www.procmail.org/

    --
    Kevin Rodgers
     
    Kevin Rodgers, Aug 18, 2004
    #3
  4. > http://links.i6networks.com wrote:
    > > What I want to make is something to automatically analyzing the email
    > > received
    > >
    > > Is there a way to parse email in real time in Perl or Shell, assuming

    the
    > > script is sitting with the mail server.
    > >
    > > I looked into the email format, sometimes, it has something like =3D =0

    at
    > > the end of line. Sometimes, it email looks a like a binary file, but it
    > > should be text file as only text and html are in the file.
    > >
    > >

    >
    > Check out procmail (http://www.procmail.org/) and formail (google).
    >


    The file is C based source codes. How do I install it on the server as I
    don't have admin access to it. Is there something similar to it in
    Perl/PHP/Shell?

    Is ProcMail runable on Windows?
     
    http://links.i6networks.com, Aug 18, 2004
    #4
  5. http://links.i6networks.com

    Ed Morton Guest

    http://links.i6networks.com wrote:

    >>http://links.i6networks.com wrote:
    >>
    >>>What I want to make is something to automatically analyzing the email
    >>>received
    >>>
    >>>Is there a way to parse email in real time in Perl or Shell, assuming

    >
    > the
    >
    >>>script is sitting with the mail server.
    >>>
    >>>I looked into the email format, sometimes, it has something like =3D =0

    >
    > at
    >
    >>>the end of line. Sometimes, it email looks a like a binary file, but it
    >>>should be text file as only text and html are in the file.
    >>>
    >>>

    >>
    >>Check out procmail (http://www.procmail.org/) and formail (google).
    >>

    >
    >
    > The file is C based source codes. How do I install it on the server as I
    > don't have admin access to it. Is there something similar to it in
    > Perl/PHP/Shell?
    >
    > Is ProcMail runable on Windows?
    >


    I expect most of the above questions are addressed in the FAQs on that page.

    Ed.
     
    Ed Morton, Aug 18, 2004
    #5
  6. In article <GgLUc.1797057$>,
    http://links.i6networks.com <> wrote:
    ....
    >> Check out procmail (http://www.procmail.org/) and formail (google).
    >>

    >
    >The file is C based source codes. How do I install it on the server as I
    >don't have admin access to it.


    Do you have access to a C compiler?

    >Is there something similar to it in Perl/PHP/Shell?


    Probably. I'd never use it, though.

    >Is ProcMail runable on Windows?


    O/T in this NG. Try down the hall...
     
    Kenny McCormack, Aug 18, 2004
    #6
  7. http://links.i6networks.com

    Bill Marcum Guest

    ["Followup-To:" header set to comp.unix.shell.]
    On Wed, 18 Aug 2004 15:33:36 GMT, http://links.i6networks.com
    <> wrote:
    > What I want to make is something to automatically analyzing the email
    > received
    >
    > Is there a way to parse email in real time in Perl or Shell, assuming the
    > script is sitting with the mail server.
    >
    > I looked into the email format, sometimes, it has something like =3D =0 at
    > the end of line. Sometimes, it email looks a like a binary file, but it
    > should be text file as only text and html are in the file.
    >

    That sounds like quoted-printable encoding. If you can edit the email
    to add these header lines, your mail client might decode it:
    Content-Type: text/plain
    Content-Transfer-Encoding: quoted-printable
    Mime-Version: 1.0



    --
    Liberals don't believe they deserve anything they own; conservatives think
    they're entitled to everything they've stolen.
     
    Bill Marcum, Aug 18, 2004
    #7
  8. http://links.i6networks.com

    John Bokma Guest

    "http://links.i6networks.com" <> wrote in
    news:kFKUc.1796255$:

    > What I want to make is something to automatically analyzing the email
    > received


    For Spam?

    > Is there a way to parse email in real time in Perl or Shell, assuming
    > the script is sitting with the mail server.


    I use spamassassin for this (for spam that is). Written in Perl ;-)

    --
    John Small Perl scripts:http://johnbokma.com/perl/
    Perl programmer available: http://castleamber.com/
    Happy Customers: http://castleamber.com/testimonials.html
     
    John Bokma, Aug 18, 2004
    #8
  9. http://links.i6networks.com

    William Park Guest

    In <comp.unix.shell> http://links.i6networks.com
    <> wrote:
    > What I want to make is something to automatically analyzing the email
    > received
    >
    > Is there a way to parse email in real time in Perl or Shell, assuming
    > the script is sitting with the mail server.
    >
    > I looked into the email format, sometimes, it has something like =3D
    > =0 at the end of line. Sometimes, it email looks a like a binary file,
    > but it should be text file as only text and html are in the file.


    Steps that are involve are the same as spam filtering. For that,
    standard answer is
    man procmail procmailrc procmailex
    man formail
    asuming you're running Linux. For Windows, I've heard the
    www.cygwin.org has something offer. Though I don't know whether you can
    invoke Procmail from whatever MTA you're running.

    --
    William Park <>
    Open Geometry Consulting, Toronto, Canada
     
    William Park, Aug 18, 2004
    #9
  10. In comp.lang.perl.misc on Wed, 18 Aug 2004 16:15:34 GMT
    http://links.i6networks.com <> wrote:
    >>

    >
    > The file is C based source codes. How do I install it on the server as I
    > don't have admin access to it. Is there something similar to it in
    > Perl/PHP/Shell?
    >


    YOu could look at the cpan module Mail::Audit and write a perlscript
    using that.

    I use it instead of procmail.

    You will probably have to describe the exact problem and setup in order
    to get useful information. Such as is this "server" a machine you read
    mail on, or one you pop mail from? What ability do you have to run the
    mail through anything?


    Zebee

    --
    Zebee Johnstone (), proud holder of
    aus.motorcycles Poser Permit #1.
    "Motorcycles are like peanuts... who can stop at just one?"
     
    Zebee Johnstone, Aug 18, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. senthil
    Replies:
    5
    Views:
    1,411
    senthil
    Jan 24, 2004
  2. Curious Trigger
    Replies:
    2
    Views:
    1,832
    Curious Trigger
    Sep 9, 2006
  3. flamesrock
    Replies:
    8
    Views:
    502
    Hendrik van Rooyen
    Nov 24, 2006
  4. Peter Krantz
    Replies:
    2
    Views:
    205
  5. Brian

    Real time converted to Unix time

    Brian, Aug 29, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    394
    James Willmore
    Aug 29, 2003
Loading...

Share This Page