[comp.mail.mh] Using the %

ziegast@mordor ("Eric W. Ziegast") (03/20/90)

One of the standard features of UCB Mail is that it puts the
"friendly" headers in the message. Most of us normally don't
see these friendly headers in our scan listings because the
MH procedures were compiled with the BERK option which disables
address format parsing [see mh-format(5)].

-----------------------------------------------------------------------
First what does the friendly format do?
On the commands that use it, it turns these:

a)	ziegast@mordor.eng.umd.edu (Eric W. Ziegast)
b)	ziegast@mordor.eng.umd.edu
c)	"Eric W. Ziegast" <ziegast@mordor.eng.umd.edu>

into these:

a)	Eric W. Ziegast
b)	ziegast@mordor.eng.umd.edu
c)	"Eric W. Ziegast"

On two different machines here, I've compiled one without
BERK and one with it. The MH command "scan" uses friendly
format. Here are two scan listing for the same files:

With BERK:
30  03/12 eru!luth!sunic!mc  Re: .forward,.maildelivery .. help<<mehra@s
31  03/12 gvlv2!gvlv1!kleon  Re: mh6.6/papers/*<<In article <9003080541.
32  03/12 appenzell.cs.wisc  Re: Please help. I need an old patch...<<In
33  03/12 accur8!sisrael@uu  PC version of MH<<Is there a PC version of 
34  03/12 sgi!roberts%nimro  Re: repl address formatting<<In article <90

Without BERK:
30  03/12 Henk Fictorie      Re: .forward,.maildelivery .. help<<mehra@s
31  03/12 Ken Leonard        Re: mh6.6/papers/*<<In article <9003080541.
32  03/12 Tim Theisen        Re: Please help. I need an old patch...<<In
33  03/12 Stephen Israel     PC version of MH<<Is there a PC version of 
34  03/12 roberts            Re: repl address formatting<<In article <90

Since friendly works without BERK, the second looks "friendlier".

-----------------------------------------------------------------------
In order to have friendly formatting work for your addresses you have
to send your messages with the extra information that friendly format-
ing uses. For example, the next line in my mh mailbox (BERK off) is:

35  03/12 ziegast@mordor.en  Re: PS-papers<<I write: >I ftp'ed compresse

This is because I sent the mail with the following (default) header:

	To: ziegast@mordor.eng.umd.edu
	Cc: mh-users@ICS.UCI.EDU
	Subject: Re: PS-papers 
	In-Reply-To: Your message of Thu, 08 Mar 90 17:28:01 -0500.
	             <9003082228.AA14598@mordor.eng.umd.edu> 
	Date: Mon, 12 Mar 90 23:48:15 -0500

As the mail was sent, the following lines were added to the header:

	From ziegast@mordor.eng.umd.edu  Mon Mar 12 23:48:17 1990
	Return-Path: <ziegast@mordor.eng.umd.edu>
		id AA27348; Mon, 12 Mar 90 23:48:17 EST
	Message-Id: <9003130448.AA27348@mordor.eng.umd.edu>
	............. My header ............................
	From: ziegast@mordor.eng.umd.edu
                                          ^^^^^^^^^^^^^^^^^^
                                     Missing friendly information

If I force the line:

	From: ziegast@mordor.eng.umd.edu (Eric W. Ziegast)

into my header, the processed header becomes:

	From ziegast@mordor.eng.umd.edu  Mon Mar 12 23:48:17 1990
	Return-Path: <ziegast@mordor.eng.umd.edu>
		id AA27348; Mon, 12 Mar 90 23:48:17 EST
	Message-Id: <9003130448.AA27348@mordor.eng.umd.edu>
	To: ziegast@mordor.eng.umd.edu
	Cc: mh-users@ICS.UCI.EDU
	Subject: Re: PS-papers 
	In-Reply-To: Your message of Thu, 08 Mar 90 17:28:01 -0500.
	             <9003082228.AA14598@mordor.eng.umd.edu> 
	Date: Mon, 12 Mar 90 23:48:15 -0500
	From: ziegast@mordor.eng.umd.edu (Eric W. Ziegast)
                                         ^^^^^^^^^^^^^^^^^
                                           Friendly info

and the scan line becomes:

35  03/12 Eric W. Ziegast    Re: PS-papers<<I write: >I ftp'ed compresse

-----------------------------------------------------------------------
In order to make it easier for me when composing messages to include
the friendly from line, I have the following "components" file in my
MH directory:

	From: ziegast@mordor.eng.umd.edu (Eric W. Ziegast)
	To:
	cc:
	Subject:
	--------

Now, every time I "comp" a new message, I have a "friendly" from line,
just like UCB Mail creates.

Such "From:" line additions can be added to replcomps, forwcomps, and
others as well.

Question for the MH experts: Is there an easier way to do this?

-----------------------------------------------------------------------

I hope that I've helped some people by showing this "trick" (not really,
I just read and reread the man pages) and hope that many will stop
using the friendly formats. (Down with BERK !  :-)

Also, if anyone knows specifically what the DUMB option really does and
why or why someone should/shouldn't use it, I'd like to hear about it.

Eric Ziegast
University of Maryland
Electrical Engineering
Open Sun Lab

PS: Wouldn't it be great if we had more people show the tricks of MH
    programming? I also have a more general mail filter that is more
    liberal than mhook. In it you can do all sorts of things with shell
    script programming to determine which folder a message goes into.

ziegast@mordor ("Eric W. Ziegast") (03/20/90)

"Eric W. Ziegast" writes:
>I hope that I've helped some people by showing this "trick" (not really,
>I just read and reread the man pages) and hope that many will stop
                                                               ^^^^ Ooops!
                                                       I mean start!
>using the friendly formats. (Down with BERK !  :-)
>
>Also, if anyone knows specifically what the DUMB option really does and
>why or why someone should/shouldn't use it, I'd like to hear about it.

Eric Ziegast

ziegast@mordor ("Eric W. Ziegast") (03/20/90)

Vick Khera writes:
>yes.  add a line to your .mh_profile: (mine is below)
>
>Signature: Vick Khera

Thanks. (Another case of RTFM)

>>I hope that I've helped some people by showing this "trick" (not really,
>>I just read and reread the man pages) and hope that many will stop
>>using the friendly formats. (Down with BERK !  :-)
 
>why should we stop using friendly formats?

I meant start! START! (sort of like asking for a light when I mean Bud Light)
                                             See below :-)
 
>can anyone tell me a good reason for specifying BERK as an option?

To give yourself a complacent feeling that you're doing what the people
at Berkeley do. Or maybe, it makes you think it's better. You know what
some people think: "Gee, if we add all the options we'll have one NEAT
program!"

Eric Ziegast - In desperate need of a constant signature.

"I'm just want to read my mail."
            His screen starts scrolling a zillion messages.
"NO! I mean MH mail!"
            A bunch of friendly folders pop up in an XMH window.

khera@juliet.cs.duke.edu (Vick Khera) (03/20/90)

In article <9003192327.AA07968@abyss.eng.umd.edu> ziegast@mordor ("Eric W. Ziegast") writes:

[description about friendly headers]

>In order to make it easier for me when composing messages to include
>the friendly from line, I have the following "components" file in my
>MH directory:
>
>	From: ziegast@mordor.eng.umd.edu (Eric W. Ziegast)
> [ ... ]
>Such "From:" line additions can be added to replcomps, forwcomps, and
>others as well.
>Question for the MH experts: Is there an easier way to do this?

yes.  add a line to your .mh_profile: (mine is below)

Signature: Vick Khera

this will prepend your name to the From: line generated by mh, and mail
received will look like

From: Vick Khera <khera@cs.duke.edu>

>I hope that I've helped some people by showing this "trick" (not really,
>I just read and reread the man pages) and hope that many will stop
>using the friendly formats. (Down with BERK !  :-)

why should we stop using friendly formats?

can anyone tell me a good reason for specifying BERK as an option?

>Eric Ziegast
>University of Maryland
>Electrical Engineering

								v.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vick Khera           (919) 660-6528     Department of Computer Science
ARPA:   khera@cs.duke.edu               Duke University
UUCP:   ..!{mcnc,decvax}!duke!khera     Durham, NC 27706

jromine@ics.uci.edu (John Romine) (03/21/90)

>can anyone tell me a good reason for specifying BERK as an option?

Not a *good* reason, but...  if you're running on a slow CPU (on the
order of a VAX-11/750) and can't spare the cycles to parse addresses.
--
John Romine

smulrine@cs.strath.ac.uk (Stephen K Mulrine) (03/21/90)

In comp.mail.mh, ziegast@mordor ("Eric W. Ziegast") writes:
>In order to make it easier for me when composing messages to include
>the friendly from line, I have the following "components" file in my
>MH directory:
>	From: ziegast@mordor.eng.umd.edu (Eric W. Ziegast)

What I have is
        From: me
with the appropriate alias in my aliases file.

MH expands on aliases when dealing with From: lines of outgoing mail. I like
it.
-- 
Stephen K Mulrine    <smulrine%cs.strath.ac.uk@nsfnet-relay.ac.uk>

tchrist@convex.COM (Tom Christiansen) (03/22/90)

In article <9003192327.AA07968@abyss.eng.umd.edu> ziegast@mordor ("Eric W. Ziegast") writes:
>-----------------------------------------------------------------------
>First what does the friendly format do?
>On the commands that use it, it turns these:
>
>a)	ziegast@mordor.eng.umd.edu (Eric W. Ziegast)
>b)	ziegast@mordor.eng.umd.edu
>c)	"Eric W. Ziegast" <ziegast@mordor.eng.umd.edu>
>
>into these:
>
>a)	Eric W. Ziegast
>b)	ziegast@mordor.eng.umd.edu
>c)	"Eric W. Ziegast"

Bizarre.  I get b and c the same, but a comes out the same as b
for me here.  Here is my configuration.  

version: MH 6.6 #9[UCI] (convexs) of Fri Feb 23 18:59:01 CST 1990
options: [BSD43] [BSD42] [DUMB] [MHRC] [RPATHS] [MHE] [ATZ]
         [FOLDPROT='"0700"'] [MSGPROT='"0600"'] [SBACKUP='".#"']
         [SENDMTS] [SMTP]

I've been playing with a conditional to test if there's
a personal part and to use that if so, but it just doesn't
work.  

    %<(mymbox{from})To:%14(friendly{to})%|\
    %<(pers{from})A:%17(pers{from})%|\
    %<(note{from})B:%17(note{from})%|\
    C:%17(friendly{from})%>%>%>

It always takes the C: path, although it will print
out the pers{}, note{}, or friendly{} part just fine.  

My question is why aren't the first pers{} and note{} ever testing true?

--tom
--

    Tom Christiansen                       {uunet,uiucdcs,sun}!convex!tchrist 
    Convex Computer Corporation                            tchrist@convex.COM
		 "EMACS belongs in <sys/errno.h>: Editor too big!"

ziegast@egypt (Eric Ziegast) (03/22/90)

Tom Christiansen writes:
>In article <9003192327.AA07968@abyss.eng.umd.edu> ziegast@mordor ("Eric W. Zie
gast") writes:
>>-----------------------------------------------------------------------
>>First what does the friendly format do?
>>On the commands that use it, it turns these:
>>
>>a)	ziegast@mordor.eng.umd.edu (Eric W. Ziegast)
>>b)	ziegast@mordor.eng.umd.edu
>>c)	"Eric W. Ziegast" <ziegast@mordor.eng.umd.edu>
>>
>>into these:
>>
>>a)	Eric W. Ziegast
>>b)	ziegast@mordor.eng.umd.edu
>>c)	"Eric W. Ziegast"
>
>Bizarre.  I get b and c the same, but a comes out the same as b
>for me here.  Here is my configuration.  
>
>version: MH 6.6 #9[UCI] (convexs) of Fri Feb 23 18:59:01 CST 1990
>options: [BSD43] [BSD42] [DUMB] [MHRC] [RPATHS] [MHE] [ATZ]
>         [FOLDPROT='"0700"'] [MSGPROT='"0600"'] [SBACKUP='".#"']
>         [SENDMTS] [SMTP]
>

Maybe it was one of the patches. Here's what I got:

version: MH 6.6.5 #4[UCI] (frob) of Fri Mar 9 23:08:52 EST 1990
options: [BSD42] [TTYD] [MHE] [NETWORK] [BIND] [RPATHS]
         [FOLDPROT='"0700"'] [MSGPROT='"0600"'] [SBACKUP='"#"'] [MHRC]
         [UCI] [SENDMTS] [SMTP]

I stuck somewhat close with the conf/MH defaults that I got from
ics.uci.edu.

Now that I think about it, maybe I should have compiled it with 
BSD43. In fact, I may just recompile it.

Anyone know specifically what NETWORK, TTYD, BSD43, and DUMB do?
MH-GEN is not to clear on it.

And how does one use the UCI option's $HOME/.signature files?

>I've been playing with a conditional to test if there's
>a personal part and to use that if so, but it just doesn't
>work.
Doesn't friendly do that anyway? I think it uses (pers{}) if it
finds one and the address if it doesn't. I don't know what note does.
It doesn't return anything for me anyway.

Eric Z
_______________________________________________________________________
ziegast@eng.umd.edu - {uunet}!eng.umd.edu!ziegast - ziegast@umdd.bitnet
Eric W. Ziegast, Univ. of Merryland, Open Sun Lab

jromine@ics.uci.edu (John Romine) (03/23/90)

ziegast@egypt (Eric Ziegast) writes:
>version: MH 6.6.5 #4[UCI] (frob) of Fri Mar 9 23:08:52 EST 1990

Eric is running a beta-test version of MH-6.6.5, his version works
differently than the standard release.  And, no, I don't need any
more beta-sites since the testing is almost over.  When you post an
answer about how to do something with MH, be sure to tell what release
you're running.

>Now that I think about it, maybe I should have compiled it with
>BSD43. In fact, I may just recompile it.

If you're using a 4.3BSD system, then yes, you should use BSD43.
Some of the characteristics of such systems are that openlog(3)
takes three arguments instead of two, and write(1) is sgid-tty.

>Anyone know specifically what NETWORK, TTYD, BSD43, and DUMB do?
>MH-GEN is not to clear on it.

Yes.  It's not clear about "NETWORK" (i.e., it isn't mentioned),
because that's used internally and should not be defined in the config
file.  TTYD enables the UCI TTYD package, which didn't make it much
farther than here.  If you don't know what TTYD is or don't have it,
you don't want to enable TTYD.  DUMB keep's MH's address parser
enabled, but prevents MH from trying to make addresses canonical.

>And how does one use the UCI option's $HOME/.signature files?

Probably you should just use the "Signature:" profile entry.  This is
something we have for backward compatibility, and it conflicts with
the News interpretation of .signature.
--
John Romine