marshal 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. .TH MARSHAL 1
  2. .SH NAME
  3. marshal \- formatting and sending mail
  4. .SH SYNOPSIS
  5. .PP
  6. .B upas/marshal
  7. [
  8. .B -t
  9. .I mime-type
  10. ]
  11. [
  12. .B -[aA]
  13. .I attachment
  14. ]
  15. [
  16. .B -s
  17. .I subject
  18. ]
  19. [
  20. .B -C
  21. .I copyaddr
  22. ]
  23. [
  24. .B -R
  25. .I reply-msg
  26. [
  27. .B -nrx#
  28. ]
  29. [
  30. .I mailaddr ...
  31. ]
  32. .SH DESCRIPTION
  33. .I Marshal
  34. builds a mail message from standard input and passes it
  35. for transmission or delivery to
  36. .BI /mail/box/ username /pipefrom
  37. if it exists, otherwise to
  38. .BR /bin/upas/send .
  39. The message format is both RFC 822 and
  40. MIME conformant, so
  41. .I marshal
  42. adds any required headers not already in the message, prefixed by
  43. the contents of
  44. .BI /mail/box/ username /headers\f1.
  45. This allows the addition of personal headers like
  46. .B From:
  47. lines with a full name or a different
  48. return address.
  49. Command line options direct marshal to add a subject line
  50. and append attachments. The arguments to
  51. .I marshal
  52. are the addresses of the recipients.
  53. .PP
  54. When running in a
  55. .IR rio (1)
  56. window,
  57. .I marshal
  58. automatically puts the window into hold mode (see
  59. .IR rio (1));
  60. this means that the message can be edited freely,
  61. because nothing will be sent to
  62. .I marshal
  63. until the ESC key is hit to exit hold mode.
  64. .PP
  65. The options are:
  66. .TF "-a file"
  67. .TP
  68. .BI -a file
  69. directs
  70. .I marshal
  71. to append
  72. .I file
  73. as a mime attachment.
  74. Unless explicitly specified by the
  75. .B -t
  76. option, the type of the attachment is determined
  77. by running the
  78. .IR file (1)
  79. command.
  80. .TP
  81. .BI -A file
  82. is like
  83. .B -a
  84. but the message disposition is marked as
  85. .I inline
  86. directing any mail reader to display the attachment
  87. (if it can) when the mail message is read.
  88. .TP
  89. .BI -t type
  90. sets the content type for the attachments from
  91. all subsequent
  92. .B -a
  93. and
  94. .B -A
  95. options.
  96. .TP
  97. .BI -s subject
  98. adds a
  99. .B Subject:
  100. header line to the message if one does not
  101. already exist.
  102. .TP
  103. .BI -C copyaddr
  104. adds a
  105. .B Cc:
  106. header with
  107. .I copyaddr
  108. and also adds
  109. .I copyaddr
  110. as a recipient.
  111. .TP
  112. .BI -R replymsg
  113. tells marshal what message this one is in reply to.
  114. .I Replymsg
  115. is an
  116. .IR upasfs (4)
  117. directory containing the message.
  118. .I Marshal
  119. uses any message id in this message in its
  120. .B In-Reply-To
  121. field. It also passes the directory to
  122. .BI /mail/box/ username /pipefrom
  123. in the
  124. .B replymsg
  125. environment variable. Thus,
  126. .B pipefrom
  127. can alter the message to somehow match
  128. the reply to the message it is replying to.
  129. .TP
  130. .BI -n
  131. intentionally no standard input
  132. .TP
  133. .B -#xr
  134. are all passed as command line options to the
  135. .I send
  136. that
  137. .I marshal
  138. invokes.
  139. .PD
  140. .PP
  141. .I Marshal
  142. also expands any user mail aliases contained in
  143. .BI /mail/box/ username /names.
  144. The format of the alias file is the same as that
  145. for system aliases, see
  146. .IR aliasmail (8).
  147. .PP
  148. .I Marshal
  149. uses the login name as the reply address. This
  150. can be overriden using the environment variable
  151. .BR upasname .
  152. Its value will become both the envelope
  153. and
  154. .B From:
  155. mailbox name. For example:
  156. .EX
  157. upasname=natasha@kremvax.com upas/mail boris@squirrel.com
  158. .EE
  159. .SH FILES
  160. .TP
  161. .B /mail/box/*/dead.letter
  162. .SH SOURCE
  163. .TP
  164. .B /sys/src/cmd/upas/marshal
  165. .SH "SEE ALSO"
  166. .IR aliasmail (8),
  167. .IR faces (1),
  168. .IR filter (1),
  169. .IR mail (1),
  170. .IR mlmgr (1),
  171. .IR nedmail (1),
  172. .IR qer (8),
  173. .IR rewrite (6),
  174. .IR send (8),
  175. .IR smtp (8),
  176. .IR upasfs (4)