The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to forward mail in /var/mail/username to external mail unitipon SUN Solaris 2 05-26-2008 09:20 PM
Pull E-mail address from file, send e-mail DC Heard Shell Programming and Scripting 1 01-28-2008 11:23 PM
I am not able to send mail form unix to other mail accounts. chinnigd UNIX for Dummies Questions & Answers 1 04-06-2006 05:31 AM
e-mail client supporting HTTP mail servers babayeve UNIX for Dummies Questions & Answers 0 05-21-2005 12:10 AM
can not send mail from unix server to company/yahoo mail b5fnpct UNIX for Dummies Questions & Answers 5 11-22-2002 06:24 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-11-2001
Registered User
 

Join Date: May 2001
Location: italy
Posts: 3
Unhappy

as I can create a job that the mail checks me that arrives and it creates me a new file with the new mail.
I want create a shell. But i don't know well Unix.
thanks
max

[Edited by mmistero on 05-11-2001 at 10:13 AM]
__________________
mistero
Forum Sponsor
  #2  
Old 05-11-2001
mib mib is offline
Registered User
 

Join Date: Jan 2001
Location: Calicut
Posts: 228
If you are using bash you don't need a outside script. You can set the env var "MAILPATH".

Quote:
From the bash man:
MAILPATH
A colon-separated list of file names to be checked for mail. The message to be printed when mail arrives in a particular file may be specified by separating the file name from the message with a `?'. When used in the text of the message, $_ expands to the name of the current mailfile. Example: MAILPATH='/usr/spool/mail/bfox?"You have mail":~/shell-mail?"$_ has mail!"' Bash supplies a default value for this variable, but the location of the user mail files that it uses is system dependent (e.g., /usr/spool/mail/$USER).

For each user you can do something like:
export MAILPATH="${HOME}/Mailbox?New mail has arrvied in \$_"

You can also set the env var MAILCHECK to the number of seconds between mail checks.

MAILCHECK
Specifies how often (in seconds) bash checks for mail. The default is 60 seconds. When it is time to check for mail, the shell does so before displaying the primary prompt. If this variable is unset, the shell disables mail checking.

HTH
  #3  
Old 05-11-2001
Registered User
 

Join Date: May 2001
Location: italy
Posts: 3
Unhappy I am not very good in Unix

You could write the code of the shell that I have to create for saving me the new mails in new lines to me
__________________
mistero
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0