mariou@ut-emx.UUCP (Mariou Barr) (01/12/89)
Is there a way I can keep away from me undesirable mail? I did try putting in my .mailrc: delete baboon@zoo.utexas.edu The result a big naught. The mail goes through anyway. Does anyone have a way of doing this? And would he/she be kind enough to share? With very many thanks -- for any help anyone can give me. Mariou Voulgari Barr e-mail: mariou@walt.cc.utexas.edu
mariou@ut-emx.UUCP (Mariou Barr) (01/14/89)
Very many thanks to all who have responded to my request for help on how to delete unwelcome mail. I will try your suggestions. It is nice to know that there are so many friends out there willing to help. Kind regards -- Mariou Voulgari Barr
gph@hpsemc.HP.COM (Paul Houtz) (01/17/89)
mariou@ut-emx.UUCP (Mariou Barr) writes: >Very many thanks to all who have responded to >my request for help on how to delete >unwelcome mail. I will try your suggestions. >It is nice to know that there are so many >friends out there willing to help. ---------- O.K., Mariou, Since you are so grateful for the help, why don't you post a summary of your responses. I would like to know the answer to your question as well but have seen no reponses on Usenet. Paul Houtz HP Technology Access Center 10670 N. Tantau Avenue Cupertino, Ca 95014 (408) 725-3864 hplabs!hpda!hpsemc!gph gph%hpsemc@hplabs.HP.COM
mariou@ut-emx.UUCP (Mariou Barr) (01/18/89)
In article <810030@hpsemc.HP.COM>, gph@hpsemc.HP.COM (Paul Houtz) writes: > > O.K., Mariou, > > Since you are so grateful for the help, why don't you post a summary > of your responses. I would like to know the answer to your question > as well but have seen no reponses on Usenet. =============================== Yes of course Paul. Here we go. This is kind of long though. I have elimininated the names, because I do not like to disclose peoples' identities without their consent. I hope it is OK. ======= ======= ======= Subject: Re: Undesirable Mail Summary: Baboon extermination In article <9379@ut-emx.UUCP> you write: >Is there a way I can keep away from me >undesirable mail? I did try putting in >my .mailrc: > >delete baboon@zoo.utexas.edu > >The result a big naught. The mail goes through anyway. >Does anyone have a way of doing this? >And would he/she be kind enough to share? That should have worked. Though I've always just used 'd' instead of spelling it out 'delete'. (This shouldn't make a difference.) Though mail is kind of picky about how it recognizes the name. The way the address looks on a 'h' command _should_ work for you. You may have to play with several variations, which you can do at the mail program's command level. When you find the one that mail recognizes, you can put that command in your .mailrc file. & d baboon@zoo.utexas.edu No applicable messages & d !zoo.utexas.edu!baboon 143 messages deleted A friend of mine subscribes to a zillion mailing lists, and uses this in his .mailrc file to pre-sort them all: s sunspots@what.ever sun-mail d sunspots@what.ever -- ============================= To: mariou@ut-emx.UUCP Subject: Re: Undesirable Mail Newsgroups: comp.unix.questions In article <9379@ut-emx.UUCP> you write: > >Is there a way I can keep away from me >undesirable mail? I did try putting in >my .mailrc: > >delete baboon@zoo.utexas.edu > >The result a big naught. The mail goes through anyway. >Does anyone have a way of doing this? >And would he/she be kind enough to share? > >With very many thanks -- for any help anyone >can give me. > >Mariou Voulgari Barr >e-mail: mariou@walt.cc.utexas.edu My suggestion is to return one copy to the sender, and one to the postmaster@senders.site, without reading it (the first two or three with a polite note attached for the benefit of the postmaster). ELM has a nice "F" feature or for just that sort of use.... If the mail persists, try sending 10 copies (+/- however annoying the mail is) :-) This technique is remarkably effective. ============================================= What I describe below works under my system's mailer. I don't know if it will work with yours. If you're unfamiliar with UNIX and something below is confusing, ask me about it. I have .forward in my home directory set up as follows: "| /b/bernsten/.mailserver; exit 0" What my mailer does with this is sends mail originally going to bernsten through the pipe "| /b/bernsten/.mailserver; exit 0" (the exit 0 is so that the mailer doesn't get spurious errors). If I wanted mail also to go to /usr/spool/mail/bernsten, I would include the line \bernsten in .forward; but I have .mailserver do that for me. When the mailer wants to give me mail it obligingly forwards it through .mailserver (which must be exeuctable, as in chmod 700) in my home directory: #!/bin/sh umask 77 cat > /usr/spool/mail/bernsten$$ echo '' >> /usr/spool/mail/bernsten$$ cat /usr/spool/mail/bernsten$$ >> /usr/spool/mail/bernsten cat /usr/spool/mail/bernsten$$ >> /usr/spool/mail/bernsten.log if (grep '^Subject: *!POLL' /usr/spool/mail/bernsten$$) then cat /usr/spool/mail/bernsten$$ >> /usr/spool/mail/bernsten.poll fi rm -f /usr/spool/mail/bernsten$$ (Note that this is not run as root so you can't break into the system this way.) .mailserver runs under sh, removes access by group and others to the files it touches, puts the mail it gets into bernsten$$ (here $$ gives the shell process ID) followed by an extra line (otherwise messages can get stuck together). Then it adds the message to bernsten and bernsten.log; and if the message contains Subject: at the beginning of a line followed by !POLL it dumps the message into bernsten.poll as well. Finally, it removes the temporary file. If you're unfamiliar with shell programming, try the following as a start for .mailserver: #!/bin/sh umask 77 # Put the message into mariou$$. cat > /usr/spool/mail/mariou$$ echo '' >> /usr/spool/mail/mariou$$ # Save the message in mariou.log... you may not want this. cat /usr/spool/mail/mariou$$ >> /usr/spool/mail/mariou # Do we put it into mariou or mariou.ugh? if (grep '^From:' /usr/spool/mail/mariou$$ | grep 'idiot@work.not.edu') then cat /usr/spool/mail/mariou$$ >> /usr/spool/mail/mariou.ugh else cat /usr/spool/mail/mariou$$ >> /usr/spool/mail/mariou fi # Get rid of the temporary file rm -f /usr/spool/mail/mariou$$ If you have lots of people to delete mail from, change the grep 'idiot...' to fgrep -f filewiththeirnames, where the file might be idiot@work.not.edu idiot@home conscience@brain ========================================== } Is there a way I can keep away from me } undesirable mail? I did try putting in } my .mailrc: } } delete baboon@zoo.utexas.edu } } The result a big naught. The mail goes through anyway. } Does anyone have a way of doing this? } And would he/she be kind enough to share? } } With very many thanks -- for any help anyone } can give me. } } Mariou Voulgari Barr } e-mail: mariou@walt.cc.utexas.edu The easiest thing you can probably do is use "mush", the Mail User's Shell, for reading your mail. I obviously don't know whether this program is available on your system, though it is becoming fairly common. If you can wait a few weeks, a new release will soon be appearing on comp.sources.unix. If you are really in a hurry, send mail to the author, island!argv@cad.berkeley.edu (Dan Heller). Mush differs from the standard mail program in a number of ways, but the important one for your problem is that you can tell it to read a start-up script of commands, which can include selecting messages for deletion. So the messages will still get delivered, but you can have mush delete them before you ever see them. Another solution is to use a filtering program called via a ".forward" file. If you have a file named .forward in your home directory, some mail delivery programs (notably sendmail, which is the most common one) will read that file for insturctions on where to deliver your mail. The .forward file can tell sendmail to deliver the mail to a program you have written. The program can do anything you want with the mail, and although most such programs usually finish by saving the mail in your system mailbox, you can certainly have the program throw away mail that you don't want to see. I have written a program called mxp that can be used in this manner from a .forward file, but it is BSD UNIX specific, so if you are using SysV or another OS it won't work. If your system will handle .forward files, and you are interested in my program, let me know and I'll send you a copy. Or you can write your own -- ask somebody there for info about using .forward files. Hope this helps! } Subject: Re: Undesirable Mail My .forward file contains the single line below: "|/ogc/students/schaefer/bin/mxp" Including the quotation marks. This means "pipe the incoming mail to the program mxp found in /ogc/students/schaefer/bin". mxp is the program I mentioned in my last message. You can also put any valid e-mail address in .forward, in which case ALL of your mail will be sent to the forwarding address. Be careful of loops -- that is, don't forward mail to your own address or to any address where there is another .forward file that sends it back to you. ========================================== If you're running a Berkeley sort of Unix, you can set up a filter in your .forward file to scan all your incoming mail and delete the ones you want to. This is even easier if you are running the MH mail system, too. If you're running System V, you probably lose. If the only thing you can modify is your .mailrc, then you definitely lose - /usr/ucb/Mail (or mailx) has no way to do this. ==========================================
mvp@v7fs1.UUCP (Mike Van Pelt) (01/19/89)
In article <9541@ut-emx.UUCP> mariou@ut-emx.UUCP (Mariou Barr) writes: [ Summary of messages on how to delete mail from selected users. One of the messages contains an erroneous statement.] >If the only thing you can modify is your .mailrc, then you definitely >lose - /usr/ucb/Mail (or mailx) has no way to do this. This isn't true. Here are the relevant lines from my .mailrc file, on a Sun. The same thing has worked for me under mailx on SysV. if r s uucp uucp-trash d uucp endif The "if r" around it just prevents me from getting a "You can't save messages when in send mode" diagnostic when I am trying to send mail. This works like a charm for me. I kept getting flooded with worthless nattering from uucp until I did this. Now I just glance at uucp-trash from time to time to see if uucp had anything useful to say to me for a change. -- ...Defending the truth...is not something one | Mike Van Pelt does out of a sense of duty or to allay guilt | Video 7 complexes, but it is a reward in itself. | ..ames!vsi1!v7fs1!mvp -- Dr. Petr Beckmann
mariou@ut-emx.UUCP (mariou barr) (01/20/89)
In article <187@v7fs1.UUCP>, mvp@v7fs1.UUCP (Mike Van Pelt) writes: > In article <9541@ut-emx.UUCP> mariou@ut-emx.UUCP (Mariou Barr) writes: > Text omitted ..Here are the relevant lines from my .mailrc file, on > a Sun. The same thing has worked for me under mailx on SysV. > > if r > s uucp uucp-trash > d uucp > endif > > The "if r" around it just prevents me from getting a "You can't save > messages when in send mode" diagnostic when I am trying to send mail. > > This works like a charm for me. I kept getting flooded with worthless > nattering from uucp until I did this. Now I just glance at uucp-trash > from time to time to see if uucp had anything useful to say to me > for a change. MIKE, MIKE, this works like a charm for me too! I love it. Simple but effective. It really works! Thank you all-- Mariou P.S. never mind about deleting files that contain a ; like mari;ou I figured it out. Cheers
tbetz@spies.UUCP (Tom Betz) (01/27/89)
Quoth mariou@ut-emx.UUCP (Mariou Barr) in <9541@ut-emx.UUCP>: |In article <810030@hpsemc.HP.COM>, gph@hpsemc.HP.COM (Paul Houtz) writes: |> |> O.K., Mariou, |> |> Since you are so grateful for the help, why don't you post a summary |> of your responses. I would like to know the answer to your question |> as well but have seen no reponses on Usenet. | |=============================== | |Yes of course Paul. Here we go. This is kind of long though. |I have elimininated the names, because I do not like to disclose |peoples' identities without their consent. I hope it is OK. [Excellent collection of solutions deleted.] |My suggestion is to return one copy to the sender, and one to the |postmaster@senders.site, without reading it (the first two or three with |a polite note attached for the benefit of the postmaster). ELM has a nice |"F" feature or for just that sort of use.... | |If the mail persists, try sending 10 copies (+/- however annoying the mail |is) :-) | I'd like to use the more polite "auto-delete" technique... but rather than basing it on the sender's ID, I'd want to delete messages with a particular string in the Subject: field. How may I set up Elm to do this? -- "One of these days the Hoover factory | Tom Betz EAA#48267 is gonna be all the rage in those | ZCNY, Yonkers, NY 10701-2509 fashionable pictures." - Elvis |------------------------------ UUCP:tbetz@spies or ...philabs!spies!tbetz | "Empty, try another." - Joni