Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Parsing a Unix Mailbox

by jwest (Friar)
on Jul 18, 2002 at 16:22 UTC ( #182888=note: print w/replies, xml ) Need Help??


in reply to Parsing a Unix Mailbox

I'd look into avoiding reading the mbox file to begin with. With a properly defined alias or .forward file, you could use a script using Mail::Procmail to intercept the email as it's being delivered.

By doing so, you've eliminated all the headaches that go with handling the mbox file yourself. In addition, Mail::Procmail's pm_init method returns a Mail::Internet object, which will allow for easy manipulation of headers and bodies (and re-sending the email, as necessary).

Of course, if you're not using any of the more advanced features of Mail::Procmail, you could eliminate your use of the module by creating your Mail::Internet object directly:
my $mail = Mail::Internet->new(\*STDIN);

Hope this helps!

--jwest


-><- -><- -><- -><- -><-
All things are Perfect
    To every last Flaw
    And bound in accord
         With Eris's Law
 - HBT; The Book of Advice, 1:7

Replies are listed 'Best First'.
Re: Re: Parsing a Unix Mailbox
by domm (Chaplain) on Jul 19, 2002 at 07:47 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://182888]
help
Chatterbox?
[marto]: when you work on the outside, for a client, you can make them aware of the stupids, but they don' t always listen :/
[Corion]: Yeah, you can lead them to water, but it's illegal to drown them...
[Discipulus]: Here my solution marto: create a win fake machine insied AD. do a micro fake partition foreach remote partition you wont to monit. put a web server that acept from data from remote systems and full fake partition as needed. fake partition are Mb. ;=)
[marto]: Discipulus yeah, the nuclear industry love fake machines sitting around on a controlled domain :P
[marto]: changing a typo on a website is often a great deal of paper work :P

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2017-01-24 10:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.