*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> mail.local (8)              
Title
Content
Arch
Section
 

MAIL.LOCAL(8)

Contents


NAME    [Toc]    [Back]

     mail.local - store mail in a mailbox

SYNOPSIS    [Toc]    [Back]

     mail.local [-L] [-l] [-f from] user ...

DESCRIPTION    [Toc]    [Back]

     mail.local reads the standard input up to an end-of-file and
appends it
     to  each  user's  mail  file.  The user must be a valid user
name.

     The options are as follows:

     -f from
             Specify the sender's name.

     -l       For  compatibility,  request   that   files   named
username.lock be used
             for locking.  (This is the default behavior.)

     -L       Don't create a username.lock file while locking the
spool.

     Individual mail messages in the mailbox are delimited by  an
empty line
     followed  by  a line beginning with the string ``From ''.  A
line containing
 the string ``From '', the sender's name and a  timestamp
is prepended
     to each delivered mail message.  A blank line is appended to
each message.
  A greater-than character (`>') is  prepended  to  any
line in the
     message  which  could  be mistaken for a ``From '' delimiter
line.

     Significant efforts have been made to ensure that mail.local
acts as securely
  as  possible  if the spool directory is mode 1777 or
755.  The default
 of mode 755 is  more  secure,  but  it  prevents  mail
clients from using
     username.lock style locking.  The use of 1777 is more flexible in an NFS
     shared-spool environment, so many sites use it.  However, it
does carry
     some  risks, such as attackers filling the spool disk.  Some
of these
     problems may be alleviated by making the  spool  a  separate
filesystem, and
     placing  quotas  on it.  The use of any mode other than 1777
and 755 for
     the spool directory is  recommended  against  but  may  work
properly.

     The  mailbox  is  always locked using flock(2) while mail is
appended.  Unless
 the -L flag is specified, a username.lock file is  also
used.

     If  the biff(1) service is returned by getservbyname(3), the
biff server
     is notified of delivered mail.

     The mail.local utility exits 0 on success, and >0 if an  error occurs.

ENVIRONMENT    [Toc]    [Back]

     TZ       Used to set the appropriate time zone on the timestamp.

FILES    [Toc]    [Back]

     /tmp/local.XXXXXXXXXX  temporary files
     /var/mail/user         user's mailbox directory

SEE ALSO    [Toc]    [Back]

      
      
     biff(1),  mail(1),  flock(2),  getservbyname(3),  comsat(8),
sendmail(8)

HISTORY    [Toc]    [Back]

     A  superset  of mail.local (handling mailbox reading as well
as mail delivery)
 appeared in Version 7 AT&T UNIX as the program mail(1).

BUGS    [Toc]    [Back]

     Since  sendmail(8)  bases  its idea of whether a message has
been delivered
     or not on the return value from mail.local, using quotas  in
/var/mail can
     be problematic.  By default, sendmail(8) will ask mail.local
to deliver a
     message to multiple recipients  if  possible.   This  causes
problems in a
     quota  environment  since a message may be delivered to some
users but not
     others due to disk quotas.  Even though the message was  delivered to some
     of  the recipients, mail.local will exit with an exit code >
0, causing
     sendmail(8) to attempt redelivery later.   That  means  that
some users will
     keep  getting  the  same message every time sendmail(8) runs
its queue.

     If you are running with disk quotas on /var/mail it  is  imperative that
     you  unset the ``m'' mailer flag for the `local' mailer.  To
do this, locate
    the    line    beginning    with    ``Mlocal''    in
/etc/mail/sendmail.cf and remove
  the  ``m''  from the flags section, denoted by ``F=''.
Alternately,
     you can override the default  mailer  flags  by  adding  the
line:

           define(`LOCAL_MAILER_FLAGS', `rn9S')dnl

     to  your  ``.mc'' file (this is the source file that is used
to generate
     /etc/mail/sendmail.cf).

OpenBSD     3.6                          April      27,      1991
[ Back ]
 Similar pages
Name OS Title
readmail HP-UX read mail from a mail folder or incoming mailbox
deliver Tru64 Delivers mail to an IMAP mailbox
prmail HP-UX print out mail in the incoming mailbox file
xbiff IRIX mailbox flag for X
xbiff Tru64 mailbox flag for X
mail HP-UX send mail to users or read mail
rmail HP-UX send mail to users or read mail
mail_att IRIX send mail to users or read mail
lockspool OpenBSD lock user's system mailbox
susword NetBSD store data
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service