Mercurial > hg > Members > kono > nitros9-code
view 3rdparty/packages/uucpbb/doc/mailx.man @ 2855:e126b9acab32 lwtools-port
rules.mak: Do not hardcode path for "echo"
It is basically the only tool with full path here and I don't see any
reason for it. We don't use special echo options that would fail
on the shell built-in echo.
Also don't hardcode path for losetup. sudo should make sure you
have the relevant location in your path, and that the path is sanitized,
otherwise your sudo setup is broken.
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Sat, 13 Jul 2013 11:30:31 +0200 |
parents | e9380475f28e |
children |
line wrap: on
line source
MAILX UUCP MAILX PROGRAM mailx CALLING SEQUENCE: mailx [-r] ...read mail opt: r - read mail in reverse order mailx [opts] [address <address...>] [opts] ...send mail opts: a <file> - file replying to s "subject" - Subject: "subject" x N - N = debug level d - don't add signature n - use alt_signature p - don't prompt for carbon copy (cc:) ? - this message v - toggle file viewer...default is OFF c [<user>...] - check for waiting mail and that 'user' On the CoCo only using Shell+, non-superusers need to use '*' instead of '@' in command line addresses. SUMMARY: Send and receive electronic mail DESCRIPTION: SENDING MAIL Mail may be sent one of two ways, either entering it directly on the keyboard, or the input can be redirected from a file. The recipient may be on this this system, on one or more remote UUCP nodes, or both. The commands will be discussed in general first and in more detail later. To send mail with input coming from keyboard, the general command is: mailx [opts] <uucp_address> MAILX UUCP MAILX To send a file, the command is: mailx [opts] <uucp_address> < filename or echo test message ! mailx [opts] <uucp_address> where 'filename' is the pathname of the desired file, 'opts' are one or more optional command line arguments, and 'uucp_address' is a user name or address which can take any of the forms described next. The last example shows piping text to mailx. The address on a command line can take different three different forms, for example: mailx rick Sends mail to 'rick'. 'rick' may be either an alias (see ALIASES.DOC) or the name of a user on the local system. mailx "apple!fico!central!rickadams" Sends mail to the user "rickadams" using the "bang" (!) path given. --NOTE--: On the CoCo, the double quotes are necessary to prevent Shell from trying to interpret the bang as a pipe character. Under OSK, a different means of quoting the '!' may be needed. Some shells use a backslash () to quote a character, e.g. mailx apple!fico!ccentral!rickadams. Check in the docs for the shell you are using under OSK. mailx user@node -- or -- mailx user*node The first address is given is a domain address. The second form is NOT a valid domain address. However, for CoCos using Shell+ v2.1, the second form is necessary for any user who is NOT the superuser. A security feature in Shell+ strips the "@" from any command line arguments of non-superusers before they are processed. To get around the problem, Mailx will treat a '*' internally the same as as the "@". There is a patch included in the original Shell+ archive which lets you turn off the "@" check. If you have turned it off all users can use the properly first form. The second address form should not be needed under OSK. This depends on how the OSK shell treats the '@' character. mailx @filename -- or -- mailx *filename This form tells mailx to look in the directory UUCP in the user's home directory for a file called 'filename'. The contents of the file will be interpreted as a mailing list. Mailx assumes the file is a list of user names, aliaes or UUCP addresses, one per line. The message will be sent to each address. As mentioned above, the "*" form is for non-superusers using Shell+ on the CoCo. MAILX UUCP MAILX Mailx is also smart enough to understand the Internet '%'. For example: mailx joe%sandstorm.uucp@gigsys This will send mail to user 'joe' at sandstorm. The message will be routed via gigsys. In order for this to work properly, users of Shell+ v2.1 must turn off the shell variable expansion. This is done by: OS9> -v Or it can be done in the user's password entry file as in this example: bob,000000,0,128,/dd/cmds,/dd/usr/bob,ex shell -v If the shell variable expansion is not turned off, Shell+ will try to interpret the '%' as a shell variable and remove it from uucp_address. There is a special case local user name 'daemon'. The UUSETUP program creates an entry for this user ID in the password file. Any mail sent from this user ID will have a special header with a 'Reply-To: postmaster@<this_system>' address. There is also a special user name 'nobody' recognized by RMAIL. Mail sent to user 'nobody' will be sent to RMAIL's bit bucket. Next, Mailx tries to open the file 'aliases' ('.aliases' under OSK). If the file exists, Mailx attempts match each uucp_address with an alias address. If a match is found, uucp_address is replaced with the appropriate address. (See ALIASES.DOC for more details on the aliases file.) Thus you can send mail to: mailx fred barney mary where 'fred', 'barney' and 'mary' are aliases for longer uucp paths. If no matching alias is found or the aliases file cannot be read, the addresses remain unchanged. In the example above, Mailx would assume these are names of users on the system. Mail aliases, uucp addresses and mailing lists may be mixed freely on the command line. This lets you send a single message to mutilple recipients. For example: mailx fred "wingding!evil!purple!barney" @mail.list When mail is sent from the keyboard, you will be prompted for a "Subject:" line. If no "Subject:" line is desired, hit ENTER to skip this line. Mailx reads the files /DD/SYS/UUCP/parameters and mailrc (.mailrc under OSK) file in your home directory to get the default parameters. (See PARAMETERS.DOC, PARAMETERS.EXAMPLE and MAILX UUCP MAILX MAILRC.DOC for information on the format of these files.) If 'mailrc' is set to prompt for carbon copy (Cc:), Mailx will show the line 'Cc:'. One or more names, uucp_addresses, or aliases separated by a space can be entered. A copy of the message will be sent to each address as well as those given on the command line. If you don't desire to send a copy of the message, just hit ENTER. Mailx will now allow you to compose your message. First, a bit of advice. UUCP is text based system. Because are there are many different types of terminals which are used to read UUCP mail on, it is poor practice to include graphics or control characters or binary files in the message text and certainly NEVER in the message headers. Graphics and control characters may do nice, fancy things on your terminal; however, the things they do to the receiver's terminal may not be so nice or fancy. At the very least, you may make your mail unreadable at the receiving end. Binary files can be included in mail after running them through a binary to text encoding program such as UUENCODE or CUTS. UUENCODE is a standard UUCP encoding utility. CUTS was written for the CoCo and unlikely to be found on other UUCP systems. Secondly, it is good practice to limit line lengths to less than 80 characters. Each line should end of a carriage return. You can not assume that the receiver's terminal will properly handle excessively long lines. Your nicely formatted text may end be hard or impossible to decipher on the receiver's terminal. COMPOSING MAIL Initially, you are in OS-9's single line editor. You can enter and change text as long as you do not hit the ENTER key. While you are typing an outgoing message, there are various commands to assist you in composing the message. Each of these commands starts with a tilde (~) character at the beginning of the line. After each command is finished, with the exception of ~a and ~x, you will be returned to OS-9's single line editor. ~v Edit message using "vi". "vi" refers to the Tandy TSEDIT editor after the "vi" patches have been applied to enable this editor to work in OS9 device windows. ~e Edit message using the editor defined in either by the environment variable EDITOR or the file mailrc (.mailrc under OSK) in your home directory. The editor named in 'mailrc' overrides the one defined by EDITOR. MAILX UUCP MAILX ~m[<char>] Include text of letter being replied to. An optional character <char> will be put at the beginning of each line. The default character is ">". This can be changed in either 'parameters' or 'mailrc' files. If a space is used as the character, no quote will mark the included text. Examples: ~m<SPACE> This is included message ~m<ENTER> >This is included message ~m- -This is included message ~h Display help message. ~x Exit Mailx immediately, abandoning letter. ~r[<char>] <file> Include text from file <file>. If an optional character <char> follows '~r', each line of the included text will be started with it. Mailx assumes <filename> is in your current data directory unless a full pathname is given. Examples: ~r <file> This is included file. ~r$ <file> $This is included file. There is no default quote character for this command. Before appending the file, the file name is checked for an ending extention, e.g. .ar, .lzh, etc. If such an extention is found, Mailx attempts to compared against the names in the file /DD/SYS/UUCP/bin.list, if it exists. This file consists of a list of names, one to a line, representing names of binary files. Common names would be: ar, gif, pak, lzh, bin, z, vef, and gif. --NOTE--: The dot (.) is NOT part of the name in bin.list.) If a match is found, Mailx assumes the file is a binary one and uuencodes it before appending it. If the file is uuencoded, the quote char is not used. If there is no match or bin.list doesn't exist, Mailx proceeds as described above. ~R[<char>] <file> Works the same as ~r above except no attempt is made to uuencode the file. MAILX UUCP MAILX ~a Abort editing the current letter. You will be asked if you want to abort. Only a 'y' or 'Y' will abort the letter. If you were replying to a message, you will be returned to that message. Otherwise Mailx will exit. ~! Forks a shell. CNTRL-<BREAK) will kill the shell and you can resume composing the letter. ~u <file> Uuencode <file> and append it to the letter. When editing a message, DO NOT attempt to do any of the following; the results are unpredictable: o Change the message header To: or CC: lines. The changes will not be used when the mail is sent. You can change the Subject: line, however. o Remove the blank line following the message header. Mailers on remote systems expect this blank line to be there and start with an End-Of-Line character When you are finished composing the letter, you send it by entering a period (.) followed by <ENTER>. The period must be the first and only character on the line. Mailx will then try to open and read either the file signature or alt_signature, if the command line optin '-n' was used, in your home directory. The latter is discussed below. If it exists, the contents will be appended to the letter. (See SIGNATURE.DOC) If the mail cannot be sent to user, an error message will be shown. The message will be saved in the file dead.letter in the user's home directory. If dead.letter already exists, the message will be appended to the file. This feature will prevent needing to retype a long message because of some addressing error. COMMAND LINE OPTIONS Various command line options can be used for sending mail. They can be mixed in any order with addresses. Each option must be preceded by a '-'. Options may be run together, for example: mailx -dps test bob@kc2wz.bubble.org mailx oracle@cs.indiana.edu -s "Oracle tell me ..." -p -d MAILX UUCP MAILX Available options are: a <file> file replying to. This is used by POSTNEWS when posting a followup to a news article. s <subject> Subject: line. If included on the command, you will not be prompted for it later. If the subject consists of more than one word, they must be enclosed in double quotes. Example: mailx -s test harvey Sends a mesage to 'harvey' with: Subject: test mailx -s "This is a test" harvey Sends a message to 'harvey' with: Subject: This is a test xN N equals the debug level from 0 (OFF) to 9 (highest). The default is OFF (0). d Tells Mailx not to add your signature file to your letter. This is useful for sending mail to an automatic mail servers where unexpected text can cause unexpected results. The default for this option is OFF. This means Mailx will read the contents of the signature (.signature under OSK), if it exists in your home directory, and append its contents to your message. n Look for the file alt_signature (.alt_signature under OSK) in your home directory. If it can be read, its contents will be appended to your message instead of the default 'signature' ('.signature' under OSK). p Do not to prompt for carbon copy (Cc:). This will override the setting in the 'mailrc' file. It is useful for sending mail as in this example: echo "Time to backup" ! mailx -p paul The -p is necessary here. Otherwise, if this command was run by a system daemon such as CRON and the 'mailrc' or the /DD/SYS/UUCP/Parameters file was set to prompt for 'Cc:', Mailx would wait for a response to the "Cc:" prompt which it would never see. The result look like the Mailx had crashed. MAILX UUCP MAILX RECEIVING MAIL This section deals with reading mail received from other users or remote UUCP systems. Mail is read in the order it arrives. Messages can read either starting with the oldest to the most recent (first in, first out) order, starting with the most recently to the oldest (last in, first out) order. Mailx defaults to first in, first out order. The two commands to read mail are: mailx mailx -r When mail begins you will be told the total number of messages waiting, how many are new (received since the last session), and how many are unread (new from a previous session but never read). If the message displayed is longer than the screen, the message will stop scrolling and a "MORE" prompt will be displayed until you hit one of the following keys: x Mailx will exit immediately with no changes. q This will display Mailx's command prompt: mailx> At this prompt you can use any of the commands described in detail in the next section. a This will redisplay the current message starting from the beginning. n This will stop showing the current message and go to the next waiting message. If the current messsage is the last one, Mailx will ask if you want to quit. The current message remains unchanged in either case. p, - This will stop showing the current message and go to the previous message. If there is no previous message, the current message is redisplayed from the beginning. BREAK Mailx will exit immediately with no changes to any messages. MAILX UUCP MAILX SPACE ENTER Continue scrolling the current message. At the end of the message, Mailx's command prompt, "mailx>", will appear. At this point, you may dispose of the mail in a number of ways: s [<filename>] Saves the message to a file. <filename> is optional. If none is give, the message is saved in a file called 'mbox' in the user's home directory. If 'mbox' already exists, the message is appended to the file. If <filename) is given, message will be saved that in file. Mailx puts <filename> in the user's home directory unless a full pathname to somewhere else is used. An error message is shown if Mailx is unable to save the file. You will then be given the option to delete the message. Any answer but yes keeps the message. w [<filename>] Saves the message to a file as does 's' above. However, the header is stripped first. Mailx begins with line following the first blank line in the message. A blank line is a line beginning with a carriage return or linefeed. n Go to the next message. The current <SPACE> message is unchanged. If the current <ENTER> message is the last one, Mailx exits. p, - Go to the previous message. If the current message is the first one, it is redisplayed from the beginning. a Shows the current message again starting from the beginning. r Reply to the message being read. You will able to compose using the commands described in COMPOSING MAIL above. After the reply is sent, you will be return to the command prompt. The current message will be unchanged. MAILX UUCP MAILX f Forward a copy of the current message to one or more addresses. You will be prompted for "forward To:". Enter one or more names, uucp addresses, or aliases with a space separating each one. If you decide not to forward the message, hit ENTER in response to "forward To:". If you have already typed addresses but not yet hit ENTER, simply backspace as far as possible and hit ENTER. In both cases, you will be returned to the command prompt. Next, you will be prompted for "Subject:". You can enter it or hit ENTER in which case the default "Subject:" will be "Forwarded Mail". A copy of the current message will be attached and you will end up in Mailx's single line editor. You may either edit the message (See COMPOSING MAIL) or send it immediately. The signature file is NOT appended to a forwarded message. m <address> Send mail to one or more UUCP addresses. Separate each address with a space. End addresses with ENTER. If you decide not to mail, hit ENTER instead of entering addresses. You will be returned to the command prompt. This command is essentially the same as using 'mailx <address>' on the command line with two differences: 1. The current message being read is available to include in the letter. 2. Non-superusers can use '@' instead of '*' since the shell is not being used inside Mailx. (Only Shell+ users on the CoCo need to be concerned with this.) You can also use the command line options, -s, -d and -p. These are only in effect to the duration of the 'm' command. After the mail is sent, you will be returned to the command prompt. The current message will be unchanged. MAILX UUCP MAILX d Delete the current message. You will be asked for confirmation. Any answer but 'Y' or 'y' will leave the message unchanged. If you answer 'Y', the current message will be deleted and the next one displayed. If this was the last message, Mailx will ask if you which to exit. u Undelete mail deleted during this session. h, ? Displays a help screen of commands available. q Exit Mailx after killing deleted mail. x Exits immediately leaving everything unchanged. ! Forks a shell. CNTRL-BREAK will kill the shell and return to the command prompt of the current message. Example of reading mail in first in, last out order (default): OS9> mailx From moon!johnharkin May 27 21:36:17 1991 Received: by ccentral (OS9 UUCP); 27 May 91 21:36:17 Date: Mon, 27 May 91 21:34:46 From: John Harkin <johnharkin@moon.UUCP> Subject: Upcoming publication schedule Reply-To: "John Harkin" <johnharkin@moon.UUCP> To: ccentral!rickadams Message-Id: <9105272134.AA00112@moon.UUCP> I'll have the necessary article text to you by the 29th; I hope you can get the promotional brochure done quickly. -- John Harkin North Bay Network moon!johnharkin mailx> q OS9> MAILX UUCP MAILX CHECKING MAIL Mailx let's you check your mailbox to see if there is waiting mail. The command syntax is: mailx -c [<user>...] Only the superuser is allowed to check for waiting mail of other users. If a non-superuser attempts this, only their mailbox is checked. You will be told if there is waiting mail and how many messages. When the superuser checks another user's mail, the superuser's mailbox is also checked. Some examples: User 'bob', who is not the superuser, is checking his mail: OS9> mailx -c You have mail <3 messages> ...type 'mailx' to read it OS9> Superuser 'sue' is checking her mail and that of 'postmaster' and 'fred': OS9> mailx -c postmaster fred You have mail <1 message> ...type 'mailx' to read it postmaster: You have mail <2 messges> ...type 'mailx' to read it fred: no mail OS9> MAILX UUCP MAILX FILES Use of $HOME and $MAIL below indicate directories defined by environment variables. For CoCo and OSK, the global environment variables MAIL and HOME must be defined, e.g.: MAIL=/h1/usr/spool/mail HOME=/dd/home In user's home directory: (CoCo specific files) $HOME/<user>/UUCP/aliases $HOME/<user>/UUCP/mailrc $HOME/<user>/UUCP/signature $HOME/<user>/UUCP/alt_signature $HOME/<user>/UUCP/<mailing_list> $HOME/<user>/profile (OSK specific files) $HOME/<user>/.aliases $HOME/<user>/.mailrc $HOME/<user>/.signature $HOME/<user>/.alt_signature $HOME/<user>/<mailing_list> Other files: $HOME/<user>/dead.letter $HOME/<user>/mbox $MAIL/<user>/mail..list $MAIL/<user>/mYYYYMMDDHHMMSS (message file) /DD/SYS/UUCP/Parameters /DD/SYS/UUCP/sequence.mail /DD/SYS/UUCP/sequence.spool /DD/SYS/profile (CoCo--global system environment) ./<scratchdir>/UUCPtemp1.? (temporary file) SEE ALSO parameters.doc, aliases.doc, mailrc.doc, signature.doc, rmail.man, parameters.example