Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to parse email in real time?

Reply
Thread Tools

How to parse email in real time?

 
 
http://links.i6networks.com
Guest
Posts: n/a
 
      08-18-2004
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.





 
Reply With Quote
 
 
 
 
Ed Morton
Guest
Posts: n/a
 
      08-18-2004


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.

 
Reply With Quote
 
 
 
 
Kevin Rodgers
Guest
Posts: n/a
 
      08-18-2004
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

 
Reply With Quote
 
http://links.i6networks.com
Guest
Posts: n/a
 
      08-18-2004
> 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?


 
Reply With Quote
 
Ed Morton
Guest
Posts: n/a
 
      08-18-2004


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.

 
Reply With Quote
 
Kenny McCormack
Guest
Posts: n/a
 
      08-18-2004
In article <GgLUc.1797057$(E-Mail Removed) ble.rogers.com>,
http://links.i6networks.com <(E-Mail Removed)> 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...

 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a
 
      08-18-2004
["Followup-To:" header set to comp.unix.shell.]
On Wed, 18 Aug 2004 15:33:36 GMT, http://links.i6networks.com
<(E-Mail Removed)> 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.
 
Reply With Quote
 
John Bokma
Guest
Posts: n/a
 
      08-18-2004
"http://links.i6networks.com" <(E-Mail Removed)> wrote in
news:kFKUc.1796255$(E-Mail Removed) .cable.rogers.com:

> 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

 
Reply With Quote
 
William Park
Guest
Posts: n/a
 
      08-18-2004
In <comp.unix.shell> http://links.i6networks.com
<(E-Mail Removed)> 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 <(E-Mail Removed)>
Open Geometry Consulting, Toronto, Canada
 
Reply With Quote
 
Zebee Johnstone
Guest
Posts: n/a
 
      08-18-2004
In comp.lang.perl.misc on Wed, 18 Aug 2004 16:15:34 GMT
http://links.i6networks.com <(E-Mail Removed)> 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 ((E-Mail Removed)), proud holder of
aus.motorcycles Poser Permit #1.
"Motorcycles are like peanuts... who can stop at just one?"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
optparse: parse v. parse! ?? 7stud -- Ruby 3 02-20-2008 05:20 AM
How to parse a string like C program parse the command line string? linzhenhua1205@163.com C Programming 19 03-15-2005 07:41 PM
how to parse "real life" HTML ? Bru, Pierre Java 2 05-06-2004 09:18 PM
product of real and (integer)(after converted to real one) value - vhdl found fatal error senthil VHDL 5 01-24-2004 04:37 AM



Advertisments