[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Changing the mail spoolfile



mdevin <mdevin@ozemail.com.au> writes:

> I have changed where procmail puts mail for each user with the following
> settings in /etc/procmailrc:
> PATH=/bin:/usr/bin:/usr/local/bin
> MAILDIR=$HOME/mail   # all mailboxes are in mail/
> DEFAULT=$MAILDIR/inbox
> LOGFILE=/dev/null
> SHELL=/bin/sh
> 
> So now the spoolfile for each user is in $HOME/mail/inbox.
> 
> How do I change the environment variable so that they are referring to
> the same location.  Currently it still looks at /var/mail/$username
> 
> Note, I don't need help with how to tell mutt where to look.  This is
> not a problem - I have this configured.  Everything works OK, mail is
> delivered how I want it and I can read it all fine.
> 
> It is just that since I change the spoolfile in procmail, the shell
> no longer tells me when I have new mail at login time.  I know I just
> have to change some setting in the shell environment to tell it where
> the spoolfile is.
> 
> I have done google searches, and checked all the .bashrc, .bash_profile
> files I can find with no mention of a spoolfile variable.
> 
> Should I change things back so that the spoolfile is in the default
> location?

Setting the MAIL variable should do what you want.  Here's an excerpt
from 

http://www.math.fu-berlin.de/~guckes/elm/mail.notification.html

 MAIL
 If this parameter is set to a filename and the MAILPATH variable is not set,
 bash informs the user of the arrival of mail in the specified file.

 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
 prompting. If this variable is unset, the shell disables mail checking.

 MAILPATH
 A colon-separated list of pathnames to be checked for mail. The message to
 be printed may be speci? fied by separating the pathname from the message
 with a `?'. $_ stands for 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).

 MAIL_WARNING
 If set, and a file that bash is checking for mail has been
 accessed since the last time it was checked, the message
 ``The mail in mailfile has been read'' is printed.


-- 
Brian Nelson <nelson@bignachos.com>
BigNachos@jabber.org
http://bignachos.com



Reply to: