DELIVERMAIL(8) GENIX Programmer's Manual DELIVERMAIL(8)
NAME
delivermail - deliver mail to arbitrary people
SYNOPSIS
/etc/delivermail [ -[fr] address ] [ -a ] [ -ex ] [ -n ] [ -m ] [ -s
] [ -i ] [ -h N ] address ...
DESCRIPTION
Delivermail delivers a letter to one or more people, routing the
letter over whatever networks are necessary. Delivermail will do
inter-net forwarding as necessary to deliver the mail to the correct
place.
Delivermail is not intended as a user interface routine; it is
expected that other programs will provide user-friendly front ends,
and delivermail will be used only to deliver pre-formatted messages.
Delivermail reads its standard input up to a control-D or a line
with a single dot and sends a copy of the letter found there to all
of the addresses listed. If the -i flag is given, single dots are
ignored. It determines the network to use based on the syntax of
the addresses. Addresses containing the character `@' or the word
"at" are sent to the ARPANET; addresses containing `!' are sent to
the UUCP net, and addresses containing `:' or `.' are sent to the
Berkeley network. Other addresses are assumed to be local.
Local addresses are looked up in a file constructed by newaliases(1)
from the data file /usr/lib/aliases and aliased appropriately.
Aliasing can be prevented by preceding the address with a backslash
or using the -n flag. Normally the sender is not included in any
alias expansions, e.g., if `john' sends to `group', and `group'
includes `john' in the expansion, then the letter will not be
delivered to `john'. The -m flag disables this suppression.
Delivermail computes the person sending the mail by looking at your
login name. The "from" person can be explicitly specified by using
the -f flag; or, if the -a flag is given, delivermail looks in the
body of the message for a "From:" or "Sender:" field in ARPANET for-
mat. The -f and -a flags can be used only by the special users root
and network, or if the person you are trying to become is the same
as the person you are. The -r flag is entirely equivalent to the -f
flag; it is provided for ease of interface only.
The -ex flag controls the disposition of error output, as follows:
e Print errors on the standard output, and echo a copy of the mes-
sage when done. It is assumed that a network server will return
the message back to the user.
m Mail errors back to the user.
p Print errors on the standard output.
Printed 8/12/83 1
DELIVERMAIL(8) GENIX Programmer's Manual DELIVERMAIL(8)
q Throw errors away; only exit status is returned.
w Write errors back to the user's terminal, but only if the user is
still logged in and write permission is enabled; otherwise errors
are mailed back.
If the error is not mailed back, and if the mail originated on the
machine where the error occurred, the letter is appended to the file
dead.letter in the sender's home directory.
If the first character of the user name is a vertical bar, the rest
of the user name is used as the name of a program to pipe the mail
to. It may be necessary to quote the name of the user to keep
delivermail from suppressing the blanks from between arguments.
The message is normally edited to eliminate "From" lines that might
confuse other mailers. In particular, "From" lines in the header
are deleted, and "From" lines in the body are prepended by `>'. The
-s flag saves "From" lines in the header.
The -h flag gives a "hop-count", i.e., a measure of how many times
this message has been processed by delivermail (presumably on dif-
ferent machines). Each time delivermail processes a message, it
increases the hop-count by one; if it exceeds 30 delivermail assumes
that an alias loop has occurred and it aborts the message. The
hop-count defaults to zero.
Delivermail returns an exit status describing what it did. The
codes are defined in <sysexits.h>
EX_OK Successful completion on all addresses.
EX_NOUSER User name not recognized.
EX_UNAVAILABLE Catchall meaning necessary resources were not
available.
EX_SYNTAX Syntax error in address.
EX_SOFTWARE Internal software error, including bad argu-
ments.
EX_OSERR Temporary operating system error, such as "can-
not fork".
EX_NOHOST Host name not recognized.
FILES
/usr/lib/aliases raw data for alias names
/usr/lib/aliases.dir data base of alias names
/usr/lib/aliases.pag
/bin/mail to deliver uucp mail
/usr/net/bin/v6mail to deliver local mail
/usr/net/bin/sendmail to deliver Berknet mail
/usr/lib/mailers/arpa to deliver ARPANET mail
/tmp/mail* temp file
/tmp/xscript* saved transcript
Printed 8/12/83 2
DELIVERMAIL(8) GENIX Programmer's Manual DELIVERMAIL(8)
SEE ALSO
binmail(1), mail(1), newaliases(1), aliases(5)
BUGS
Delivermail sends one copy of the letter to each user; it should
send one copy of the letter to each host and distribute to multiple
users there whenever possible.
Delivermail assumes the addresses can be represented as one word.
This is incorrect according to the ARPANET mail protocol RFC 733
(NIC 41952), but is consistent with the real world.
Printed 8/12/83 3