Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!RODAN.ACS.SYR.EDU!jdpeek From: jdpeek@RODAN.ACS.SYR.EDU (Jerry Peek) Newsgroups: comp.mail.mh Subject: Re: Message sorting into folders when doing inc Message-ID: <8905191215.AA05445@rodan.acs.syr.edu> Date: 19 May 89 13:15:14 GMT References: <8905191059.AA14214@garm> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 41 > This is a beginners question on using MH. I have read the documentation, > but have not found what I was looking for. I have also read the > comp.mail.mh newsgroup for a while, with same result (unfortunately, I am > currently unable to post to that newsgroup). You just did. If you post to this mailing list, it's sent to the newsgroup (but messages posted directly to the newsgroup do NOT show up on this list...) > What I am looking for, is a way to tell 'inc' to sort individual messages > into their respective folders based on criteria a'la pick, instead of > lumping them all into +inbox. I have a shell script called "inc_split" that can be hacked to do what you want. I wrote it to run unattended, once a day or so, on a "housekeeping" account that gets log and error messages in the mail. The script refiles messages from certain addresses, and leaves the rest in the inbox folder. It sends mail to the gurus and shows them what's in the inbox. You'd probably need to hack on it some. I'd be glad to send you a copy. Maybe this is enough to help you, though: The script uses the feature called "Unseen-sequence" to decide which mail in the inbox hasn't been touched. To use this, put a line in your .mh_profile that says: Unseen-sequence: unseen When "inc" runs, it puts a list of the unread messages in a sequence called "unseen". You can use this sequence with the "pick" command, like this: pick unseen -from fred -seq temp This command tells "pick" to look through the list of unseen messages -- and put a list of all the messages from "fred" in another sequence called "temp". Then, you can use this sequence with a command like refile: refile temp +somefolder or in a Unix shell script, to do something else: dosomething `mhpath temp` Hope that helps. > Haavard Eidnes, Division of Computer Systems and Telematics > he@idt.unit.no Norwegian Institute of Technology --Jerry Peek; Syracuse University Academic Computing Services; Syracuse, NY jdpeek@rodan.acs.syr.edu, jdpeek@suvm.bitnet +1 315 443-3995