Path: utzoo!utgpu!attcan!uunet!husc6!bbn!gateway!PIZZA.BBN.COM!jr From: jr@PIZZA.BBN.COM (John Robinson) Newsgroups: comp.emacs Subject: Re: An rmail question. Message-ID: <22198.593444986@pizza> Date: 21 Oct 88 13:49:46 GMT References: Sender: news@bbn.COM Reply-To: jr@bbn.com Organization: BBN news/mail gateway Lines: 24 > So, I would like to filter my mail in a different manner. Since I use > rmail inside of GNU Emacs, it seems to me that it would be nice if the > 'rmail-get-new-mail' function could optionally filter the messages as > it takes them from my system mailbox and writes them into my RMAIL > mailbox. Some sort of hook could be used for this, I presume. If you trace the operation of rmail-get-new-mail, youi will find that it eventually executes: (call-process (expand-file-name "movemail" exec-directory) nil errors nil file tofile) whic, briefly, calls .../emacs/etc/movemail on the (each) file that represents your maildrop. You could achieve whatever filtering you want by (1) replacing movemail with a shell script that optionally (perhaps conditoned on an env variable) applies filtering to the file, or (2) changing exec-directory to point to a directory that contains a private version of movemail for your purposes, or by (3) rewriting the lisp function I pulled this from in rmail.el. The source for movemail is in .../etc/. /jr jr@bbn.com or bbn!jr