The message selection criteria used by slocal is specified in the file .maildelivery in the user's home directory. The format of this file is given on the maildelivery(4) manual page.
The message delivery address and message sender are determined from the MTA envelope information, if possible. Under sendmail(1M), the sender is obtained from the UUCP ``From'' line, if present. The user can override these values with command-line arguments or arguments to the -addr and -sender switches.
The message is normally read from the standard input. The -file option sets the name of the file from which the message should be read, instead of reading stdin. The -user option tells slocal the name of the user for whom it is delivering mail. The -mailbox option tells slocal the name of the user's maildrop file.
The -info option can be used to pass an arbitrary argument to subprocesses that slocal invoke on your behalf. The -verbose option causes slocal to give information to stdout about its progress. The -debug option produces more verbose debugging output on stderr.
slocal is the default local mail delivery agent.
Normally, only the maildelivery file needs to be
altered to enable slocal processing. If, for some
reason, this has changed and you want to use slocal,
include the following line
in your .forward file in your home directory:
/etc/mail/slocal -user username
The exit status of the process is consulted in determining the success of the action. An exit status of zero means the action succeeded. Any other exit status (or abnormal termination) means the action failed.
To avoid any time limitations, you can implement a process that begins by forking. The parent returns the appropriate value immediately, and the child continues doing whatever it wants for as long as it wants. This approach is somewhat risky if the parent returns an exit status of zero. If the parent returns a non-zero exit status, this approach can lead to quicker delivery into your maildrop.