upasfs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. .TH UPASFS 4
  2. .SH NAME
  3. upasfs, startupasfs \- mail file server
  4. .SH SYNOPSIS
  5. .B upas/fs
  6. [
  7. .B -f
  8. .I mailbox
  9. ] [
  10. .B -bnps
  11. ] [
  12. .B -m
  13. .I mntpoint
  14. ]
  15. .PP
  16. .B startupasfs
  17. .SH DESCRIPTION
  18. .I Fs
  19. is a user level file system that reads mailboxes and presents them as a file
  20. system.
  21. A user normally starts
  22. .I fs
  23. in his/her profile after starting
  24. .IR plumber (4)
  25. and before starting
  26. a window system, such as
  27. .IR rio (1)
  28. or
  29. .IR acme (1).
  30. The file system is used by
  31. .I nedmail
  32. and
  33. .IR acme (1)'s
  34. mail reader to parse messages.
  35. .I Fs
  36. also generates plumbing messages used by
  37. .IR biff
  38. and
  39. .IR faces (1)
  40. to provide mail announcements.
  41. .PP
  42. .I Startupasfs
  43. is a shell script suitable for use in one's profile.
  44. It runs
  45. .B "fs -s"
  46. for the invoking user if none is already running,
  47. and always mounts the user's posted
  48. .I fs
  49. on
  50. .BR /mail/fs .
  51. .PP
  52. The mailbox itself becomes a directory under
  53. .BR /mail/fs .
  54. Each message in the mailbox becomes a numbered directory in the
  55. mailbox directory, and each attachment becomes a numbered directory
  56. in the message directory. Since an attachment may itself be a mail message,
  57. this structure can recurse ad nauseam.
  58. .PP
  59. Each message and attachment directory contains the files:
  60. .TP 1.4i
  61. .B body
  62. .PD 0
  63. the message minus the RFC822 style headers
  64. .TP
  65. .B cc
  66. the address(es) from the CC: header
  67. .TP
  68. .B date
  69. the date in the message, or if none, the time of delivery
  70. .TP
  71. .B digest
  72. an SHA1 digest of the message contents
  73. .TP
  74. .B disposition
  75. .B inline
  76. or
  77. .B file
  78. .TP
  79. .B filename
  80. a name to use to file an attachment
  81. .TP
  82. .B from
  83. the from address in the From: header, or if none,
  84. the address on the envelope.
  85. .TP
  86. .B header
  87. the RFC822 headers
  88. .TP
  89. .B info
  90. described below, essentially a summary of the header info
  91. .TP
  92. .B inreplyto
  93. contents of the
  94. .B in-reply-to:
  95. header
  96. .TP
  97. .B mimeheader
  98. the mime headers
  99. .TP
  100. .B raw
  101. the undecoded MIME message
  102. .TP
  103. .B rawbody
  104. the undecoded message body
  105. .TP
  106. .B rawheader
  107. the undecoded message header
  108. .TP
  109. .B replyto
  110. the address to send any replies to.
  111. .TP
  112. .B subject
  113. the contents of the subject line
  114. .TP
  115. .B to
  116. the address(es) from the To: line.
  117. .TP
  118. .B type
  119. the MIME content type
  120. .TP
  121. .B unixheader
  122. the envelope header from the mailbox
  123. .PD
  124. .PP
  125. The
  126. .B info
  127. file contains the following information, one item per line. Lists
  128. of addresses are single-space separated.
  129. .LP
  130. .2C
  131. .PD 0
  132. .LP
  133. .TP 2i
  134. .I "sender address
  135. .TP
  136. .I "recipient addresses
  137. .TP
  138. .I "cc addresses
  139. .TP
  140. .I "reply address
  141. .TP
  142. .I "envelope date
  143. .TP
  144. .I "subject
  145. .TP
  146. .I "MIME content type
  147. .TP
  148. .I "MIME disposition
  149. .TP
  150. .I filename
  151. .TP
  152. .I "SHA1 digest
  153. .TP
  154. .I "bcc addresses
  155. .TP
  156. .I "in-reply-to: contents
  157. .TP
  158. .I "RFC822 date
  159. .TP
  160. .I "message senders
  161. .TP
  162. .I "message id
  163. .TP
  164. .I "number of lines in body
  165. .LP
  166. .1C
  167. .PD
  168. .PP
  169. Deleting message directories causes the message to be removed from
  170. the mailbox.
  171. .PP
  172. The mailbox is reread and the structure updated
  173. whenever the mailbox changes. Message directories are
  174. not renumbered.
  175. .PP
  176. The file
  177. .B /mail/fs/ctl
  178. is used to direct
  179. .I fs
  180. to open/close new mailboxes or to delete groups of messages atomically.
  181. The messages that can be written to this file are:
  182. .TF "delete\fI mboxname number ...\fP
  183. .TP
  184. .BI open " path mboxname"
  185. opens a new mailbox.
  186. .I path
  187. is the file to open, and
  188. .I mboxname
  189. is the name that appears under
  190. .BR /mail/fs .
  191. .TP
  192. .BI close " mboxname"
  193. close
  194. .IR mboxname .
  195. The close takes affect only after all files open under
  196. .BI /mail/fs/ mboxname
  197. have been closed.
  198. .TP
  199. .BI delete " mboxname number ..."
  200. Delete the messages with the given numbers from
  201. .IR mboxname.
  202. .PD
  203. .PP
  204. The options are:
  205. .TF "-f\fI file
  206. .TP
  207. .BI -f file
  208. use
  209. .I file
  210. as the mailbox instead of the default,
  211. .BI /mail/box/ username /mbox.
  212. .PD 0
  213. .TP
  214. .B -b
  215. stands for biffing. Each time new mail
  216. is received, a message is printed to standard
  217. output containing the sender address, subject,
  218. and number of bytes. It is intended for
  219. people telnetting in who want mail announcements.
  220. .TP
  221. .B -n
  222. Don't open a mailbox initially. Overridden by -f.
  223. .TP
  224. .B -p
  225. turn off plumbing. Unless this is specified,
  226. .I fs
  227. sends a message to the plumb port,
  228. .BR seemail ,
  229. from source
  230. .B mailfs
  231. for each message received or deleted.
  232. The message contains the attributes
  233. .BI sender= "<contents of " from " file>,"
  234. .BR filetype=mail ,
  235. .BR "mailtype=deleted\fI or \fPnew" ,
  236. and
  237. .BI length= "<message length in bytes>."
  238. The contents of the message is the full path
  239. name of the directory representing the message.
  240. .TP
  241. .B -s
  242. causes
  243. .I fs
  244. to post itself in
  245. .B /srv
  246. with a name of the form
  247. .BI /srv/upasfs. user.
  248. .TP
  249. .B -m
  250. specifies a mount point other than
  251. .BR /mail/fs .
  252. .PD
  253. .PP
  254. .I Fs
  255. will exit once all references to its directory
  256. have disappeared.
  257. .PP
  258. .I Fs
  259. interprets mailbox file names of the form
  260. .BI / proto / host / user
  261. to mean access an account on
  262. .I host
  263. using the given protocol.
  264. Authentication is delegated to
  265. .IR factotum (4).
  266. The final
  267. .BI / user
  268. may be omitted, in which case
  269. the user name is gleaned from the key held by
  270. .IR factotum .
  271. The following protocols are supported:
  272. .PP
  273. .TF apoptls
  274. .TP
  275. .B pop
  276. cleartext POP with password authentication
  277. .TP
  278. .B apop
  279. cleartext POP with challenge-response (APOP) authentication
  280. .TP
  281. .B pops
  282. .TP
  283. .B poptls
  284. TLS-encrypted POP with password authentication
  285. .TP
  286. .B apops
  287. .TP
  288. .B apoptls
  289. TLS-encrypted POP with challenge-response (APOP) authentication
  290. .TP
  291. .B imap
  292. cleartext IMAP
  293. .TP
  294. .B imaps
  295. TLS-encrypted IMAP
  296. .PD
  297. .PP
  298. The two IMAP protocols allow an optional fourth field
  299. specifying a mailbox name, for example
  300. .BR /imap/server/user/stored .
  301. .PP
  302. .B Poptls
  303. and
  304. .B apoptls
  305. connect to port 110 in plaintext and start TLS using the POP
  306. STLS command.
  307. .B Pops
  308. and
  309. .B apops
  310. connect to port 995 and start TLS before initiating the POP conversation.
  311. .B Imaps
  312. connects to port 993 and starts TLS before initiating the IMAP conversation.
  313. There should probably be an
  314. .B imaptls
  315. protocol as well.
  316. .RB ( Imaptls
  317. would connect to port 143 in plaintext and start TLS using the IMAP
  318. STARTTLS command.
  319. (That's the nice thing about standards\(emthere's so many to choose from.))
  320. .SH FILES
  321. .TF /mail/box/*/dead.letter
  322. .TP
  323. .B /mail/box/*
  324. mail directories
  325. .TP
  326. .B /mail/box/*/mbox
  327. mailbox files
  328. .TP
  329. .B /mail/box/*/L.reading
  330. mutual exclusion lock for multiple mbox readers
  331. .TP
  332. .B /mail/box/*/L.mbox
  333. mutual exclusion lock for altering mbox
  334. .br
  335. .ne 3
  336. .SH SOURCE
  337. .B /sys/src/cmd/upas/fs
  338. .br
  339. .B /rc/bin/startupasfs
  340. .SH "SEE ALSO"
  341. .IR aliasmail (8),
  342. .IR faces (1),
  343. .IR filter (1),
  344. .IR mail (1),
  345. .IR marshal (1),
  346. .IR mlmgr (1),
  347. .IR nedmail (1),
  348. .IR qer (8),
  349. .IR rewrite (6),
  350. .IR send (8),
  351. .IR upasfs (4)