|MAIL.LOCAL(8)||System Manager's Manual||MAIL.LOCAL(8)|
] user ...
mail.localreads 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:
>’) 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.localacts 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
-Lflag 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.
mail.localutility exits 0 on success, and >0 if an error occurs. biff(1), mail(1), flock(2), getservbyname(3), comsat(8), smtpd(8)
mail.local(handling mailbox reading as well as mail delivery) appeared in Version 7 AT&T UNIX as the program mail(1). /var/mail can be problematic if using sendmail(8) as an MTA, since it asks
mail.localto 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.localwill 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. This problem does not exist for smtpd(8) users. If you are running sendmail(8) and have 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:
|September 16, 2014||OpenBSD-current|