[comp.unix.questions] Mail

srini@diablo.amd.com (08/08/89)

 Hello.
 I would like to know if it is possible to filter outa person's
 mail from reaching me keeping all other things intact.
 That is, say, I don't wish to receive the mails from a person
 X. I know X's address. Now how do I see that even if X attempts
 to send me a mail, i don't receive it. Precisely, what I would
 like to do is send it back to person X with a message saying
 "Not received."
 Can anyone help me out with this? 

 Srini.
 =======================================================
 e-mail: amdcad\!diablo\!srini@gatech.edu

Love is the triumph of imagination over intelligence.

boaz@trenco.uucp (Boaz Ben-Zvi) (08/12/89)

In article <26653@amdcad.AMD.COM> srini@diablo.amd.com () writes:
>
> I would like to know if it is possible to filter outa person's
> mail from reaching me keeping all other things intact.
> That is, say, I don't wish to receive the mails from a person
> X. I know X's address. Now how do I see that even if X attempts
> to send me a mail, i don't receive it. Precisely, what I would
> like to do is send it back to person X with a message saying
> "Not received."

The MH (message handling) system comes with a command called   mhook
(MH receive-mail hooks), and you can do "man mhook" to know more.

The idea behind it is setting your .forward file to have the line:
"| <program>"
where <program> is a program to which the incoming mail is streamed via
the standard input. You can try and write your program or use MH's. MH
comes with a program named "slocal" that checks fields (like To:, Cc:)
in the message and decides what to do based on some configuration you
give it.


-- Boaz.


Boaz Ben-Zvi

Boaz.pa@xerox.com
(415) 494-4839

garath@ais.org (Scott Grosch) (01/10/91)

  I use csh, and it seems to not tell me when I have new mail.  It tells me
at login, and when I type "mail", but other than that it never does.  This
is one advantage I see in bash shell, as it notifies me.  Is there a way to have
csh notify?
 


-- 
                               I haven't made a signature yet, any suggestions?

ertle@newton.uvm.edu (Jim Ertle) (01/11/91)

In <V2M+#PD@irie.ais.org> garath@ais.org (Scott Grosch) writes:


>  I use csh, and it seems to not tell me when I have new mail.  It tells me
>at login, and when I type "mail", but other than that it never does.  This
>is one advantage I see in bash shell, as it notifies me.  Is there a way to have
>csh notify?
> 

    I did 'man csh' and found this variable ( set it with set command ).

     mail              A list of files where the C  shell  checks
                       for  mail.  If the first word of the value
                       is a number, it specifies a mail  checking
                       interval in seconds (default 5 minutes).



    This way, when you get mail, csh will tell you the next time you
hit return as the csh prompt.  Also, we have a program called biff
(/usr/ucb/biff) that rings your bell when you get new mail.


				Jim Ertle

stluka@software.org (Fred Stluka) (01/11/91)

In article <V2M+#PD@irie.ais.org> garath@ais.org (Scott Grosch) writes:
> 
>   I use csh, and it seems to not tell me when I have new mail.  It tells me
> at login, and when I type "mail", but other than that it never does.  This
> is one advantage I see in bash shell, as it notifies me.  Is there a way to have
> csh notify?

I use:

	set mail = (1 /usr/spool/mail/$user)

Here is the excerpt from the csh man page from the section 
entitled "PREDEFINED AND ENVIRONMENT VARIABLES":

     mail           Represent the files where the shell checks for mail.  This
                    is done after each command completion that results in a
                    prompt, if a specified interval has elapsed.  The shell
                    will tell you that you have new mail, if the file exists
                    with an access time not greater than its modify time.  If
                    the first word of the value of mail is numeric, it
                    specifies a different mail-checking interval (in seconds)
                    than the default (10 minutes).  If you specify multiple
                    mail files, the shell tells you that you have new mail in
                    name, when there is mail in the file name.

--Fred

Fred Stluka                          Internet: stluka@software.org
Software Productivity Consortium     UUNET:    ...!uunet!software!stluka
2214 Rock Hill Rd, Herndon VA 22070  

sutton@lamar.ColoState.EDU (Richard Sutton) (01/12/91)

In article <J2M+9JD@irie.ais.org> garath@ais.org (Scott Grosch) writes:
>
>-- 
>                               I haven't made a signature yet, any suggestions?


How about: CONSERVE BANDWIDTH!!!!!!!

sutton@lamar.ColoState.EDU (Richard Sutton) (01/12/91)

my apologies, your interim .signature was posted alone prior to your question.
the following is in my .login, hope it helps:

if ( $term == dialup || $term == unknown || $term == network) then
	set noglob
	eval `tset -sQ -m 'dialup:?vt100' -m 'network:?vt100' `
	set glob
	stty -crterase
	stty -tabs
	stty crt
	stty erase '^h'
	stty werase '^?'
	stty new
	set term=$TERM
	if ($?MAIL) then
	    if (-w $MAIL && ! -z $MAIL) echo "You have mail."
endif