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