Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Mail check?

by tune (Curate)
on May 23, 2001 at 23:52 UTC ( #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.


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.


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. =)


      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?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2020-07-03 20:12 GMT
Find Nodes?
    Voting Booth?

    No recent polls found