faqts : Computers : Internet : Mail Servers : qmail : Installation and Configuration

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

14 of 16 people (88%) answered Yes
Recently 2 of 3 people (67%) answered Yes

Entry

How can I streamline the process for adding symbolic links to Maildir with new users?

Feb 29th, 2000 19:04
Nathan Wallace, Keith Warno


Hmmm.. shell script front-end that does useradd tricks and -- somewhere
in the script -- does the symlink trick you need as well.

However....  If your users are using bash you can set the env var
MAILPATH.  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.  Exam­
              ple:
              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  dis­
              playing  the  primary  prompt.  If this variable is
              unset, the shell disables mail checking.