From: Shantonu Sen Date: Sat, 6 Jan 2001 23:38:12 +0000 (+0000) Subject: mh_tailor-mhbuild X-Git-Tag: RELEASE_1_2~148 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=926ece166ba6ea4bd421c163917172b04b9e3bbb;p=mmh mh_tailor-mhbuild --- diff --git a/man/mh-tailor.man b/man/mh-tailor.man index f1d0f65..4304dc8 100644 --- a/man/mh-tailor.man +++ b/man/mh-tailor.man @@ -2,220 +2,298 @@ .\" %nmhwarning% .\" $Id$ .\" -.\" include the -mh macro file -.so %etcdir%/tmac.h -.\" .TH MH-TAILOR %manext5% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME mh-tailor, mts.conf \- mail transport customization for nmh message handler - .SH SYNOPSIS -.in +.5i -.ti -.5i -\fI%etcdir%/mts.conf\fP -.in -.5i +.I %etcdir%/mts.conf .SH DESCRIPTION -The file %etcdir%/mts.conf defines run-time options for those \fInmh\fR +The file +.I %etcdir%/mts.conf +defines run-time options for those +.B nmh programs which interact (in some form) with the message transport system. -At present, these (user) programs are: \fIap\fR, \fIconflict\fR, -\fIinc\fR, \fImsgchk\fR, \fImsh\fR, \fIpost\fR, \fIrcvdist\fR, and -\fIrcvpack\fR. - +At present, these (user) programs are: +.BR ap , +.BR conflict , +.BR inc , +.BR msgchk , +.BR msh , +.BR post , +.BR rcvdist , +and +.BR rcvpack . +.PP Each option should be given on a single line. Blank lines and lines which begin with `#' are ignored. The options available along with default values and a description of their meanings are listed below: - -.in +.5i -.ti -.5i -mts: -.br -The mail transport method to use. The two acceptable options are \fBsmtp\fP -(which is the default), and \fBsendmail\fP. - -If you use \fBsmtp\fP, this will enable a direct SMTP (simple mail transport -protocol) interface in \fInmh\fR. When sending mail, instead of passing the -message to the mail transport agent, \fIpost\fR will open a socket connection -to the mail port on the machine specified in the \fIservers\fR entry. - -If you use \fBsendmail\fP, then \fIpost\fR will send messages by forking a -local copy of sendmail. Currently it will still speak SMTP with this local -copy of sendmail. - -.ti -.5i -localname: -.br -The hostname \fInmh\fR considers local. It should typically be a fully +.PP +.BR mts : +.RS 5 +The mail transport method to use. The two acceptable options are +.B smtp +(which is the default), and +.BR sendmail . +.PP +If you use +.BR smtp , +this will enable a direct SMTP (simple mail transport +protocol) interface in +.BR nmh . +When sending mail, instead of passing the +message to the mail transport agent, +.B post +will open a socket connection +to the mail port on the machine specified in the +.B servers +entry. +.PP +If you use +.BR sendmail , +then +.B post +will send messages by forking a +local copy of +.BR sendmail . +Currently it will still speak SMTP with this local +copy of +.BR sendmail . +.RE +.PP +.BR localname : +.RS 5 +The hostname +.B nmh +considers local. It should typically be a fully qualified hostname. If this is not set, depending on the version of -UNIX you're running, \fInmh\fR will query the system for this value -(e.g., uname, gethostname, etc.), and attempt to fully qualify this +UNIX you're running, +.B nmh +will query the system for this value +(e.g. uname, gethostname, etc.), and attempt to fully qualify this value. - +.PP If you are using POP to retrieve new messages, you may want to set this value to the name of the POP server, so that outgoing message appear to have originated on the POP server. - -.ti -.5i -localdomain: -.br +.RE +.PP +.BR localdomain : +.RS 5 If this is set, a `.' followed by this string will be appended to your hostname. - -This should only be needed, if for some reason \fInmh\fR is not able to -fully qualify the hostname returned by the system (e.g., uname, +.PP +This should only be needed, if for some reason +.B nmh +is not able to +fully qualify the hostname returned by the system (e.g. uname, gethostname, etc.). - -.ti -.5i -clientname: -.br -This option specifies the host name that \fInmh\fP will give in the -SMTP \fBHELO\fP (and \fBEHLO\fP) command, when posting mail. If not -set, the default is to use the host name that \fInmh\fR considers local -(see \*(lqlocalname\*(rq above). If this option is set, but empty, no -\fBHELO\fP command will be given. - -.sp -Although the \fBHELO\fP command is required by RFC\-821, many SMTP servers -do not require it. Early versions of SendMail will fail if the hostname -given in the \fBHELO\fP command is the local host. Later versions of -SendMail will complain if you omit the \fBHELO\fP command. If you run -SendMail, find out what your system expects and set this field if needed. - -.ti -.5i -systemname: -.br +.RE +.PP +.BR clientname : +.RS 5 +This option specifies the host name that +.B nmh +will give in the +SMTP +.B HELO +(and +.BR EHLO ) +command, when posting mail. If not +set, the default is to use the host name that +.B nmh +considers local +(see +.B localname +above). If this option is set, but empty, no +.B HELO +command will be given. +.PP +Although the +/B HELO +command is required by RFC\-821, many SMTP servers +do not require it. Early versions of +.I SendMail +will fail if the hostname +given in the +.B HELO +command is the local host. Later versions of +.I SendMail +will complain if you omit the +.B HELO +command. If you run +.IR SendMail , +find out what your system expects and set this field if needed. +.RE +.PP +.BR systemname : +.RS 5 This option is only used for UUCP mail. It specifies the name of the -local host in the \fIUUCP\fR \*(lqdomain\*(rq. If not set, depending -on the version of UNIX you're running, \fInmh\fR will query the system -for this value. This has no equivalent in the \fInmh\fR configuration +local host in the UUCP \*(lqdomain\*(rq. If not set, depending +on the version of UNIX you're running, +.B nmh +will query the system +for this value. This has no equivalent in the +.B nmh +configuration file. - -.ti -.5i -mmdfldir: %mailspool% -.br +.RE +.PP +.BR mmdfldir : +%mailspool% +.RS 5 The directory where maildrops are kept. If this option is set, but empty, the user's home directory is used. This overrides the default value chosen at the time of compilation. - -.ti -.5i -mmdflfil: -.br +.RE +.PP +.BR mmdflfil : +.RS 5 The name of the maildrop file in the directory where maildrops are kept. If this is empty, the user's login name is used. This overrides the default value (which is empty). - -.ti -.5i -mmdelim1: \\001\\001\\001\\001\\n -.br +.RE +.PP +.BR mmdelim1 : +\&\\001\\001\\001\\001\\n +.RS 5 The beginning-of-message delimiter for maildrops. - -.ti -.5i -mmdelim2: \\001\\001\\001\\001\\n -.br +.RE +.PP +.BR mmdelim2 : +\&\\001\\001\\001\\001\\n +.RS 5 The end-of-message delimiter for maildrops. - -.ti -.5i -masquerade: -.br +.RE +.PP +.BR masquerade: +.RS 5 This directive controls three different types of email address masquerading. The three possible values, which may be specified in any combination on the -line, separated by spaces, are "draft_from", "mmailid", and -"username_extension". - -"mmailid" was the only type of masquerading in the original MH package, and -apparently stands for "masquerade mail identification". This type of +line, separated by spaces, are \*(lqdraft_from\*(rq, \*(lqmmailid\*(rq, and +\*(lqusername_extension\*(rq. +.PP +\*(lqmmailid\*(rq was the only type of masquerading in the original MH package, and +apparently stands for \*(lqmasquerade mail identification\*(rq. This type of masquerading keys off of the GECOS field of the passwd file. When enabled, -\fInmh\fR will check if the user's pw_gecos field in the passwd file is of the +.B nmh +will check if the user's pw_gecos field in the passwd file is of the form: - -.ti +.5i +.PP +.RS 5 Full Name - -If it is, the internal \fInmh\fR routines that find the username and full name -of that user will return "fakeusername" and "Full Name" respectively. This is +.RE +.PP +If it is, the internal +.B nmh +routines that find the username and full name +of that user will return \*(lqfakeusername\*(rq and \*(lqFull Name\*(rq respectively. This is useful if you want the messages you send to always appear to come from the name of an MTA alias rather than your actual account name. For instance, many -organizations set up "First.Last" sendmail aliases for all users. If this is +organizations set up \*(lqFirst.Last\*(rq sendmail aliases for all users. If this is the case, the GECOS field for each user should look like: - -.ti +.5i +.PP +.RS 5 First [Middle] Last - -"username_extension", when specified on the "masquerade:" line, allows a second -type of username masquerading. If the user sets the \fB$USERNAME_EXTENSION\fR +.RE +.PP +\*(lqusername_extension\*(rq, when specified on the \*(lqmasquerade:\*(rq line, allows a second +type of username masquerading. If the user sets the +.B $USERNAME_EXTENSION environment variable, its value will be appended to the actual login name. For -instance, if I am dan@company.com, and I set \fB$USERNAME_EXTENSION\fR to -"\-www", my mail will appear to come from "dan\-www@company.com". This is meant -to interact with qmail's "user\-extension" feature, where mail sent to -\fIuser\fR\-\fIstring\fR will be delivered to \fIuser\fR. Likewise, those using -versions of sendmail for which "plussed user" processing is active can set -\fB$USERNAME_EXTENSION\fR to "+\fIstring\fR". These MTA features are useful +instance, if I am \*(lqdan@company.com\*(rq, and I set +.B $USERNAME_EXTENSION +to \*(lq\-www\*(rq, my mail will appear to come from \*(lqdan\-www@company.com\*(rq. This is meant +to interact with qmail's \*(lquser\-extension\*(rq feature, where mail sent to +.IR user \- string +will be delivered to +.IR user . +Likewise, those using +versions of sendmail for which \*(lqplussed user\*(rq processing is active can set +.B $USERNAME_EXTENSION +to \*(lq+\fIstring\fR\*(rq. These MTA features are useful because they allow one to use different email addresses in different situations (to aid in automatic mail filtering or in determining where spammers got one's address) while only actually having a single account. Note that -\fB$USERNAME_EXTENSION\fR is only appended to the username when \fIpost\fR is -generating "[Resent\-]From:" lines and the SMTP envelope "From:". \fIinc\fR, -for instance, will not try to read from a maildrop file called "dan\-www" (to +.B $USERNAME_EXTENSION +is only appended to the username when \fIpost\fR is +generating \*(lq[Resent\-]From:\*(rq lines and the SMTP envelope +\*(lqFrom:\*(rq. +.BR inc , +for instance, will not try to read from a maildrop file called \*(lqdan\-www\*(rq (to recall the earlier example). - -"draft_from" controls the most powerful type of address masquerading. Normally, -when a user explicitly specifies a "From:" header in a draft, \fInmh\fR uses it +.PP +\*(lqdraft_from\*(rq controls the most powerful type of address masquerading. Normally, +when a user explicitly specifies a \*(lqFrom:\*(rq header in a draft, +.B nmh +uses it rather than constructing its own. However, to discourage email forgery, the -SMTP envelope "From:" and a "Sender:" header are set to the user's real address. -When "draft_from" is turned on, though, the envelope "From:" will use the -address specified in the draft, and there will be no "Sender:" header. This is -useful when a user wants to pretend to be sending mail "directly" from a remote -POP3 account, or when remote mail robots incorrectly use the envelope "From:" in -preference to the body "From:" (or refuse to take action when the two don't +SMTP envelope \*(lqFrom:\*(rq and a \*(lqSender:\*(rq header are set to the user's real address. +When \*(lqdraft_from\*(rq is turned on, though, the envelope \*(lqFrom:\*(rq will use the +address specified in the draft, and there will be no \*(lqSender:\*(rq header. This is +useful when a user wants to pretend to be sending mail \*(lqdirectly\*(rq from a remote +POP3 account, or when remote mail robots incorrectly use the envelope \*(lqFrom:\*(rq in +preference to the body \*(lqFrom:\*(rq (or refuse to take action when the two don't match). Note that the MTA may still reveal the user's real identity (e.g. -sendmail's "X\-Authentication\-Warning:" header). - -.ti -.5i -maildelivery: %libdir%/maildelivery -.br -The name of the system-wide default \fI\&.maildelivery\fR file. -See \fIslocal\fR\0(1) for the details. - -.ti -.5i -everyone: 200 -.br +.BR sendmail 's +\*(lqX\-Authentication\-Warning:\*(rq header). +.RE +.PP +.BR maildelivery : +%libdir%/maildelivery +.RS 5 +The name of the system-wide default +.I maildelivery +file. +See +.BR slocal (1) +for the details. +.RE +.PP +.BR everyone : +200 +.RS 5 The highest user-id which should NOT receive mail addressed to \*(lqeveryone\*(rq. - -.ti -.5i -noshell: -.br +.RE +.PP +.BR noshell : +.RS 5 If set, then each user-id greater than \*(lqeveryone\*(rq that has a login shell equivalent to the given value (e.g., \*(lq/bin/csh\*(rq) indicates that mail for \*(lqeveryone\*(rq should not be sent to them. This is useful for handling admin, dummy, and guest logins. - -.in -.5i -.Uh "SMTP support" -These options are only available if you set \fImts\fR to \fBsmtp\fP. - -.in +.5i -.ti -.5i -hostable: %etcdir%/hosts -.br -The exceptions file for /etc/hosts used by \fIpost\fR to try to find +.RE +.SS "SMTP support" +These options are only available if you set +.B mts +to +.BR smtp . +.PP +.BR hostable : +%etcdir%/hosts +.RS 5 +The exceptions file for /etc/hosts used by +.B post +to try to find official names. The format of this file is quite simple: - -.in +.5i -1. Comments are surrounded by sharp (`#') and newline. -.br -2. Words are surrounded by white space. -.br -3. The first word on the line is the official name of a host. -.br -4. All words following the official names are aliases for that host. -.in -.5i - -.ti -.5i -servers: localhost \\01localnet -.br +.PP +.IP 1. 4 +Comments are surrounded by sharp (`#') and newline. +.IP 2. 4 +Words are surrounded by white space. +.IP 3. 4 +The first word on the line is the official name of a host. +.IP 4. 4 +All words following the official names are aliases for that host. +.RE +.PP +.BR servers : +localhost \\01localnet +.RS 5 A lists of hosts and networks which to look for SMTP servers when posting local mail. It turns out this is a major win for hosts which -don't run an message transport system. The value of \*(lqservers\*(rq +don't run an message transport system. The value of +.B servers should be one or more items. Each item is the name of either a host or a net (in the latter case, precede the name of the net by a \\01). This list is searched when looking for a smtp server to post mail. @@ -223,114 +301,130 @@ If a host is present, the SMTP port on that host is tried. If a net is present, the SMTP port on each host in that net is tried. Note that if you are running with the BIND code, then any networks specified are ignored (sorry, the interface went away under BIND). - -.in -.5i -.Uh "SendMail" -This option is only available if you set \fImts\fR to \fBsendmail\fP. - -.in +.5i -.ti -.5i -sendmail: %sendmailpath% -.br -The pathname to the \fIsendmail\fR program. - -.in -.5i -.Uh "Post Office Protocol" -This option is only available if you have compiled \fInmh\fP with POP -support enabled (i.e., \*(lq--enable-pop\*(rq). - -.in +.5i -.ti -.5i -pophost: -.br +.SS "SendMail" +This option is only available if you set +.B mts +to +.BR sendmail . +.PP +.BR sendmail : +%sendmailpath% +.RS 5 +The pathname to the +.B sendmail +program. +.RE +.SS "Post Office Protocol" +This option is only available if you have compiled +.B nmh +with POP support enabled (i.e., \*(lq--enable-pop\*(rq). +.PP +.BR pophost : +.RS 5 The name of the default POP service host. If this is not set, then -\fInmh\fR looks in the standard maildrop areas for waiting mail, otherwise +.B nmh +looks in the standard maildrop areas for waiting mail, otherwise the named POP service host is consulted. - -.in -.5i -.Uh "BBoards Delivery" -This option is only available if you compiled \fInmh\fP with -\*(lqbbdelivery:\ on\*(rq. - -.in +.5i -.ti -.5i -bbdomain: -.br -The local BBoards domain (a UCI hack). - -.in -.5i -.Uh "BBoards & The POP" -These options are only available if you compiled \fInmh\fP with -\*(lqbboards:\ pop\*(rq and \*(lqpop:\ on\*(rq. - -.in +.5i -.ti -.5i -popbbhost: -.br -The POP service host which also acts as a BBoard server. This variable -should be set on the POP BBoards client host. - -.ti -.5i -popbbuser: -.br -The guest account on the POP/BB service host. This should be a different -login ID than either the POP user or the BBoards user. (The user-id -\*(lqftp\*(rq is highly recommended.) This variable should be set on -both the POP BBoards client and service hosts. - -.ti -.5i -popbblist: %etcdir%/hosts.popbb -.br -A file containing of lists of hosts that are allowed to use the POP -facility to access BBoards using the guest account. If this file is not -present, then no check is made. This variable should be set on the POP -BBoards service host. - -.in -.5i -.if n .ne 8 -.Uh "BBoards & The NNTP" -This option is only available if you compiled \fInmh\fP with -\*(lqbboards:\ nntp\*(rq and \*(lqpop:\ on\*(rq. - -.in +.5i -.ti -.5i -nntphost: -.br -The host which provides the NNTP service. This variable should be set -on the NNTP BBoards client host. - -.in -.5i -.Uh "File Locking" -A few words on locking: \fInmh\fR has several methods for creating locks -on files. When configuring \fInmh\fR, you will need to decide on the +.RE +\" .SS "BBoards Delivery" +\" This option is only available if you compiled \fInmh\fP with +\" \*(lqbbdelivery:\ on\*(rq. +\" .PP +\" .BR bbdomain : +\" .RS 5 +\" The local BBoards domain (a UCI hack). +\" .RE + +\" .SS "BBoards & The POP" +\" These options are only available if you compiled \fInmh\fP with +\" \*(lqbboards:\ pop\*(rq and \*(lqpop:\ on\*(rq. + +\" .PP +\" .BR popbbhost : +\" .RS 5 +\" The POP service host which also acts as a BBoard server. This variable +\" should be set on the POP BBoards client host. +\" .RE +\" .PP +\" .BR popbbuser : +\" .RS 5 +\" The guest account on the POP/BB service host. This should be a different +\" login ID than either the POP user or the BBoards user. (The user-id +\" \*(lqftp\*(rq is highly recommended.) This variable should be set on +\" both the POP BBoards client and service hosts. +\" .RE +\" .PP +\" .BR popbblist : +\" %etcdir%/hosts.popbb +\" .RS 5 +\" A file containing of lists of hosts that are allowed to use the POP +\" facility to access BBoards using the guest account. If this file is not +\" present, then no check is made. This variable should be set on the POP +\" BBoards service host. +\" .RE + +\" .SS "BBoards & The NNTP" +\" This option is only available if you compiled \fInmh\fP with +\" \*(lqbboards:\ nntp\*(rq and \*(lqpop:\ on\*(rq. +\" .PP +\" .BR nntphost : +\" .RS 5 +\" The host which provides the NNTP service. This variable should be set +\" on the NNTP BBoards client host. +\" .RE +.SS "File Locking" +A few words on locking: +.B nmh +has several methods for creating locks +on files. When configuring +.BR nmh , +you will need to decide on the locking style and locking directory (if any). The first controls the method of locking, the second says where lock files should be created. - -To configure \fInmh\fR for kernel locking, define \fBFLOCK_LOCKING\fP if -you want to use the \fIflock\fP system call; define \fBLOCKF_LOCKING\fP if -you want to use the \fIlockf\fP system call; or define \fBFCNTL_LOCKING\fP -if you want to use the \fIfcntl\fP system call for kernel-level locking. - -Instead of kernel locking, you can configure \fInmh\fR to use dot -locking by defining \fBDOT_LOCKING\fP. Dot locking specifies that +.PP +To configure +.B nmh +for kernel locking, use the \*(lq--with-locking=flock\*(rq configure option if +you want to use the +.B flock +system call; use \*(lq--with-locking=lockf\*(rq if +you want to use the +.B lockf +system call; or use \*(lq--with-locking=fcntl\*(rq +if you want to use the +.B fcntl +system call for kernel-level locking. +.PP +Instead of kernel locking, you can configure +.B nmh +to use dot locking by using \*(lq--with-locking=dot\*(rq. Dot locking +specifies that a file should be created whose existence means \*(lqlocked\*(rq and whose non-existence means \*(lqunlocked\*(rq. The name of this file is constructed by appending \*(lq.lock\*(rq to the name of the file being -locked. If \fBLOCKDIR\fP is not specified, lock files will be created +locked. If +.B LOCKDIR +is not specified, lock files will be created in the directory where the file being locked resides. Otherwise, lock -files will be created in the directory specified by \fBLOCKDIR\fP. - -Prior to installing \fInmh\fR, you should see how locking is done at +files will be created in the directory specified by +.BR LOCKDIR . +.PP +Prior to installing +.BR nmh , +you should see how locking is done at your site, and set the appropriate values. -.Fi +.SH FILES +.fc ^ ~ +.nf +.ta \w'/usr/local/nmh/etc/ExtraBigFileName 'u ^%etcdir%/mts.conf~^nmh mts configuration file -.Pr + +.SH "PROFILE COMPONENTS" None -.Sa + +.SH "SEE ALSO" mh\-mts(8), post(8) -.De + +.SH DEFAULTS As listed above -.Co -None -.En diff --git a/man/mhbuild.man b/man/mhbuild.man index 1d053d6..7024e48 100644 --- a/man/mhbuild.man +++ b/man/mhbuild.man @@ -2,98 +2,124 @@ .\" %nmhwarning% .\" $Id$ .\" -.\" include the -mh macro file -.so %etcdir%/tmac.h -.\" .TH MHBUILD %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME mhbuild \- translate MIME composition draft .SH SYNOPSIS -.in +.5i -.ti -.5i -mhbuild file -.br -\%[\-list] \%[-nolist] -\%[\-realsize] \%[\-norealsize] -.br -\%[\-headers] \%[\-noheaders] -\%[\-ebcdicsafe] \%[\-noebcdicsafe] -.br -\%[\-rfc934mode] \%[\-norfc934mode] -\%[\-verbose] \%[\-noverbose] -.br -\%[\-check] \%[\-nocheck] -\%[\-version] -\%[\-help] -.in -.5i +.HP 5 +.B mhbuild +.I file +.RB [ \-list " | " \-nolist ] +.RB [ \-realsize " | " \-norealsize ] +.RB [ \-headers " | " \-noheaders ] +.RB [ \-ebcdicsafe " | " \-noebcdicsafe ] +.RB [ \-rfc934mode " | " \-norfc934mode ] +.RB [ \-verbose " | " \-noverbose ] +.RB [ \-check " | " \-nocheck ] +.RB [ \-version ] +.RB [ \-help ] .SH DESCRIPTION -The \fImhbuild\fR command will translate a MIME composition draft into +The +.B mhbuild +command will translate a MIME composition draft into a valid MIME message. - -\fImhbuild\fR creates multi-media messages as specified in RFC\-2045 -thru RFC\-2049. Currently \fImhbuild\fR only supports encodings in +.PP +.B mhbuild +creates multi-media messages as specified in RFC\-2045 +thru RFC\-2049. Currently +.B mhbuild +only supports encodings in message bodies, and does not support the encoding of message headers as specified in RFC\-2047. - +.PP If you specify the name of the composition file as \*(lq-\*(rq, -then \fImhbuild\fR will accept the composition draft on the standard -input. If the translation of this input is successful, \fImhbuild\fR +then +.B mhbuild +will accept the composition draft on the standard +input. If the translation of this input is successful, +.B mhbuild will output the new MIME message to the standard output. This argument must be the last argument on the command line. - -Otherwise if the file argument to \fImhbuild\fR is the name of a valid -composition file, and the translation is successful, \fImhbuild\fR will -replace the original file with the new MIME message. It will rename +.PP +Otherwise if the file argument to +.B mhbuild +is the name of a valid +composition file, and the translation is successful, +.B mhbuild +will replace the original file with the new MIME message. It will rename the original file to start with the \*(lq,\*(rq character and end with the string \*(lq.orig\*(rq, e.g., if you are editing the file \*(lqdraft\*(rq, it will be renamed to \*(lq,draft.orig\*(rq. This allows you to easily -recover the \fImhbuild\fR input file. - -.Uh "Listing the Contents" -The `\-list' switch tells \fImhbuild\fR to list the table of contents -associated with the MIME message that is created. - -The `\-headers' switch indicates +recover the +.B mhbuild +input file. +.SS "Listing the Contents" +The +.B \-list +switch tells +.B mhbuild +to list the table of contents associated with the MIME message that is created. +.PP +The +.B \-headers +switch indicates that a one-line banner should be displayed above the listing. The -`\-realsize' switch tells \fImhbuild\fR to evaluate the \*(lqnative\*(rq +.B \-realsize +switch tells +.B mhbuild +to evaluate the \*(lqnative\*(rq (decoded) format of each content prior to listing. This provides an -accurate count at the expense of a small delay. If the `\-verbose' switch +accurate count at the expense of a small delay. If the +.B \-verbose +switch is present, then the listing will show any \*(lqextra\*(rq information -that is present in the message, such as comments in the Content-Type header. - -.Uh "Translating the Composition File" -\fImhbuild\fR is essentially a filter to aid in the composition of MIME -messages. \fImhbuild\fR will convert an -\fImhbuild\fR \*(lqcomposition file\*(rq -into a valid MIME message. A \fImhbuild\fR \*(lqcomposition file\*(rq +that is present in the message, such as comments in the +\*(lqContent-Type\*(rq header. +.SS "Translating the Composition File" +.B mhbuild +is essentially a filter to aid in the composition of MIME +messages. +.B mhbuild +will convert an +.B mhbuild +\*(lqcomposition file\*(rq +into a valid MIME message. A +.B mhbuild +\*(lqcomposition file\*(rq is just a file containing plain text that is interspersed -with various \fImhbuild\fR directives. When this file is processed -by \fImhbuild\fR, the various directives will be expanded to the +with various +.B mhbuild +directives. When this file is processed +by +.BR mhbuild , +the various directives will be expanded to the appropriate content, and will be encoded according to the MIME standards. The resulting MIME message can then be sent by electronic mail. - -The formal syntax for a \fImhbuild\fR composition file is defined at the +.PP +The formal syntax for a +.B mhbuild +composition file is defined at the end of this document, but the ideas behind this format are not complex. Basically, the body contains one or more contents. A content consists of either a directive, indicated with a \*(lq#\*(rq as the first character of a line; or, plaintext (one or more lines of text). The continuation character, \*(lq\\\*(lq, may be used to enter a single directive on more than one line, e.g., -.sp +.PP +.RS 5 .nf -.in +.5i #image/png \\ /home/foobar/junk/picture.png -.in -.5i .fi -.sp +.RE +.PP There are four kinds of directives: \*(lqtype\*(rq directives, which name the type and subtype of the content; \*(lqexternal-type\*(rq directives, which also name the type and subtype of the content; the \*(lqmessage\*(rq directive (#forw), which is used to forward one or more messages; and, the \*(lqbegin\*(rq directive (#begin), which is used to create a multipart content. - +.PP The \*(lqtype\*(rq directive is used to directly specify the type and subtype of a content. You may only specify discrete types in this manner (can't specify the types multipart or message with this directive). @@ -102,75 +128,83 @@ in \*(lqnative\*(rq (decoded) format. If this filename starts with the \*(lq|\*(rq character, then it represents a command to execute whose output is captured accordingly. For example, -.sp +.PP +.RS 5 .nf -.in +.5i #audio/basic |raw2audio -F < /usr/lib/sound/giggle.au -.in -.5i .fi -.sp -If a filename is not given, \fImhbuild\fR will look for information in the +.RE +.PP +If a filename is not given, +.B mhbuild +will look for information in the user's profile to determine how the different contents should be composed. This is accomplished by consulting a composition string, and executing -it under \fB/bin/sh\fR, with the standard output set to the content. -If the `\-verbose' switch is given, \fImhbuild\fR will echo any commands -that are used to create contents in this way. -.ne 13 +it under +.BR /bin/sh , +with the standard output set to the content. +If the +.B \-verbose +switch is given, +.B mhbuild +will echo any commands that are used to create contents in this way. +.PP The composition string may contain the following escapes: -.sp +.PP +.RS 5 .nf -.in +.5i .ta \w'%P 'u %a Insert parameters from directive %f Insert filename containing content %F %f, and stdout is not re-directed %s Insert content subtype %% Insert character % -.re -.in -.5i .fi -.sp - +.RE +.PP First, -\fImhbuild\fR will look for an entry of the form: -.sp -.in +.5i +.B mhbuild +will look for an entry of the form: +.PP +.RS 5 mhbuild-compose-/ -.in -.5i -.sp +.RE +.PP to determine the command to use to compose the content. If this isn't -found, \fImhbuild\fR will look for an entry of the form: -.sp -.in +.5i +found, +.B mhbuild +will look for an entry of the form: +.PP +.RS 5 mhbuild-compose- -.in -.5i -.sp -to determine the composition command. - -If this isn't found, \fImhbuild\fR +.RE +.PP +to determine the composition command. If this isn't found, +.B mhbuild will complain. - +.PP An example entry might be: -.sp -.in +.5i +.PP +.RS 5 mhbuild-compose-audio/basic: record | raw2audio -F -.in -.5i -.sp +.RE +.PP Because commands like these will vary, depending on the display environment used for login, composition strings for different contents should probably be put in the file specified by the -\fB$MHBUILD\fR environment variable, instead of directly in your +.B $MHBUILD +environment variable, instead of directly in your user profile. - +.PP The \*(lqexternal-type\*(rq directives are used to provide a MIME reference to a content, rather than enclosing the contents itself (for instance, by specifying an ftp site). Hence, instead of providing a filename as with the type directives, external-parameters are supplied. These look like regular parameters, so they must be separated accordingly. For example, -.sp +.PP +.RS 5 .nf -.in +.5i #@application/octet-stream; \\ type=tar; \\ conversions=compress \\ @@ -180,18 +214,18 @@ separated accordingly. For example, site="ftp.math.gatech.edu"; \\ access-type=anon-ftp; \\ mode="image" -.in -.5i .fi -.sp +.RE +.PP You must give a description string to separate the content parameters from the external-parameters (although this string may be empty). This description string is specified by enclosing it within \*(lq[]\*(rq. -.ne 19 +.PP These parameters are of the form: -.sp +.PP +.RS 5 .nf -.in +.5i .ta \w'access-type= 'u access-type= usually \fIanon-ftp\fR or \fImail-server\fR name= filename @@ -203,34 +237,39 @@ size= number of octets server= mailbox subject= subject to send body= command to send for retrieval -.re -.in -.5i .fi -.sp - +.RE +.PP The \*(lqmessage\*(rq directive (#forw) is used to specify a message or group of messages to include. You may optionally specify the name of the folder and which messages are to be forwarded. If a folder is not given, it defaults to the current folder. Similarly, if a message is not given, it defaults to the current message. Hence, the message directive -is similar to the \fIforw\fR\0(1) command, except that the former uses +is similar to the +.B forw +command, except that the former uses the MIME rules for encapsulation rather than those specified in RFC\-934. For example, -.sp +.PP +.RS 5 .nf -.in +.5i #forw +inbox 42 43 99 -.in -.5i .fi -.sp +.RE +.PP If you include a single message, it will be included directly as a content of type \*(lqmessage/rfc822\*(rq. If you include more than one message, -then \fImhbuild\fR will add a content of type \*(lqmultipart/digest\*(rq +then +.B mhbuild +will add a content of type \*(lqmultipart/digest\*(rq and include each message as a subpart of this content. - +.PP If you are using this directive to include more than one message, you -may use the `\-rfc934mode' switch. This switch will indicate that -\fImhbuild\fR should attempt to utilize the MIME encapsulation rules +may use the +.B \-rfc934mode +switch. This switch will indicate that +.B mhbuild +should attempt to utilize the MIME encapsulation rules in such a way that the \*(lqmultipart/digest\*(rq that is created is (mostly) compatible with the encapsulation specified in RFC\-934. If given, then RFC\-934 compliant user-agents should be able to burst the @@ -238,83 +277,81 @@ message on reception\0--\0providing that the messages being encapsulated do not contain encapsulated messages themselves. The drawback of this approach is that the encapsulations are generated by placing an extra newline at the end of the body of each message. - +.PP The \*(lqbegin\*(rq directive is used to create a multipart content. When using the \*(lqbegin\*(rq directive, you must specify at least one content between the begin and end pairs. -.sp +.PP +.RS 5 .nf -.in +.5i #begin This will be a multipart with only one part. #end -.in -.5i .fi -.sp -If you use multiple directives in a composition draft, \fImhbuild\fR will +.RE +.PP +If you use multiple directives in a composition draft, +.B mhbuild +will automatically encapsulate them inside a multipart content. Therefore the \*(lqbegin\*(rq directive is only necessary if you wish to use nested multiparts, or create a multipart message containing only one part. - +.PP For all of these directives, the user may include a brief description of the content between the \*(lq[\*(rq character and the \*(lq]\*(rq character. This description will be copied into the \*(lqContent-Description\*(rq header when the directive is processed. -.sp +.PP +.RS 5 .nf -.in +.5i #forw [important mail from Bob] +bob 1 2 3 4 5 -.in -.5i .fi -.sp -By default, \fImhbuild\fR will generate a unique \*(lqContent-ID:\*(rq for +.RE +.PP +By default, +.B mhbuild +will generate a unique \*(lqContent-ID:\*(rq for each directive; however, the user may override this by defining the ID using the \*(lq<\*(rq and \*(lq>\*(rq characters. - +.PP In addition to the various directives, plaintext can be present. Plaintext is gathered, until a directive is found or the draft is exhausted, and this is made to form a text content. If the plaintext must contain a \*(lq#\*(rq at the beginning of a line, simply double it, -.ne 6 e.g., -.sp -.in +.5i +.PP +.RS 5 ##when sent, this line will start with only one # -.in -.5i -.sp +.RE +.PP If you want to end the plaintext prior to a directive, e.g., to have two plaintext contents adjacent, simply insert a line containing a single -\*(lq#\*(rq character, -.ne 10 -e.g., -.sp +\*(lq#\*(rq character, e.g., +.PP +.RS 5 .nf -.in +.5i this is the first content # and this is the second -.in -.5i .fi -.sp -Finally, -if the plaintext starts with a line of the form: -.sp -.in +.5i +.RE +.PP +Finally, if the plaintext starts with a line of the form: +.PP +.RS 5 Content-Description: text -.in -.5i -.sp +.RE +.PP then this will be used to describe the plaintext content. You MUST follow this line with a blank line before starting your text. - +.PP By default, plaintext is captured as a text/plain content. You can override this by starting the plaintext with \*(lq#<\*(rq followed by -a content-type specification. For example, -.ne 11 -e.g., -.sp +a content-type specification. For example, e.g., +.PP +.RS 5 .nf -.in +.5i #" ] - [ "[" description "]" ] - [ filename ] - EOL - - | "#@" type "/" subtype - 0*(";" attribute "=" value) - [ "(" comment ")" ] - [ "<" id ">" ] - [ "[" description "]" ] - external-parameters - EOL - - | "#forw" - [ "<" id ">" ] - [ "[" description "]" ] - [ "+"folder ] [ 0*msg ] - EOL - - | "#begin" - [ "<" id ">" ] - [ "[" description "]" ] - [ "alternative" - | "parallel" - | something-else ] - EOL - 1*body - "#end" EOL - - plaintext ::= [ "Content-Description:" - description EOL EOL ] - 1*line - [ "#" EOL ] - - | "#<" type "/" subtype - 0*(";" attribute "=" value) - [ "(" comment ")" ] - [ "[" description "]" ] - EOL - 1*line - [ "#" EOL ] - - line ::= "##" text EOL - -- interpreted as "#"text EOL - | text EOL -.in -.5i +body ::= 1*(content | EOL) + +content ::= directive | plaintext + +directive ::= "#" type "/" subtype + 0*(";" attribute "=" value) + [ "(" comment ")" ] + [ "<" id ">" ] + [ "[" description "]" ] + [ filename ] + EOL + + | "#@" type "/" subtype + 0*(";" attribute "=" value) + [ "(" comment ")" ] + [ "<" id ">" ] + [ "[" description "]" ] + external-parameters + EOL + + | "#forw" + [ "<" id ">" ] + [ "[" description "]" ] + [ "+"folder ] [ 0*msg ] + EOL + + | "#begin" + [ "<" id ">" ] + [ "[" description "]" ] + [ "alternative" + | "parallel" + | something-else ] + EOL + 1*body + "#end" EOL + +plaintext ::= [ "Content-Description:" + description EOL EOL ] + 1*line + [ "#" EOL ] + + | "#<" type "/" subtype + 0*(";" attribute "=" value) + [ "(" comment ")" ] + [ "[" description "]" ] + EOL + 1*line + [ "#" EOL ] + +line ::= "##" text EOL + -- interpreted as "#"text EOL + | text EOL .fi -.sp -.Fi +.RE +.PP + +.SH FILES +.fc ^ ~ +.nf +.ta \w'/usr/local/nmh/etc/ExtraBigFileName 'u ^$HOME/\&.mh\(ruprofile~^The user profile ^$MHBUILD~^Additional profile entries ^%etcdir%/mhn.defaults~^System default MIME profile entries -.Pr + +.SH "PROFILE COMPONENTS" +.fc ^ ~ +.nf +.ta 2.4i +.ta \w'ExtraBigProfileName 'u ^Path:~^To determine the user's nmh directory -.Ps ^Current\-Folder:~^To find the default current folder -.Ps ^mhbuild-compose-*~^Template for composing contents -.Sa -mhlist(1), mhshow(1), mhstore(1) -.br -RFC\-934: -.br - \fIProposed Standard for Message Encapsulation\fR, -.br -RFC\-2045: -.br - \fIMultipurpose Internet Mail Extensions (MIME) Part One: -.br - Format of Internet Message Bodies\fR, -.br -RFC\-2046: -.br - \fIMultipurpose Internet Mail Extensions (MIME) Part Two: -.br - Media Types\fR, -.br -RFC\-2047: -.br - \fIMultipurpose Internet Mail Extensions (MIME) Part Three: -.br - Message Header Extensions for Non-ASCII Text\fR, + +.SH "SEE ALSO" +mhlist(1), mhshow(1), mhstore(1), .br -RFC\-2048: +.I "Proposed Standard for Message Encapsulation" +(RFC\-934), .br - \fIMultipurpose Internet Mail Extensions (MIME) Part Four: +.I "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies" +(RFC\-2045), .br - Registration Procedures\fR, +.I "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types" +(RFC\-2046), .br -RFC\-2049: +.I "Multipurpose Internet Mail Extensions (MIME) Part Three: Message Header Extensions for Non-ASCII Text" +(RFC\-2047), .br - \fIMultipurpose Internet Mail Extensions (MIME) Part Five: +.I "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures" +(RFC\-2048), .br - Conformance Criteria and Examples\fR. -.De -`\-headers' -.Ds -`\-realsize' -.Ds -`\-norfc934mode' -.Ds -`\-nocheck' -.Ds -`\-noebcdicsafe' -.Ds -`\-noverbose' -.Co +.I "Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples" +(RFC\-2049) + +.SH DEFAULTS +.nf +.RB ` \-headers ' +.RB ` \-realsize ' +.RB ` \-norfc934mode ' +.RB ` \-nocheck ' +.RB ` \-noebcdicsafe ' +.RB ` \-noverbose ' + +.SH CONTEXT If a folder is given, it will become the current folder. The last message selected will become the current message. -.En