⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mhn.me

📁 早期freebsd实现
💻 ME
📖 第 1 页 / 共 3 页
字号:
if someone's sent you a message in several parts,you might put them all in their own folder and do:.sp.in +.5imhn all -store.in -.5i.spThis will store exactly one message,containing the sum of the parts.Note that if \fImhn\fR can not locate each part,it will not store anything.Finally,if the `\-auto' switch is given and the content contains informationindicating the filename the content should be stored as(and if the filename doesn't begin with a '/'),then the filename from the content will be used instead..Uh "External Access"For contents of type message/external-body,.ne 12\fImhn\fR supports these access-types:.sp.nf.in +.5iafsanon-ftpftplocal-filemail-server.in -.5i.fi.spFor the \*(lqanon-ftp\*(rq and \*(lqftp\*(rq access types,if your system supports a SOCKETs interface to TCP/IP,then \fImhn\fR will use a built-in FTP client.Otherwise,\fImhn\fR will look for the \fBmhn-access-ftp\fR profile entry,.ne 6e.g.,.sp.in +.5imhn-access-ftp: myftp.sh.in -.5i.spto determine the pathname of a program to perform the FTP retrieval..ne 14This program is invoked with these arguments:.sp.nf.in +.5idomain name of FTP-siteusernamepasswordremote directoryremote filenamelocal filename\*(lqascii\*(rq or \*(lqbinary\*(rq.in -.5i.fi.spThe program should terminate with a zero-valued exit-status if theretrieval is successful..Uh "The Content Cache"When \fImhn\fR encounters an external content containing a\*(lqContent-ID:\*(rq field,and if the content allows caching,then depending on the caching behavior of \fImhn\fR,the content might be read from or written to a cache.The caching behavior of \fImhn\fR is controlled withthe `\-rcache' and `\-wcache' switches,which define the policy for reading from,and writing to,the cache, respectively.One of four policies may be specified:\*(lqpublic\*(rq,indicating that \fImhn\fR should make use of apublically-accessible content cache;\*(lqprivate\*(rq,indicating that \fImhn\fR should make use of the user'sprivate content cache;\*(lqnever\*(rq,indicating that \fImhn\fR should never make use of caching;and,\*(lqask\*(rq,indicating that \fImhn\fR should ask the user.There are two directories where contents may be cached:the profile entry \fBmhn-cache\fR names a directory containingworld-readable contents,and,the profile entry \fBmhn-private-cache\fR names a directory containingprivate contents.The former should be an absolute (rooted) directory name..ne 6For example,.sp.in +.5imhn-cache: /tmp.in -.5i.spmight be used if you didn't care that the cache got wiped after each rebootof the system.The latter is interpreted relative to the user's MH directory,if not rooted,.ne 6e.g.,.sp.in +.5imhn-private-cache: .cache.in -.5i.sp(which is the default value)..Uh "Caching the Contents"When you encounter a content of type message/external-body with access type\*(lqmail-server\*(rq,\fImhn\fR will ask you if may send a message to a mail-serverrequesting the content,.ne 14e.g.,.sp.nf.in +.5i% show 1Retrieve content by asking mail-server@...SEND file? yesmhn: request sent.in -.5i.fi.spRegardless of your decision,\fImhn\fR can't perform any other processing on the content.However,if \fImhn\fR is allowed to request the content,then when it arrives,there should be a top-level \*(lqContent-ID:\*(rq field whichcorresponds to the value in the original message/external-body content.You should now use the `-cache' switch to tell \fImhn\fR to enter thearriving content into the content cache,.ne 8e.g.,.sp.nf.in +.5i% mhn -cache 2caching message 2 as file ....in -.5i.fi.spYou can then re-process the original message/external-body content,and \*(lqthe right thing should happen\*(rq,.ne 8e.g.,.sp.nf.in +.5i% show 1\0....in -.5i.fi.Uh "Composing the Contents"The \fImhn\fR program can also be used as a simple editor to aid incomposing multi-media messages.When invoked by a \fIwhatnow\fR program,\fImhn\fR will expect the body of the draft to be formatted as an\*(lq\fImhn\fR composition file.\*(rq.ne 59The syntax of this is straight-forward:.sp.nf.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.in -.5i.fi.spBasically,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.ne 11directive on more than one line,e.g.,.sp.nf.in +.5i#@application/octet-stream; \\    type=tar; \\    x-conversions=compress.in -.5i.fi.spThere 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 \*(lqforw\*(rq directive,which is used to forward a digest of messages;and,the \*(lqbegin\*(rq directive,which is used to create a multipart content.For the type directives,the user may optionally specify the name of a file containing thecontents in \*(lqnative\*(rq (decoded) format.(If the filename starts with the \*(lq|\*(rq character,then this gives a command whose output is captured accordingly.)If a filename is not given,\fImhn\fR will look for information in the user's profile to determinehow 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..ne 13The composition string may contain these escapes:.sp.nf.in +.5i.ta \w'%P  'u%a	additional arguments%f	filename containing content%F	%f, and stdout is not re-directed%s	subtype.re.in -.5i.fi.spFirst,\fImhn\fR will look for an entry of the form:.sp.in +.5imhn-compose-<type>/<subtype>.in -.5i.spto determine the command to use to compose the content.If this isn't found,\fImhn\fR will look for an entry of the form:.sp.in +.5imhn-compose-<type>.in -.5i.spto determine the composition command.If this isn't found,\fImhn\fR will complain.An example entry might be:.sp.in +.5imhn-compose-audio/basic: record | raw2audio -F.in -.5i.spBecause commands like these will vary,depending on the display environment used for login,composition strings for different contents should probably be put inthe file specified by the \fB$MHN\fR environment variable,instead of directly in your user profile.The external-type directives are used to provide a reference to a content,rather than enclosing the contents itself.Hence,instead of providing a filename as with the type directives,external-parameters are supplied.These look like regular parameters,.ne 15so they must be separated accordingly,e.g.,.sp.nf.in +.5i#@application/octet-stream; \\    type=tar; \\    x-conversions=compress [] \\    access-type=anon-ftp; \\    name="mh-mime.tar.Z"; \\    directory="mrose/mh-mime"; \\    site="ftp.ics.uci.edu".in -.5i.fi.spBy specifying \*(lq[]\*(rq,an empty description string is given,and the start of the external-parameters is identified..ne 19These parameters are of the form:.sp.nf.in +.5i.ta \w'access-type=  'uaccess-type=	usually \fIanon-ftp\fR or \fImail-server\fRname=	filenamepermission=	read-only or read-writesite=	hostnamedirectory=	directoryname (optional)mode=	usually \fIascii\fR or \fIimage\fR (optional)size=	number of octetsserver=	mailboxsubject=	subject to sendbody=	command to send for retrieval.re.in -.5i.fi.spFor the forw directive,the user may optionally specify the name of the folder and whichmessages 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 forw directive is similar to the \fIforw\fR\0(1) command,except that the former uses the MIME rules for encapsulationrather than those specified in RFC 934.Usage of the `\-rfc934mode' switch indicates whether \fImhn\fR shouldattempt to utilize the encapsulation rules in such a way as to appearthat RFC 934 is being used.If given,then RFC 934-compliant user-agents should be able to burst the message onreception\0--\0providing that the messages being encapsulated do notcontain encapsulated messages themselves.The drawback of this approach is that the encapsulations are generatedby placing an extra newline at the end of the body of each message.For the begin directive,the user must specify at least one content betweenthe begin and end pairs.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -