Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Mail check?

by tune (Curate)
on May 23, 2001 at 23:52 UTC ( [id://82700]=note: print w/replies, xml ) Need Help??


in reply to Mail check?

Mail::Util should be helpful for you. I never tried it, but looks good to parse the local mailbox.

--
tune

Replies are listed 'Best First'.
Re: Re: Mail check?
by stephen (Priest) on May 24, 2001 at 00:08 UTC
    Mail::Util does indeed have a handy read_mbox routine which reads a file and returns a list of references. Only problem with it is that it immediately reads all of the messages in the file into memory. I have several truly huge mailboxes, which cause my Perl process to crash and burn when I try to read them with read_mbox.

    So use read_mbox with caution.

    stephen

Re: Re: Mail check?
by malloc (Pilgrim) on May 23, 2001 at 23:55 UTC
    Why not pipe mailspool to md5sum, and compare the checksums ever so often? -malloc
      Well, this will indeed show a change in the spool, but it will not quite tell me if there are messages in it. The md5 check will go off when new mail arrives, but also when mail is read and removed from the spool. =)

      Odie

      --
      I am a manual signature virus. Copy me please!
        ahh, i was not thinking completely, thank you. However, you could hack a little checksum update onto the the close of your mail reader through a shell script :) Or, you could do like i do, and just keep a console with pine open all the time, and it will system beep when new mail arrives. Okay, sorry, this is perl discussion, i am just not sure if it is the right tool. -malloc

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://82700]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-25 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found