rcvfile(C)


rcvfile -- put message into named file

Syntax

/usr/bin/rcvfile directory [ -llogfile ] [ -m ]

Description

The rcvfile program is intended to be invoked from your $HOME/.maildelivery file. This command examines the ``Subject:'' field of a mail message and stores the message in a file if the rcvfile keyword is the first word in the ``Subject:'' line. The rcvfile command can be invoked manually if desired, and a mail message piped into the command.

To have mail filed by rcvfile, format the ``Subject:'' line as follows:

   Subject: rcvfile output-filename
The destination file name is created by concatenation of the directory argument, a slash (/), and the filename given in the subject field after the rcvfile keyword. The filename from the subject field is not allowed to contain any ``..'' directory components. If any are found, rcvfile quits. When a message is stored, the message headers are removed and only the text is stored in the specified file.

The directory argument is required. The -l option sets the logfile where a record of rcvfile activity is made. The file must already exist and be writable by the recipient. The -m option enables the creation of missing directories in the pathname of a file to be created. The created directories are given permission modes of 0755.

The owner of the created file is notified by mail when a file is delivered, with information about who sent it and other relevant facts. It is possible that the owner may not be the recipient if the referenced file existed, was owned by another user, and was writable. If the file delivery fails for any reason, the message is delivered as normal mail.

Examples

A typical entry in your .maildelivery can be:
   subject    rcvfile      pipe    A    rcvfile
or
   Addr       user=file    pipe    A    rcvfile

Specify the full pathname of rcvfile if /usr/bin is not in your search path.

Files

$HOME/.maildelivery

See also

maildelivery(F)

Standards conformance

This utility was written by David H. Crocker.

MMDF is not part of any currently supported standard; it was developed at the University of Delaware and is used with permission.


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005