upasfs 6.1 KB

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