Print this page
    
12745 man page typos
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/man/man1/mail.1.man.txt
          +++ new/usr/src/man/man1/mail.1.man.txt
   1    1  MAIL(1)                          User Commands                         MAIL(1)
   2    2  
   3    3  
   4    4  
   5    5  NAME
   6    6         mail, rmail - read mail or send mail to users
   7    7  
   8    8  SYNOPSIS
   9    9     Sending Mail
  10   10         mail [-tw] [-m message_type] recipient...
  11   11  
  12   12  
  13   13         rmail [-tw] [-m message_type] recipient...
  14   14  
  15   15  
  16   16     Reading Mail
  17   17         mail [-ehpPqr] [-f file]
  18   18  
  19   19  
  20   20     Debugging
  21   21         mail [-x debug_level] [other_mail_options] recipient...
  22   22  
  23   23  
  24   24  DESCRIPTION
  25   25         A recipient is usually a domain style address ("user@machine") or a
  26   26         user name recognized by login(1). When recipients are named, mail
  27   27         assumes a message is being sent. It reads from the standard input up to
  28   28         an end-of-file (Control-d) or, if reading from a terminal device, until
  29   29         it reads a line consisting of just a period. When either of those
  30   30         indicators is received, mail adds the letter to the mailfile for each
  31   31         recipient.
  32   32  
  33   33  
  34   34         A letter is composed of some header lines followed by a blank line
  35   35         followed by the message content. The header lines section of the letter
  36   36         consists of one or more UNIX postmarks:
  37   37  
  38   38           From sender date_and_time [remote from remote_system_name]
  39   39  
  40   40  
  41   41  
  42   42  
  43   43         followed by one or more standardized message header lines of the form:
  44   44  
  45   45           keyword-name: [printable text]
  46   46  
  47   47  
  48   48  
  49   49  
  50   50         where keyword-name is comprised of any printable, non-whitespace
  51   51         characters other than colon (`:'). A MIME-version: header line
  52   52         indicates that the message is formatted as described in RFC 2045. A
  53   53         Content-Length: header line, indicating the number of bytes in the
  54   54         message content, is always present unless the letter consists of only
  55   55         header lines with no message content. A Content-Type: header line that
  56   56         describes the type of the message content (such as text/plain,
  57   57         application/octet-stream, and so on) is also present, unless the letter
  58   58         consists of only header lines with no message content. Header lines may
  59   59         be continued on the following line if that line starts with white
  60   60         space.
  61   61  
  62   62  OPTIONS
  63   63     Sending Mail
  64   64         The following command-line arguments affect sending mail:
  65   65  
  66   66         -m message_type
  67   67                            A Message-Type: line is added to the message header
  68   68                            with the value of message_type.
  69   69  
  70   70  
  71   71         -t
  72   72                            A To: line is added to the message header for each
  73   73                            of the intended recipients.
  74   74  
  75   75  
  76   76         -w
  77   77                            A letter is sent to a remote recipient without
  78   78                            waiting for the completion of the remote transfer
  79   79                            program.
  80   80  
  81   81  
  82   82  
  83   83         If a letter is found to be undeliverable, it is returned to the sender
  84   84         with diagnostics that indicate the location and nature of the failure.
  85   85         If mail is interrupted during input, the message is saved in the file
  86   86         dead.letter to allow editing and resending. dead.letter is always
  87   87         appended to, thus preserving any previous contents. The initial attempt
  88   88         to append to (or create) dead.letter is in the current directory. If
  89   89         this fails, dead.letter is appended to (or created in) the user's login
  90   90         directory. If the second attempt also fails, no dead.letter processing
  91   91         is done.
  92   92  
  93   93  
  94   94         rmail only permits the sending of mail; uucp(1C) uses rmail as a
  95   95         security precaution. Any application programs that generate mail
  96   96         messages should be sure to invoke rmail rather than mail for message
  97   97         transport and/or delivery.
  98   98  
  99   99  
 100  100         If the local system has the Basic Networking Utilities installed, mail
 101  101         can be sent to a recipient on a remote system. There are numerous ways
 102  102         to address mail to recipients on remote systems depending on the
 103  103         transport mechanisms available to the local system. The two most
 104  104         prevalent addressing schemes are Domain-style and UUCP-style.
 105  105  
 106  106         Domain-style addressing
 107  107                                    Remote recipients are specified by appending
 108  108                                    an `@' and domain (and possibly sub-domain)
 109  109                                    information to the recipient name (such as
 110  110                                    user@sf.att.com). (The local system
 111  111                                    administrator should be consulted for
 112  112                                    details on which addressing conventions are
 113  113                                    available on the local system.)
 114  114  
 115  115  
 116  116         UUCP-style addressing
 117  117                                    Remote recipients are specified by prefixing
 118  118                                    the recipient name with the remote system
 119  119                                    name and an exclamation point, such as
 120  120                                    sysa!user. If csh(1) is the default shell,
 121  121                                    sysa\!user should be used. A series of
 122  122                                    system names separated by exclamation points
 123  123                                    can be used to direct a letter through an
 124  124                                    extended network (such as
 125  125                                    sysa!sysb!sysc!user or
 126  126                                    sysa\!sysb\!sysc\!user).
 127  127  
 128  128  
 129  129     Reading Mail
 130  130         The following command-line arguments affect reading mail:
 131  131  
 132  132         -e
 133  133                    Test for the presence of mail. mail prints nothing.
 134  134  
 135  135                    An exit status of 0 is returned if the user has mail.
 136  136                    Otherwise, an exit status of 1 is returned.
 137  137  
 138  138  
 139  139         -E
 140  140                    Similar to -e, but tests only for the presence of new mail.
 141  141  
 142  142                    An  exit  status  of 0 is returned if the user has new
 143  143                    mail to read,  an exit status of 1 is returned if the
 144  144                    user  has no mail,  or an exit status of 2 is returned
 145  145                    if the user has mail which has already been read.
 146  146  
 147  147  
 148  148         -h
 149  149                    A window of headers are initially displayed rather than the
 150  150                    latest message. The display is followed by the ? prompt.
 151  151  
 152  152  
 153  153         -p
 154  154                    All messages are printed without prompting for disposition.
 155  155  
 156  156  
 157  157         -P
 158  158                    All messages are printed with all header lines displayed,
 159  159                    rather than the default selective header line display.
 160  160  
 161  161  
 162  162         -q
 163  163                    mail terminates after interrupts. Normally an interrupt
 164  164                    causes only the termination of the message being printed.
 165  165  
 166  166  
 167  167         -r
 168  168                    Messages are printed in first-in, first-out order.
 169  169  
 170  170  
 171  171         -f file
 172  172                    mail uses file (such as mbox) instead of the default
 173  173                    mailfile.
 174  174  
 175  175  
 176  176  
 177  177         mail, unless otherwise influenced by command-line arguments, prints a
 178  178         user's mail messages in last-in, first-out order. The default mode for
 179  179         printing messages is to display only those header lines of immediate
 180  180         interest. These include, but are not limited to, the UNIX From and
 181  181         >From postmarks, From:, Date:, Subject:, and Content-Length: header
 182  182         lines, and any recipient header lines such as To:, Cc:, Bcc:, and so
 183  183         forth. After the header lines have been displayed, mail displays the
 184  184         contents (body) of the message only if it contains no unprintable
 185  185         characters. Otherwise, mail issues a warning statement about the
 186  186         message having binary content and not display the content. This can be
 187  187         overridden by means of the p command.
 188  188  
 189  189  
 190  190         For each message, the user is prompted with a ? and a line is read from
 191  191         the standard input. The following commands are available to determine
 192  192         the disposition of the message:
 193  193  
 194  194         #
 195  195                               Print the number of the current message.
 196  196  
 197  197  
 198  198         -
 199  199                               Print previous message.
 200  200  
 201  201  
 202  202         <new-line>,+, or n
 203  203                               Print the next message.
 204  204  
 205  205  
 206  206         !command
 207  207                               Escape to the shell to do command.
 208  208  
 209  209  
 210  210         a
 211  211                               Print message that arrived during the mail
 212  212                               session.
 213  213  
 214  214  
 215  215         d, or dp
 216  216                               Delete the current message and print the next
 217  217                               message.
 218  218  
 219  219  
 220  220         d n
 221  221                               Delete message number n. Do not go on to next
 222  222                               message.
 223  223  
 224  224  
 225  225         dq
 226  226                               Delete message and quit mail.
 227  227  
 228  228  
 229  229         h
 230  230                               Display a window of headers around current
 231  231                               message.
 232  232  
 233  233  
 234  234         hn
 235  235                               Display a window of headers around message number
 236  236                               n.
 237  237  
 238  238  
 239  239         h a
 240  240                               Display headers of all messages in the user's
 241  241                               mailfile.
 242  242  
 243  243  
 244  244         h d
 245  245                               Display headers of messages scheduled for
 246  246                               deletion.
 247  247  
 248  248  
 249  249         m [ persons ]
 250  250                               Mail (and delete) the current message to the
 251  251                               named persons.
 252  252  
 253  253  
 254  254         n
 255  255                               Print message number n.
 256  256  
 257  257  
 258  258         p
 259  259                               Print current message again, overriding any
 260  260                               indications of binary (that is, unprintable)
 261  261                               content.
 262  262  
 263  263  
 264  264         P
 265  265                               Override default brief mode and print current
 266  266                               message again, displaying all header lines.
 267  267  
 268  268  
 269  269         q, or Control-d
 270  270                               Put undeleted mail back in the mailfile and quit
 271  271                               mail.
 272  272  
 273  273  
 274  274         r [ users ]
 275  275                               Reply to the sender, and other users, then delete
 276  276                               the message.
 277  277  
 278  278  
 279  279         s [ files ]
 280  280                               Save message in the named files (mbox is default)
 281  281                               and delete the message.
 282  282  
 283  283  
 284  284         u [ n ]
 285  285                               Undelete message number n (default is last read).
 286  286  
 287  287  
 288  288         w [ files ]
 289  289                               Save message contents, without any header lines,
 290  290                               in the named files (mbox is default) and delete
 291  291                               the message.
 292  292  
 293  293  
 294  294         x
 295  295                               Put all mail back in the mailfile unchanged and
 296  296                               exit mail.
 297  297  
 298  298  
 299  299         y [ files ]
 300  300                               Same as -w option.
 301  301  
 302  302  
 303  303         ?
 304  304                               Print a command summary.
 305  305  
 306  306  
 307  307  
 308  308         When a user logs in, the presence of mail, if any, is usually
 309  309         indicated. Also, notification is made if new mail arrives while using
 310  310         mail.
 311  311  
 312  312  
 313  313         The permissions of mailfile can be manipulated using chmod(1) in two
 314  314         ways to alter the function of mail. The other permissions of the file
 315  315         can be read-write (0666), read-only (0664), or neither read nor write
 316  316         (0660) to allow different levels of privacy. If changed to other than
 317  317         the default (mode 0660), the file is preserved even when empty to
 318  318         perpetuate the desired permissions. (The administrator can override
 319  319         this file preservation using the DEL_EMPTY_MAILFILE option of
 320  320         mailcnfg.)
 321  321  
 322  322  
 323  323         The group ID of the mailfile must be mail to allow new messages to be
 324  324         delivered, and the mailfile must be writable by group mail.
 325  325  
 326  326     Debugging
 327  327         The following command-line arguments cause mail to provide debugging
 328  328         information:
 329  329  
 330  330         -x debug_level
 331  331                           mail creates a trace file containing debugging
 332  332                           information.
 333  333  
 334  334  
 335  335  
 336  336         The -x option causes mail to create a file named /tmp/MLDBGprocess_id
 337  337         that contains debugging information relating to how mail processed the
 338  338         current message. The absolute value of debug_level controls the
 339  339         verboseness of the debug information. 0 implies no debugging. If
 340  340         debug_level is greater than 0, the debug file is retained only if mail
 341  341         encountered some problem while processing the message. If debug_level
 342  342         is less than 0, the debug file is always be retained. The debug_level
 343  343         specified via -x overrides any specification of DEBUG in
 344  344         /etc/mail/mailcnfg. The information provided by the -x option is
 345  345         esoteric and is probably only useful to system administrators.
 346  346  
 347  347     Delivery Notification
 348  348         Several forms of notification are available for mail by including one
 349  349         of the following lines in the message header.
 350  350  
 351  351  
 352  352         Transport-Options: [ /options ]
 353  353  
 354  354  
 355  355         Default-Options: [ /options ]
 356  356  
 357  357  
 358  358         >To: recipient [ /options ]
 359  359  
 360  360  
 361  361         Where the "/options" can be one or more of the following:
 362  362  
 363  363         /delivery
 364  364                        Inform the sender that the message was successfully
 365  365                        delivered to the recipient's mailbox.
 366  366  
 367  367  
 368  368         /nodelivery
 369  369                        Do not inform the sender of successful deliveries.
 370  370  
 371  371  
 372  372         /ignore
 373  373                        Do not inform the sender of failed deliveries.
 374  374  
 375  375  
 376  376         /return
 377  377                        Inform the sender if mail delivery fails. Return the
 378  378                        failed message to the sender.
 379  379  
 380  380  
 381  381         /report
 382  382                        Same as /return except that the original message is not
 383  383                        returned.
 384  384  
 385  385  
 386  386  
 387  387         The default is /nodelivery/return. If contradictory options are used,
 388  388         the first is recognized and later, conflicting, terms are ignored.
 389  389  
 390  390  OPERANDS
 391  391         The following operand is supported for sending mail:
 392  392  
 393  393         recipient
 394  394                      A domain style address ("user@machine") or user login name
 395  395                      recognized by login(1).
 396  396  
 397  397  
 398  398  USAGE
 399  399         See largefile(5) for the description of the behavior of mail and rmail
 400  400         when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
 401  401  
 402  402  ENVIRONMENT VARIABLES
 403  403         See environ(5) for descriptions of the following environment variables
 404  404         that affect the execution of mail: LC_CTYPE, LC_MESSAGES, and NLSPATH.
 405  405  
 406  406         TZ
 407  407               Determine the timezone used with date and time strings.
 408  408  
 409  409  
 410  410  EXIT STATUS
 411  411         The following exit values are returned:
 412  412  
 413  413         0
 414  414               Successful completion when the user had mail.
 415  415  
 416  416  
 417  417         1
 418  418               The user had no mail or an initialization error occurred.
 419  419  
 420  420  
 421  421         >1
 422  422               An error occurred after initialization.
 423  423  
 424  424  
 425  425  FILES
 426  426         dead.letter
 427  427                             unmailable text
 428  428  
 429  429  
 430  430         /etc/passwd
 431  431                             to identify sender and locate recipients
 432  432  
 433  433  
 434  434         $HOME/mbox
 435  435                             saved mail
 436  436  
 437  437  
 438  438         $MAIL
 439  439                             variable containing path name of mailfile
 440  440  
 441  441  
 442  442         /tmp/MLDBG*
 443  443                             debug trace file
 444  444  
 445  445  
 446  446         /var/mail/*.lock
 447  447                             lock for mail directory
 448  448  
  
    | 
      ↓ open down ↓ | 
    448 lines elided | 
    
      ↑ open up ↑ | 
  
 449  449  
 450  450         /var/mail/:saved
 451  451                             directory for holding temp files to prevent loss of
 452  452                             data in the event of a system crash
 453  453  
 454  454  
 455  455         /var/mail/user
 456  456                             incoming mail for user; that is, the mailfile
 457  457  
 458  458  
 459      -       var/tmp/ma*
      459 +       /var/tmp/ma*
 460  460                             temporary file
 461  461  
 462  462  
 463  463  SEE ALSO
 464  464         chmod(1), csh(1), login(1), mailx(1), uucp(1C), uuencode(1C),
 465  465         vacation(1), write(1), attributes(5), environ(5), largefile(5)
 466  466  
 467  467  
 468  468         Solaris Advanced User's Guide
 469  469  
 470  470  NOTES
 471  471         The interpretation and resulting action taken because of the header
 472  472         lines described in the Delivery Notifications section only occur if
 473  473         this version of mail is installed on the system where the delivery (or
 474  474         failure) happens.  Earlier versions of mail might not support any types
 475  475         of delivery notification.
  
    | 
      ↓ open down ↓ | 
    6 lines elided | 
    
      ↑ open up ↑ | 
  
 476  476  
 477  477  
 478  478         Conditions sometimes result in a failure to remove a lock file.
 479  479  
 480  480  
 481  481         After an interrupt, the next message might not be printed. Printing can
 482  482         be forced by typing a p.
 483  483  
 484  484  
 485  485  
 486      -                                 July 24, 2008                         MAIL(1)
      486 +                                 May 17, 2020                          MAIL(1)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX