marshal 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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 upas/fs (1)
  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. .TP
  140. .BI -C recipient
  141. specifies that a copy of the mail should also be sent to
  142. .I recipient
  143. and that
  144. .I recipient
  145. should be included in a
  146. .B CC:
  147. header line.
  148. .PD
  149. .PP
  150. .I Marshal
  151. also expands any user mail aliases contained in
  152. .BI /mail/box/ username /names.
  153. The format of the alias file is the same as that
  154. for system aliases, see
  155. .IR aliasmail (8).
  156. .PP
  157. .I Marshal
  158. uses the login name as the reply address. This
  159. can be overriden using the environment variable
  160. .BR upasname .
  161. It's value will become both the envelope
  162. and
  163. .B From:
  164. mailbox name. For example:
  165. .EX
  166. upasname=natasha@kremvax.com upas/mail boris@squirrel.com
  167. .EE
  168. .SH FILES
  169. .TP
  170. .B /mail/box/*/dead.letter
  171. .SH SOURCE
  172. .TP
  173. .B /sys/src/cmd/upas/marshal
  174. .SH "SEE ALSO"
  175. .IR aliasmail (8),
  176. .IR faces (1),
  177. .IR filter (1),
  178. .IR mail (1),
  179. .IR mlmgr (1),
  180. .IR nedmail (1),
  181. .IR qer (8),
  182. .IR rewrite (6),
  183. .IR send (8),
  184. .IR smtp (8),
  185. .IR upasfs (4)