hoppi@vax1.acs.udel.EDU (David P Hopkins) (05/16/89)
Does anyone know if there is a way to have the computer screen the incoming mail and either delete or send to another file, mail that is from a certain person? I currently have the mhmail command in my login file and i don't want to waste too much time erasing and looking at mail from certain people that send me unwanted mail all the time? Thanx David -- | David Hopkins hoppi@vax1.acs.udel.edu | | TEXAS: Where the men are men and the sheep are nervous. | | the above quote does not, in any way, reflect my views about the stat or | | inhabitants of Texas as i have lived there a number of years myself |
khera@juliet.cs.duke.edu (Vick Khera) (05/17/89)
In article <3634@udccvax1.acs.udel.EDU> hoppi@vax1.acs.udel.EDU (David P Hopkins) writes: >Does anyone know if there is a way to have the computer screen the incoming >mail and either delete or send to another file, mail that is from a certain >person? ... >| David Hopkins hoppi@vax1.acs.udel.edu | try something like the following before you run mhmail: rmm `pick -from person` for each person you wish to have mail killed from. this assumes you are running unix with a shell that allows back-quoting. alternatively, you coud do the following: pick -from person -sequence foo rmm foo to accomplish the same thing. check out the man page on pick. vick. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ARPA: khera@cs.duke.edu Department of Computer Science CSNET: khera@duke Duke University UUCP: {mcnc,decvax}!duke!khera Durham, NC 27706
dce@Solbourne.COM (David Elliott) (05/17/89)
In article <3634@udccvax1.acs.udel.EDU> hoppi@vax1.acs.udel.EDU (David P Hopkins) writes: >Does anyone know if there is a way to have the computer screen the incoming >mail and either delete or send to another file, mail that is from a certain >person? ... See the manual page for mhook. It describes a program called slocal, which can be called from your .forward file (assuming you are running sendmail) and reads a file called ~/.maildelivery to decide what to do. Here is a copy of my old .maildelivery file: # anything from bugent - destroy! From bug destroy A - Subject bugsys: destroy A - # Sources and bugs from the net Subject BUGFROMNET | ? ".bin/put_in_folder +Bugs" Subject SRCFROMNET | ? ".bin/put_in_folder +Sources" # Stuff to root and uucp goes into a file for perusal To root | ? "cat >> xxx" Apparently-To root | ? "cat >> xxx" To uucp | ? "cat >> xxx" Apparently-To uucp | ? "cat >> xxx" The first set of entries tossed out anything from our bug tracking system (I was getting 20-30 messages a day). The second set was used in concert with a set of news commands I had to put sources and bug information in folders. There are easier ways to do this, but I didn't know that at the time. The last set stuck all administrative mail in a file called xxx, which I would read and toss each day. All messages not matching an entry would be appended to my /usr/spool/mail file. This system works fine as long as you don't have system administrators who insist that all uses of .forward will cause mail loops and have automatic .forward removers. -- David Elliott dce@Solbourne.COM ...!{boulder,nbires,sun}!stan!dce