1 09/05/87  accept_messages, am
  2 
  3 Syntax as a command:  am {mbx_specification} {-control_args}
  4 
  5 
  6 Function: initializes or reinitializes your process both for accepting
  7 messages that are sent by send_message and for notifications.
  8 
  9 
 10 Arguments:
 11 mbx_specification
 12    specifies the mailbox on which messages are to be accepted.  If not
 13    given, the user's default mailbox (>udd>Project>Person>Person.mbx)
 14    is used.
 15 
 16 
 17 List of mbx specifications:
 18 -log
 19    specifies the user's logbox and is equivalent to
 20       -mailbox >udd>Project_id>Person_id>Person_id.sv.mbx
 21 -mailbox path, -mbx path
 22    specifies the pathname of a mailbox.  The suffix .mbx is added if
 23    necessary.
 24 -save path, -sv path
 25    specifies the pathname of a savebox.  The suffix .sv.mbx is added if
 26    necessary.
 27 
 28 
 29 -user STR
 30    specifies either a user's default mailbox or an entry in the system
 31    mail table.
 32 STR
 33    is any noncontrol argument, and is first interpreted as -mailbox
 34    STR; if no mailbox is found, STR is then interpreted as -save STR;
 35    if no savebox is found, it is interpreted as -user STR.
 36 
 37 
 38 Control arguments:
 39 -brief, -bf
 40    prevents accept_messages from informing you that it is creating a
 41    mailbox, and prints messages in short format.
 42 -call {cmdline}
 43    when the message is received, instead of printing it in the default
 44    format, accept_messages calls the command processor with a string of
 45    the form
 46       cmdline number sender time message {path}
 47    where:
 48    cmdline
 49       is any Multics command line; enclose it in quotes if it contains
 50       blanks or other command language characters.
 51 
 52 
 53    number
 54       is the sequence number of the message, assigned when you use
 55       -hold_messages; otherwise it is 0.
 56    sender
 57       is the User_id of the person who sent the message.
 58    time
 59       is the date-time the message was sent.
 60    message
 61       is the message sent.
 62    path
 63       is the pathname of the mailbox to which the message was sent.  If
 64       the message was sent to the default mailbox, path is omitted.
 65    To suppress a previous -call, give -call with no cmdline argument.
 66 
 67 
 68 -flush DT
 69    discards messages sent before the specified date-time (see
 70    time_strings.gi for valid DT values).  This control argument should
 71    be used by operators and consultants.
 72 -hold_messages, -hdmsg
 73    holds messages until explicitly deleted by delete_message.  Messages
 74    printed when -hold_messages is in effect are preceded by an
 75    identifying number.
 76 -hold_notifications, -hdnt
 77    holds notifications in the mailbox after being printed.  This
 78    implies -notifications.
 79 -long, -lg
 80    precedes every message printed by the sender's Person_id and
 81    Project_id and prints the date-time string.  It prints the message
 82    number only if you use -hold_messages.  (Default)
 83 
 84 
 85 -no_hold_messages, -nhdmsg
 86    reverts -hold_messages.
 87 -no_hold_notifications, -nhdnt
 88    deletes notifications after being printed.  (Default)
 89 -no_notifications, -nnt
 90    deletes notifications as they are received.  This implies
 91    -no_hold_notifications.
 92 -no_print, -npr
 93    does not print old messages.  (Default)
 94 -no_short_prefix, -nshpfx
 95    does not print the prefix when messages are printed in short format.
 96 -notifications, -nt
 97    prints notifications.  (Default)
 98 
 99 
100 -prefix STR, -pfx STR
101    places STR in front of all messages printed as they are received.
102    STR can be up to 12 characters long, and can contain the ioa_
103    control strings ^/, ^|, and ^- if desired.
104 -print, -pr
105    prints all messages that you received since the last time you were
106    accepting messages.  The messages are deleted after printing, unless
107    you are holding them.
108 -short, -sh
109    precedes consecutive messages from the same sender by "=" instead of
110    the Person_id and Project_id, and prints the date-time string only
111    if less than five minutes have passed since the previous message.
112    It omits the date if the current message and the previous one are
113    received on the same date.
114 
115 
116 -short_prefix, -shpfx
117    prints the prefix when messages are printed in short format.
118    (Default)
119 -time N, -tm N
120    prints undeleted messages every N minutes, preceded by a message of
121    the form
122       You have X messages
123    where X is the number of undeleted messages.  If N equals 0, the
124    time mode is reset.
125 
126 
127 Notes: A default mailbox is created the first time you issue
128 print_mail, read_mail, or accept_messages.  The default mailbox is
129    >udd>Project_id>Person_id>Person_id.mbx
130 
131 Messages sent when you are not logged in or when you are deferring
132 messages (see defer_messages) are saved in the mailbox; you can read
133 them later with print_messages.  The send_mail command stores mail in
134 the same mailbox.
135 
136 Don't share the same mailbox with others.
137 
138 
139 At any time, only one process can be accepting messages from a given
140 mailbox.  If you create two processes that accept messages from the
141 same mailbox, the second process (i.e., the one issuing an
142 accept_messages most recently) automatically take over the command
143 function.  The first process receives no indication that messages are
144 being routed to the second process.  If the second process logs out or
145 is destroyed, the messages do not revert to an earlier process; thus if
146 you send a message to that mailbox, you are informed that the addressee
147 is currently not accepting messages or is not logged in.  So if you are
148 registered on multiple projects using a common mailbox, be aware that
149 this behavior affects your processes.
150 
151 Generally don't accept messages in absentee processes; the start_up.ec
152 should distinguish between interactive and absentee processes, and
153 should issue accept_messages only in an interactive process.
154 
155 
156 You can accept messages on more than one mailbox at a time and on a
157 mailbox other than the default.  If you use a nondefault mailbox and it
158 does not exist, accept_messages queries you whether it should be
159 created.  When messages are printed from a nondefault mailbox, the
160 mailbox is always identified.