Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!apple!bionet!agate!ucbvax!thumper.bellcore.com!nsb From: nsb@thumper.bellcore.com (Nathaniel Borenstein) Newsgroups: comp.soft-sys.andrew Subject: Re: Mail captions Message-ID: Date: 22 Feb 91 15:19:26 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 28 Well, it isn't quite pulled out of a hat; the process is at least deteriministic, if not correct... I agree that it would be nice if the caption-building code were smart about "!" and "%" syntax. If anyone feels like tackling this, the code is not too terrible to look at, and can be found in ams/libs/ms/prettyn.c. In that file, at around line 190, you can see that the code starts looking at the "Addr->Hosts" structure, which is where the stuff following the "@" has been placed by the address parser. However, if you look through the string that is currently in the variable "s", you can probably find a better version of the host name if s contains "!" or "%", and you can concatenate that to FromBuf instead of what you get from the host structure. Another good fix, for anyone who tackles this, would be, in ams/libs/ms/shrkname.c, in "ShrinkName", to do the right thing with "%" when looking for the "real" user name. Currently that routine correctly picks out "nsb" from "foo!bar!nsb" but it doesn't know how to pick out "nsb" from "nsb%foobar". Should be a trivial fix for anyone who cares enough to make it... Finally, I *really* like the idea of having differential signature files depending on whether or not you're using ATK. (Local versus non-local is also appealing.) I like that idea enough that I might actually write up a patch for it one of these days, if nobody else gets to it first. (The caption-related stuff is something I was willing to be helpful on, but I'm not motivated enough to actually make & test the fix and submit a patch.) Brought to you by Super Global Mega Corp .com