TZ
Used to set the appropriate time zone on the timestamp.
Store mail in a mailbox
mail.local [-Ll]
[-f
from]
user ...
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
Don't create a username.lock file while locking the spool.
-l
For compatibility, request that files named username.lock be used for locking. (This is the default behavior.)
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 effort has been made to ensure that mail.local acts as securely as possible. It will only deliver to a mail spool directory that is not world-writable. The default mode of /var/mail on OpenBSD is 755, which prevents non-root processes from creating mail spool files. The MTA is expected to either create the mail spool file itself, or call mail.local as root.
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.
TZ
Used to set the appropriate time zone on the timestamp.
/tmp/local.XXXXXXXXXX
temporary files
/var/mail/user
user's mailbox directory
The mail.local utility exits 0 on success, and >0 if an error occurs.
61 releases since OpenBSD 2.1; the text changed 19 times.
-H until OpenBSD 2.3.