localmail(1M) localmail(1M)
NAME
localmail - look up local mail names
SYNOPSIS
localmail [-p] [-P prefix] [-S suffix] user-name . . .
DESCRIPTION
localmail looks up the given user-names in /etc/passwd and in
/var/mail. If they are not found, then the prefix specified
by the -P option is prepended and the suffix specified by the
-S option is appended to each unknown user-name, which is
written to the standard output as follows:
prefixuser-namesuffix
If user-name is known, it is written to the standard output
with no prefix or suffix. When -p is specified, the original
user-name is printed first.
Files
/etc/mail/mailsurr
/etc/passwd
/usr/lib/mail/surrcmd/localmail
/var/mail
USAGE
This command is intended to be used from the
/etc/mail/mailsurr file. localmail will cause the specified
information to be prepended and/or appended to an unknown
user-name as a means of forwarding mail to another system,
where the user-name may be known.
If you have a flat user name space across multiple machines,
but user names only exist on disjoint machines, this command
can be used to forward any user-name not known locally to the
named system.
Only the output from the last reference to localmail in
/etc/mail/mailsurr will be used.
Examples
In the following example, the user-name bin is known to the
local system but unknown-user is not. The string
@system.domain is specified as the suffix to be appended to
any unknown user-name.
Copyright 1994 Novell, Inc. Page 1
localmail(1M) localmail(1M)
localmail -S @system.domain bin unknown-user
would print
bin
unknown-user@system.domain
If -p is also specified, the original user-name also prints,
as in the following example.
localmail -p -S @system.domain bin unknown-user
would print
bin bin
unknown-user unknown-user@system.domain
REFERENCES
mail(1), mailsurr(4)
Copyright 1994 Novell, Inc. Page 2