mail(1)

 

 

 

mail(1)

-r

Same as +.

 

 

 

 

-ffile

Causes mail to use ®le (for example, mbox) instead of the default mail®le.

 

-t

Causes the outbound message to be preceded by each person the mail is sent to. A

 

person is usually a user name recognized by

login (see login(1)). If a person being

 

sent mail is not recognized, or

if

mail

is interrupted during input, the

®le

 

dead.letter will be saved

to

allow

editing and resending. Note

that

 

dead.letter is regarded as a temporary ®le in that it is recreated every

time

 

needed, erasing the previous contents of dead.letter .

 

-d

Causes mail to deliver mail directly. This isolates mail from making routing deci-

 

sions, and allows it to be used as a local delivery agent. Typically this option is used

 

by auto-routing facilities when they deliver mail locally.

 

When persons are named, mail takes the standard input up to an end-of-®le (or up to a line consisting of just a .) and adds it to each person's mail®le. The message is preceded by the sender's name and a post- mark.

To denote a recipient on a remote system, pre®x person by the system name and exclamation mark (see uucp(1)). Everything after the ®rst exclamation mark in person is interpreted by the remote system. In particular, if person contains additional exclamation marks, it can denote a sequence of machines through which the message is to be sent on the way to its ultimate destination. For example, specifying a!b!cde as a recipient's name causes the message to be sent to user b!cde on system a. System a then interprets that destination as a request to send the message to user cde on system b. This might be useful, for instance, if the sending system can access system a but not system b. mail does not use uucp if the remote system is the local system name (i.e., localsystem!user).

The mailfile can be manipulated in two ways to alter the function of mail. The other permissions of the ®le can be read-write, read-only, or neither read nor write to allow different levels of privacy. If changed to other than the default, the ®le is preserved, even when empty, to perpetuate the desired per- missions. The ®le can also contain the ®rst line:

Forward to person

which causes all mail sent to the owner of the mailfile to be forwarded to person. This is especially useful for forwarding all of a person's mail to a given machine in a multiple-machine environment. In order for forwarding to work properly the mailfile should have "mail" as group ID, and the group permission should be read-write.

rmail only permits the sending of mail. uucp uses rmail as a security precaution.

When a user logs in, the command mail -ecan be used to detect the presence of mail, if any, and so indicate. When terminating, mail produces a noti®cation message if new mail arrived while mail was running.

EXTERNAL INFLUENCES

Environment Variables

LC_TIME determines the format and contents of the displayed date and time strings.

If LC_TIME is not speci®ed in the environment or is set to the empty string, the value of LANG is used as a default for each unspeci®ed or empty variable. If LANG is not speci®ed or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, mail behaves as if all internationalization variables are set to "C". See environ(5).

When set, the TMPDIR environment variable speci®es a directory to be used for temporary ®les, overriding the default directory /tmp.

International Code Set Support

Between HP-UXsystems, single- and multi-byte character code sets are supported within mail text. Headers are restricted to characters from the 7-bit USASCII code set (see ascii(5)).

WARNINGS

Conditions sometimes result in a failure to remove a lock ®le.

After an interrupt, the next message may not be printed. To force printing, type a p.

Lines that look like postmarks in the message (that is, ``From ...'') are preceded by >.

HP-UX Release 11i: December 2000

− 2 −

Section 1491

m