home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.misc
- Path: sparky!uunet!munnari.oz.au!manuel.anu.edu.au!dubhe.anu.edu.au!csis!regulus!gjw
- From: gjw@csis.dit.csiro.au (Graham Williams)
- Subject: Re: Mailtool header summary format
- Message-ID: <1993Jan12.050117.1343@csis.dit.csiro.au>
- Sender: news@csis.dit.csiro.au
- Nntp-Posting-Host: regulus
- Reply-To: gjw@csis.dit.csiro.au
- Organization: Spatial Information Systems, CSIRO, Canberra, Australia
- References: <1993Jan11.221219.13412@icd.teradyne.com>
- Date: Tue, 12 Jan 1993 05:01:17 GMT
- Lines: 66
-
- In article 13412@icd.teradyne.com, molloy@emerald (Phil Molloy) writes:
-
- >If someone knows of a way to do the same thing in mailtool, I would greatly
- >appreciate hearing about it.
-
-
- This was posted to the net some time ago:
-
- # Sun have an undocumented feature (undocumented because they couldn't
- # figure out a good GUI for manipulating it). They used the mush format
- # for the header.
- #
- # Here is the technical poop. Do a strings on mailtool to convince
- # yourself of the following facts!
- #
- # The mailrc variable is "header_format". If "header_format" isn't set,
- # one of two defaults, depending on whether "showto" is set or not, is used.
- #
- # if (mt_value("showto")) {
- # format = "%3m %-18.40r %16.16d %4l/%-5c %-.100s";
- # } else {
- # format = "%3m %-18.40f %16.16d %4l/%-5c %-.100s";
- # }
- #
- # Here is the description of the various fields:
- #
- #/*
- # * format and print a header string. We use the Mush format:
- # *
- # * %% -- a single %
- # * %c -- number of bytes in the message
- # * %C -- number of bytes in the message contents
- # * %f -- entire from field
- # * %l -- number of lines in the message
- # * %L -- number of lines in the message contents
- # * %i -- message id
- # * %s -- subject of message
- # * %t -- To: field (recipients)
- # * %r -- recipient (sender, or to line if you sent)
- # * %d -- date and time of the message
- # * %n -- sender's real name (if any; otherwise use %r )
- # * %?header? -- insert contents of header (if any)
- # *
- # * You can also specify a field width in printf format: either
- # * %25s (25 chars of subject), %.25s (no more than 25 chars),
- # * or %10.25s (at least 10 and no more than 25 chars)
- # *
- # * leading '-' means to left justify the string.
- # *
- # */
- #
- # So for a sender field of fixed width and truncated, set the
- # default to be something like "%40.40r" instead of "%18.40r".
- #
-
- # My preference is the following (put it in your ~/.mailrc or $MAILRC file:
-
- set header_format="%3m %15.15r %24.24d %3l %-.100s"
-
-
- ---
- Graham.Williams@csis.dit.csiro.au ,--_|\ Tel: +61 6 275 0963
- Centre for Spatial Information Systems / \ Fax: +61 6 257 1052
- CSIRO Division of Information Technology \_.--_*/ GPO Box 664 Canberra
- Australian National University Anutech Crt v ACT 2601 Australia
-
-