340 lines · 6.7 KB · Text
RawDownload
.TH NEDMAIL 1.SH NAMEnedmail \-  reading mail.SH SYNOPSIS.B upas/nedmail[.B -nr][.B -f.I mailfile][.B -s.I mailfile].PP.B upas/nedmail.B -c.I dir.SH DESCRIPTION.I Nedmailedits a mailbox.The default mailbox is.BI /mail/box/ username /mbox\f1.The.B -fcommand line option specifies an alternate mailbox.Unrooted path names are interpreted relative to.BI /mail/box/ username.If the.I mailfileargument is omitted, the name defaults to.BR stored ..PPThe options are:.TF "-f mailfile".TP.BI -c " dirCreate a mailbox.  If.I diris specified, the new mailbox is created in.BI /mail/box/ username / dir /mbox\f1.Otherwise, the default mailbox is created..TP.B -rReverse: show messages in first-in, first-out order; the default is last-in, first-out..TP.B -nMake the message numbers the same as the file names in the mailbox directory.  This implies the.B -roption..TP.BI -f " mailfile"Read messages from the specified file (see above) instead of the default mailbox..TP.BI -s " mailfile"Read a single message file.IR mailfile ,as produced by.IR fs ,and treat it as an entire mailbox.This is provided foruse in plumbing rules; see.IR faces (1)..PD.PP.I Nedmailstarts by reading the mail box, printing out the numberof messages, and then prompting for commands from standard input.Commands, as in.IR ed (1),are of the form.RI `[ range ].I command.RI [ arguments ]'.The command is applied to each message in the (optional) range..PPThe address range can be:.TP 1.4i.I addressto indicate a single message header.PD 0.TP.IB address , addressto indicate a range of contiguous message headers.TP.BI g/ expression /to indicate all messages whose headers match the regular.IR expression ..TP.BI g% expression %to indicate all messages whose contents match the regular.IR expression ..PD.PPThe addresses can be:.TP 1.4i.I numberto indicate a particular message.PD 0.TP.IB address . numberto indicate a subpart of a particular message.TP.BI / expression /to indicate the next message whose header matches.I expression.TP.BI % expression %to indicate the next message whose contents matchexpression.TP.I "empty or .to indicate the current message.TP.BI - addressto indicate backwards search or movement.PD.PPSince messages in MIME are hierarchicalstructures, in.I nedmailall the subparts are individually addressable.For example if message 2 contains 3 attachments,the attachments are numbered 2.1, 2.2, and 2.3..PPThe commands are:.TP 1.1i.BI a " argsReply to all addresses in the.BR To: ,.BR From: ,and.BR Cc:header lines..I Marshalis used to format the reply and any arguments theuser specifies are added to the command line to.I marshalbefore the recipient.The possibility of making a fool of yourself is veryhigh with this command..PD 0.TP.BI A " argsLike .B abut with the messageappended to the reply..TP.B bPrint the headers for the next ten messages..TP.B dMark message to be deleted upon exiting.IR nedmail ..TP.B fAppend the message to the file .BI /mail/box/ username / sendernamewhere.I sendernameis the account name of the sender..TP.B hPrint the disposition, size in characters, reception time, sender,and subject of the message..TP.B HPrint the MIME structure of the message..TP.B helpPrint a summary of the commands..TP.BI m " person ...Forward the message as a mime attachment to the named.IR persons ..TP.BI M " person ...Like.B mbut allow the user to type in text to be includedwith the forwarded message..TP.B pPrint message.	An interrupt stops the printing..TP.BI r " argsReply to the sender of the message..I Marshalis used to format the reply.If and optional.I Argsare specified, they are added to the command line to.I marshalbefore the recipient's address..TP.B R " args Like.B rbut with the original message included as an attachment..TP.B rfLike.B rbut append the message and the reply to the file .BI /mail/box/ username / sendernamewhere.I sendernameis the account name of the sender..TP.B RfLike .B Rbut append the message and the reply to the file .BI /mail/box/ username / sendernamewhere.I sendernameis the account name of the sender..TP.BI s " mfile"Append the message to the specified mailbox.If.I mfiledoesn't start with a `/', it is interpreted relative to the directory in which the mailbox resides.If.I mfileis a directory then the destination is a file in that directry.If the MIME header specifies a file name, that one is used.Otherwise, one is generated using.IR mktemp (2)and the string.BR att.XXXXXXXXXXX ..TP.B qPut undeleted mail back in the mailbox and stop..TPEOT (control-D)Same as .BR q ..TP.BI w " fileSame as.B swith the mail header line(s) stripped.  This can be used tosave binary mail bodies..TP.B uRemove mark for deletion..TP.B xExit, without changing the mailbox file..TP.B ySynchronize with the mail box.  Any deletedmessages are purged and any new messages read.This is equivalent to quiting nedmail and restarting..TP.BI | commandRun the.I commandwith the message body as standard input..TP.BI || commandRun the.I commandwith the whole message as standard input..TP.BI ! commandEscape to the shell to do.IR command ..TP.B \&=Print the number of the current message..PD.PPHere's an example of a mail session that looks at a summaryof the mail messages, saves away an html file added as anattachment to a message and then deletes the message:.LP.EX% mail7 messages: ,h1   H  2129	07/22 12:30  noone@madeup.net  "Add Up To 2000 free miles"2       504	07/22 11:43  jmk3   H   784	07/20 09:05  presotto4       822	07/11 09:23  xxx@yyy.net  "You don't call, you don't write..."5       193	07/06 16:55  presotto6       529	06/01 19:42  jmk7       798	09/02  2000  howard: 1H1       multipart/mixed             2129   from=noone@madeup.net 1.1      text/plain                115     1.2      text/html                 1705   filename=northwest.htm: 1.2w /tmp/northwest.html!saved in /tmp/northwest.html1.2: d1: q!1 message deleted% .EE.PPNotice that the delete of message 1.2 deleted the entire message andnot just the attachment..SH FILES.TF /mail/box/*/dead.letter.TP.B /mail/box/*mail directories.TP.B /mail/box/*/mboxmailbox files.TP.B /mail/box/*/forwardforwarding address(es).TP.B /mail/box/*/pipetomail filter.TP.B /mail/box/*/L.readingmutual exclusion lock for multiple mbox readers.TP.B /mail/box/*/L.mboxmutual exclusion lock for altering mbox.SH SOURCE.B /sys/src/cmd/upas/ned.SH "SEE ALSO".IR mail (1),.IR aliasmail (8),.IR filter (1),.IR marshal (1),.IR mlmgr (1),.IR nedmail (1),.IR upasfs (4),.IR smtp (8),.IR faces (1),.IR rewrite (6)