?? mbox.5
字號(hào):
.TH mbox 5.SH "NAME"mbox \- file containing mail messages.SH "INTRODUCTION"The most common format for storage of mail messages is.I mboxformat.An.I mboxis a single file containing zero or more mail messages..SH "MESSAGE FORMAT"A message encoded in.I mboxformat begins with a.B From_line, continues with a series of.B \fRnon-\fBFrom_lines,and ends with a blank line.A.B From_line means any line that begins with the charactersF, r, o, m, space:.EX From god@heaven.af.mil Sat Jan 3 01:05:34 1996.br Return-Path: <god@heaven.af.mil>.br Delivered-To: djb@silverton.berkeley.edu.br Date: 3 Jan 1996 01:05:34 -0000.br From: God <god@heaven.af.mil>.br To: djb@silverton.berkeley.edu (D. J. Bernstein).br.br How's that mail system project coming along?.br.EEThe final line is a completely blank line (no spaces or tabs).Notice that blank lines may also appear elsewhere in the message.The.B From_line always looks like.B From.I envsender.I date.IR moreinfo ..I envsenderis one word, without spaces or tabs;it is usually the envelope sender of the message..I dateis the delivery date of the message.It always contains exactly 24 characters in.B asctimeformat..I moreinfois optional; it may contain arbitrary information.Between the.B From_line and the blank line is a message in RFC 822 format,as described in.BR qmail-header(5) ,subject to.B >From quotingas described below..SH "HOW A MESSAGE IS DELIVERED"Here is how a program appends a message to an.I mboxfile.It first creates a.B From_line given the message's envelope sender and the current date.If the envelope sender is empty (i.e., if this is a bounce message),the program uses.B MAILER-DAEMONinstead.If the envelope sender contains spaces, tabs, or newlines,the program replaces them with hyphens.The program then copies the message, applying.B >From quotingto each line..B >From quotingensures that the resulting lines are not.B From_lines:the program prepends a.B >to any.B From_line,.B >From_line,.B >>From_line,.B >>>From_line,etc.Finally the program appends a blank line to the message.If the last line of the message was a partial line,it writes two newlines;otherwise it writes one..SH "HOW A MESSAGE IS READ"A reader scans through an.I mboxfile looking for.B From_lines.Any.B From_line marks the beginning of a message.The reader should not attempt to take advantage of the fact that every.B From_line (past the beginning of the file)is preceded by a blank line.Once the reader finds a message,it extracts a (possibly corrupted) envelope senderand delivery date out of the.B From_line.It then reads until the next.B From_line or end of file, whichever comes first.It strips off the final blank lineanddeletes thequoting of.B >From_lines and.B >>From_lines and so on.The result is an RFC 822 message..SH "COMMON MBOX VARIANTS"There are many variants of.I mboxformat.The variant described above is.I mboxrdformat, popularized by Rahul Dhesi in June 1995.The original.I mboxoformat quotes only.B From_lines, not.B >From_lines.As a result it is impossible to tell whether.EX From: djb@silverton.berkeley.edu (D. J. Bernstein).br To: god@heaven.af.mil.br.br >From now through August I'll be doing beta testing..br Thanks for your interest..EEwas quoted in the original message.An.I mboxrdreader will always strip off the quoting..I mboxclformat is like.I mboxoformat, but includes a Content-Length field with the number of bytes in the message..I mboxcl2format is like.I mboxclbut has no.B >Fromquoting.These formats are used by SVR4 mailers..I mboxcl2cannot be read safely by.I mboxrdreaders..SH "UNSPECIFIED DETAILS"There are many locking mechanisms for.I mboxfiles..B qmail-localalways uses.B flockon systems that have it, otherwise.BR lockf .The delivery date in a.B From_line does not specify a time zone..B qmail-localalways creates the delivery date in GMTso that .I mboxfiles can be safely transported from one time zone to another.If the mtime on a nonempty .I mboxfile is greater than the atime,the file has new mail.If the mtime is smaller than the atime,the new mail has been read.If the atime equals the mtime,there is no way to tell whether the file has new mail,since.B qmail-localtakes much less than a second to run.One solution is for a mail reader to artificially set theatime to the mtime plus 1.Then the file has new mail if and only if the atime isless than or equal to the mtime.Some mail readers place.B Statusfields in each message to indicate which messages have been read..SH "SEE ALSO"maildir(5),qmail-header(5),qmail-local(8)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -