marshal 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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.
  43. Before adding any necessary header lines, it prepends
  44. the contents of
  45. .BI /mail/box/ username /headers\f1.
  46. This allows the addition of personal headers like
  47. .B From:
  48. lines with a full name or a different
  49. return address.
  50. Command line options direct marshal to add a subject line
  51. and append attachments. The arguments to
  52. .I marshal
  53. are the addresses of the recipients.
  54. .PP
  55. When running in a
  56. .IR rio (1)
  57. window,
  58. .I marshal
  59. automatically puts the window into hold mode (see
  60. .IR rio (1));
  61. this means that the message can be edited freely,
  62. because nothing will be sent to
  63. .I marshal
  64. until the ESC key is hit to exit hold mode.
  65. .PP
  66. The options are:
  67. .TF "-a file"
  68. .TP
  69. .BI -a file
  70. directs
  71. .I marshal
  72. to append
  73. .I file
  74. as a mime attachment.
  75. Unless explicitly specified by the
  76. .B -t
  77. option, the type of the attachment is determined
  78. by running the
  79. .IR file (1)
  80. command.
  81. .TP
  82. .BI -A file
  83. is like
  84. .B -a
  85. but the message disposition is marked as
  86. .I inline
  87. directing any mail reader to display the attachment
  88. (if it can) when the mail message is read.
  89. .TP
  90. .BI -t type
  91. sets the content type for the attachments from
  92. all subsequent
  93. .B -a
  94. and
  95. .B -A
  96. options.
  97. .TP
  98. .BI -s subject
  99. adds a
  100. .B Subject:
  101. header line to the message if one does not
  102. already exist.
  103. .TP
  104. .BI -C copyaddr
  105. adds a
  106. .B Cc:
  107. header with
  108. .I copyaddr
  109. and also adds
  110. .I copyaddr
  111. as a recipient.
  112. .TP
  113. .BI -R replymsg
  114. tells marshal what message this one is in reply to.
  115. .I Replymsg
  116. is an
  117. .IR upas/fs (1)
  118. directory containing the message.
  119. .I Marshal
  120. uses any message id in this message in its
  121. .B In-Reply-To
  122. field. It also passes the directory to
  123. .BI /mail/box/ username /pipefrom
  124. in the
  125. .B replymsg
  126. environment variable. Thus,
  127. .B pipefrom
  128. can alter the message to somehow match
  129. the reply to the message it is replying to.
  130. .TP
  131. .BI -n
  132. intentionally no standard input
  133. .TP
  134. .B -#xr
  135. are all passed as command line options to the
  136. .I send
  137. that
  138. .I marshal
  139. invokes.
  140. .TP
  141. .BI -C recipient
  142. specifies that a copy of the mail should also be sent to
  143. .I recipient
  144. and that
  145. .I recipient
  146. should be included in a
  147. .B CC:
  148. header line.
  149. .PD
  150. .PP
  151. .I Marshal
  152. also expands any user mail aliases contained in
  153. .BI /mail/box/ username /names.
  154. The format of the alias file is the same as that
  155. for system aliases, see
  156. .IR aliasmail (8).
  157. .PP
  158. .I Marshal
  159. uses the login name as the reply address. This
  160. can be overriden using the environment variable
  161. .BR upasname .
  162. It's value will become both the envelope
  163. and
  164. .B From:
  165. mailbox name. For example:
  166. .EX
  167. upasname=natasha@kremvax.com upas/mail boris@squirrel.com
  168. .EE
  169. .SH FILES
  170. .TP
  171. .B /mail/box/*/dead.letter
  172. .SH SOURCE
  173. .TP
  174. .B /sys/src/cmd/upas/marshal
  175. .SH "SEE ALSO"
  176. .IR aliasmail (8),
  177. .IR faces (1),
  178. .IR filter (1),
  179. .IR mail (1),
  180. .IR mlmgr (1),
  181. .IR nedmail (1),
  182. .IR qer (8),
  183. .IR rewrite (6),
  184. .IR send (8),
  185. .IR smtp (8),
  186. .IR upasfs (4)