From 5ef4e933302b0b325185013d351ffa78402d3c5c Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 6 Feb 2013 00:49:23 +0100 Subject: [PATCH] rename mbox.5 + fix-manpages --- FILES | 3 +- Makefile | 16 ++-- TARGETS | 3 +- maildir.5 | 2 +- mbox.5 | 235 ----------------------------------------------------------- preline.1 | 2 +- qmail-mbox.5 | 235 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 245 insertions(+), 251 deletions(-) delete mode 100644 mbox.5 create mode 100644 qmail-mbox.5 diff --git a/FILES b/FILES index bbf25c2..b167843 100644 --- a/FILES +++ b/FILES @@ -66,7 +66,7 @@ maildir2mbox.1 maildirmake.1 maildirwatch.1 mailsubj.1 -mbox.5 +qmail-mbox.5 preline.1 qbiff.1 qmail-clean.8 @@ -428,6 +428,5 @@ trysalen.c maildir.5 maildir.h maildir.c -tcp-environ.5 constmap.h constmap.c diff --git a/Makefile b/Makefile index aef981f..1483434 100644 --- a/Makefile +++ b/Makefile @@ -970,12 +970,12 @@ qmail-smtpd.0 tcp-env.0 qmail-newmrh.0 qreceipt.0 qbiff.0 forward.0 \ preline.0 condredirect.0 bouncesaying.0 except.0 maildirmake.0 \ maildir2mbox.0 maildirwatch.0 qmail.0 qmail-limits.0 qmail-log.0 \ qmail-control.0 qmail-header.0 qmail-users.0 dot-qmail.0 \ -qmail-command.0 tcp-environ.0 maildir.0 mbox.0 addresses.0 \ +qmail-command.0 maildir.0 qmail-mbox.0 addresses.0 \ envelopes.0 forgeries.0 -mbox.0: \ -mbox.5 - nroff -man mbox.5 > mbox.0 +qmail-mbox.0: \ +qmail-mbox.5 + nroff -man qmail-mbox.5 > qmail-mbox.0 myctime.o: \ compile myctime.c datetime.h fmt.h myctime.h @@ -1851,7 +1851,7 @@ auto_spawn.h chkspawn.c conf-split auto_split.h conf-patrn \ auto_patrn.h conf-users conf-groups auto_uids.h auto_usera.h extra.h \ addresses.5 except.1 bouncesaying.1 condredirect.1 dot-qmail.9 \ envelopes.5 forgeries.7 forward.1 maildir2mbox.1 maildirmake.1 \ -maildirwatch.1 mailsubj.1 mbox.5 preline.1 qbiff.1 qmail-clean.8 \ +maildirwatch.1 mailsubj.1 qmail-mbox.5 preline.1 qbiff.1 qmail-clean.8 \ qmail-command.8 qmail-control.9 qmail-getpw.9 qmail-header.5 \ qmail-inject.8 qmail-limits.9 qmail-local.8 qmail-log.5 \ qmail-lspawn.8 qmail-newmrh.9 qmail-newu.9 qmail-pop3d.8 \ @@ -1914,7 +1914,7 @@ date822fmt.h date822fmt.c dns.h dns.c trylsock.c tryrsolv.c ip.h ip.c \ ipalloc.h ipalloc.c select.h1 select.h2 trysysel.c ndelay.h ndelay.c \ ndelay_off.c direntry.3 direntry.h1 direntry.h2 trydrent.c prot.h \ prot.c chkshsgr.c warn-shsgr tryshsgr.c ipme.h ipme.c trysalen.c \ -maildir.5 maildir.h maildir.c tcp-environ.5 constmap.h constmap.c \ +maildir.5 maildir.h maildir.c constmap.h constmap.c \ update_tmprsadh shar -m `cat FILES` > shar chmod 400 shar @@ -2170,10 +2170,6 @@ compile tcp-env.c sig.h stralloc.h gen_alloc.h str.h env.h fmt.h \ scan.h subgetopt.h ip.h dns.h byte.h remoteinfo.h exit.h case.h ./compile tcp-env.c -tcp-environ.0: \ -tcp-environ.5 - nroff -man tcp-environ.5 > tcp-environ.0 - tcpto.o: \ compile tcpto.c tcpto.h open.h lock.h seek.h now.h datetime.h ip.h \ byte.h datetime.h readwrite.h diff --git a/TARGETS b/TARGETS index 27706f3..f5a5bbe 100644 --- a/TARGETS +++ b/TARGETS @@ -393,9 +393,8 @@ qmail-users.0 dot-qmail.5 dot-qmail.0 qmail-command.0 -tcp-environ.0 maildir.0 -mbox.0 +qmail-mbox.0 addresses.0 envelopes.0 forgeries.0 diff --git a/maildir.5 b/maildir.5 index 5da9573..31d7ff8 100644 --- a/maildir.5 +++ b/maildir.5 @@ -235,5 +235,5 @@ use the environment variable as the name of the user's primary mail directory. .SH "SEE ALSO" -mbox(5), +qmail-mbox(5), qmail-local(8) diff --git a/mbox.5 b/mbox.5 deleted file mode 100644 index de1f837..0000000 --- a/mbox.5 +++ /dev/null @@ -1,235 +0,0 @@ -.TH mbox 5 -.SH "NAME" -mbox \- file containing mail messages -.SH "INTRODUCTION" -The most common format for storage of mail messages is -.I mbox -format. -An -.I mbox -is a single file containing zero or more mail messages. -.SH "MESSAGE FORMAT" -A message encoded in -.I mbox -format 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 characters -F, r, o, m, space: - -.EX - From god@heaven.af.mil Sat Jan 3 01:05:34 1996 -.br - Return-Path: -.br - Delivered-To: djb@silverton.berkeley.edu -.br - Date: 3 Jan 1996 01:05:34 -0000 -.br - From: God -.br - To: djb@silverton.berkeley.edu (D. J. Bernstein) -.br - -.br - How's that mail system project coming along? -.br - -.EE - -The 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 envsender -is one word, without spaces or tabs; -it is usually the envelope sender of the message. -.I date -is the delivery date of the message. -It always contains exactly 24 characters in -.B asctime -format. -.I moreinfo -is 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 quoting -as described below. -.SH "HOW A MESSAGE IS DELIVERED" -Here is how a program appends a message to an -.I mbox -file. - -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-DAEMON -instead. -If the envelope sender contains spaces, tabs, or newlines, -the program replaces them with hyphens. - -The program then copies the message, applying -.B >From quoting -to each line. -.B >From quoting -ensures 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 mbox -file 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 sender -and 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 line -and -deletes the -quoting 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 mbox -format. -The variant described above is -.I mboxrd -format, popularized by Rahul Dhesi in June 1995. - -The original -.I mboxo -format 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. -.EE - -was quoted in the original message. -An -.I mboxrd -reader will always strip off the quoting. - -.I mboxcl -format is like -.I mboxo -format, but includes a Content-Length field with the -number of bytes in the message. -.I mboxcl2 -format is like -.I mboxcl -but has no -.B >From -quoting. -These formats are used by SVR4 mailers. -.I mboxcl2 -cannot be read safely by -.I mboxrd -readers. -.SH "UNSPECIFIED DETAILS" -There are many locking mechanisms for -.I mbox -files. -.B qmail-local -always uses -.B flock -on systems that have it, otherwise -.BR lockf . - -The delivery date in a -.B From_ -line does not specify a time zone. -.B qmail-local -always creates the delivery date in GMT -so that -.I mbox -files can be safely transported from one time zone to another. - -If the mtime on a nonempty -.I mbox -file 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-local -takes much less than a second to run. -One solution is for a mail reader to artificially set the -atime to the mtime plus 1. -Then the file has new mail if and only if the atime is -less than or equal to the mtime. - -Some mail readers place -.B Status -fields in each message to indicate which messages have been read. -.SH "SEE ALSO" -maildir(5), -qmail-header(5), -qmail-local(8) diff --git a/preline.1 b/preline.1 index 69a757c..946c86d 100644 --- a/preline.1 +++ b/preline.1 @@ -53,5 +53,5 @@ Do not include the .B Return-Path line. .SH "SEE ALSO" -mbox(5), +qmail-mbox(5), qmail-command(8) diff --git a/qmail-mbox.5 b/qmail-mbox.5 new file mode 100644 index 0000000..05dd737 --- /dev/null +++ b/qmail-mbox.5 @@ -0,0 +1,235 @@ +.TH qmail-mbox 5 +.SH "NAME" +mbox \- file containing mail messages +.SH "INTRODUCTION" +The most common format for storage of mail messages is +.I mbox +format. +An +.I mbox +is a single file containing zero or more mail messages. +.SH "MESSAGE FORMAT" +A message encoded in +.I mbox +format 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 characters +F, r, o, m, space: + +.EX + From god@heaven.af.mil Sat Jan 3 01:05:34 1996 +.br + Return-Path: +.br + Delivered-To: djb@silverton.berkeley.edu +.br + Date: 3 Jan 1996 01:05:34 -0000 +.br + From: God +.br + To: djb@silverton.berkeley.edu (D. J. Bernstein) +.br + +.br + How's that mail system project coming along? +.br + +.EE + +The 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 envsender +is one word, without spaces or tabs; +it is usually the envelope sender of the message. +.I date +is the delivery date of the message. +It always contains exactly 24 characters in +.B asctime +format. +.I moreinfo +is 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 quoting +as described below. +.SH "HOW A MESSAGE IS DELIVERED" +Here is how a program appends a message to an +.I mbox +file. + +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-DAEMON +instead. +If the envelope sender contains spaces, tabs, or newlines, +the program replaces them with hyphens. + +The program then copies the message, applying +.B >From quoting +to each line. +.B >From quoting +ensures 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 mbox +file 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 sender +and 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 line +and +deletes the +quoting 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 mbox +format. +The variant described above is +.I mboxrd +format, popularized by Rahul Dhesi in June 1995. + +The original +.I mboxo +format 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. +.EE + +was quoted in the original message. +An +.I mboxrd +reader will always strip off the quoting. + +.I mboxcl +format is like +.I mboxo +format, but includes a Content-Length field with the +number of bytes in the message. +.I mboxcl2 +format is like +.I mboxcl +but has no +.B >From +quoting. +These formats are used by SVR4 mailers. +.I mboxcl2 +cannot be read safely by +.I mboxrd +readers. +.SH "UNSPECIFIED DETAILS" +There are many locking mechanisms for +.I mbox +files. +.B qmail-local +always uses +.B flock +on systems that have it, otherwise +.BR lockf . + +The delivery date in a +.B From_ +line does not specify a time zone. +.B qmail-local +always creates the delivery date in GMT +so that +.I mbox +files can be safely transported from one time zone to another. + +If the mtime on a nonempty +.I mbox +file 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-local +takes much less than a second to run. +One solution is for a mail reader to artificially set the +atime to the mtime plus 1. +Then the file has new mail if and only if the atime is +less than or equal to the mtime. + +Some mail readers place +.B Status +fields in each message to indicate which messages have been read. +.SH "SEE ALSO" +maildir(5), +qmail-header(5), +qmail-local(8) -- cgit v1.2.3