|fred||Sends to user "fred" on the same machine.|
|fredbitty.box||Sends to fred on the machine "bitty.box".|
|fred:tty00||Sends to fred on terminal tty00.|
|:allbitty.box||Sends to all terminals on bitty.box.|
|@bitty.box||Sends to the console at bitty.box.|
Strictly speaking, the form of the recipient string is:
If either the user or the tty is omitted the program will attempt to match on the other. If both are omitted the message will be sent to the console or some other default destination. If the tty is given as "all" the message will be sent to all of users logins. If user isnt specified it will be sent to all users on the machine.
If the host is not specified, the message will be delivered to the local host. Otherwise it will be sent to the specified machine. This field is ignored if the -b flag is given.
msend [-t] [-g] [-b] [-v] [-rN] [-pN] [-d] recipient [message]
This form is used to send messages. A message may either be given on the command line or if omitted there will be taken from standard input.
Display the last N messages. This is particularly useful if a message was lost from your screen before you had a chance to read it. Usually only a maximum of twenty messages are kept between logins. Regular cleanups will delete old messages as well.
Check unread messages. If a message is sent to a user who is not logged on it will be stored in their save file and marked as unread. Placing an msend -c command in your .login file will inform you of any unread messages when you log in next. The program will return 0 if there are messages or 1 if there are none.
Display unread messages. This will display all messages received while you were incommunicado.
Shorten your buffer of old messages. The number of messages left in your buffer is reduced to at most N. You may want to put this in your .logout file to prevent keeping ancient messages. If neither this function nor msend -e is ever executed the message buffer will grow forever, which is considered a Bad Thing.
Expire old messages. This goes through all the users on the system and reduces the maximum number of saved messages to N. The default is twenty. Only the system administrator can run this function. Often this is run as a daily cron(8) job.
-t This enables the use of TCP (stream) connections rather than datagrams. Using streams connections means that messages will have no size limit and will be reliable over bad network connections. On the other hand transmission is a little more inefficient and takes longer. -g Enables UDP (datagram) transmission. This is the default. Datagram connections are slightly faster but are less reliable on unreliable network links. They are also limited to 64k in size. -b Switches to broadcast transmission. This will cause the message to be seen by all machines on the local network. If none of the machines is able to deliver it directly to the destination the attempt will timeout and you will receive a "Message unacknowledged - may not have been received" error. Broadcast messages are also limited to 1k. -v Turns on verbose mode. This tells you various details of the progress of transmission. -rN Selects a number of retransmission attempts. The default is four. The first retransmission occurs after three seconds. This period between retransmissions increases by two seconds each time. -pN Sets the internet port number to use. Normally the default port will be used. -d Turns on debugging mode. This will display a lot of boring information.
MSENDOPTS used to set default switches
~/.message store of old or unread messages
/var/message/$USERalternative location for messages
~/.msgsig signature to add to messages
Geoff Arnold <geoff@tyger.East.Sun.COM> wrote the core.
Andrew Herbert <email@example.com> cleaned it up a bit.
Zik Saleeba <firstname.lastname@example.org> did many extensions and rewrites.
Michael Strates <email@example.com> has taken over the project to hopefully keep continuing it.