[Top] [All Lists]

Re: running script in .procmailrc

1999-02-08 05:43:23
* 1999-02-05 Julien Gilles 
* Message-Id: 
| I am using TRAP to run a script that refresh my mail reader (gnus)
| each time a mail arrives. Sometimes I don't want to refresh gnus.
| Is there a way to disable the TRAP in some cases ?

If you use Emacs, I would recommend setting up separate mail detector process
inside one of Emacs buffers. There are some biff modules already available
(do dejanews search) or alternatively you could use TinyMail that I wrote.


     Feature: Reporting incoming mail in local mail spool
        Function to control mail reporting:
        When you load this package a Report Mail feature is activated.
        If you're running windowed Emacs, the X-dragbar (top of the frame)
        is used to display the last incoming mail and count of pending
        unread mail. Here the last message was from Mr. foo and the
        pending mail count in spool is six.
            "foo(_at_)bar(_dot_)com 6" ;; See variable 
        In non-windowed Emacs this same information is displayed in echo
        are instead. If you would like to have it always displayed in
        echo are, even in X envinronment, then set variable
        `timi-:report-window-system' to nil before loading this package.
        If you would like see more infomation about the arrived mail, you
        can adjust `timi-:report-spool-buffer-control' eg. to keep
        permanent record of incoming mail. Value 'keep says that the report
        mail buffer is kept when mail is queried, so you can glance it from
        time to to for full information about arrived messages.
        If the only feature you want is the mail reporting functionality,
        you can activate it and disable all other settings with:
            (setq timi-:enter-mail-hook-list nil)  ; Don't activate timi-mode
            (require 'tinymail)
     Setting up report mail notify program
        The `timi-:report-mail-notify-program' feches the Berkeley Mailbox
        formatted information from mailboxes. The default program used
        is from(1), but in case you don't have it, a equivalent command
        "grep '^From ' $MAIL" is used. See also frm(1)
        and nfrm(1) newmail(1) mailfrom(1) if you can use them in your system.
        If you use Gnus and separate spool files, like you do with Procmail,
        then you need to gather all the information from the spool files.
        Let's suppose you don't want to know about mailing list messages,
        but only messages saved to your private and work spool files:
            ~/Mail/spool        or nnmail-procmail-directory
        In that case you have to install custom mail notify program. A
        simple multiple mailbox grep will work here. Note, we also grep
        default MAIL:
            (setq timi-:report-mail-notify-program
                "grep '^From ' %s %s %s "
                (or (getenv "MAIL") (error "No $MAIL defined"))
                (concat (expand-file-name "~/Mail/spool/") "mail.*")
                (concat (expand-file-name "~/Mail/spool/") "work.*")))
        Take a look at variable `timi-:report-spool-buffer-control' which
        has default value 'keep where the `timi-:report-mail-notify-program'
        results are gathered. You may find it usefull to keep the
        `timi-:report-spool-buffer' *timi-mail-spool* visible in some
        distant frame to act like biff(1). From there you can find more
        detailled information of incoming message queue, than the simple
        message count in echo-area or x-dragbar.
        _Note_: XEmacs has package `reportmail.el'. In case that package
        is loaded, the report mail feature here is not installed.

<Prev in Thread] Current Thread [Next in Thread>