List of variables for substitution in reports?

David Lee t.d.lee at durham.ac.uk
Tue Sep 12 10:31:51 IST 2006


On Tue, 5 Sep 2006, Jim Holland wrote:

> On Thu, 31 Aug 2006, David Lee wrote:
>
> > Julian: The end of a typical report (e.g. "recipient.spam.report.txt")
> > has a 'signature' such as:
> >
> > ----------- snip ---------------
> > MailScanner
> > Email Virus Scanner
> > %org-long-name%
> > %web-site%
> >
> > For all your IT requirements visit: http://www.transtec.co.uk
> > ----------- snip ---------------
> >
> > Our site likes to keep local changes to a minimum, so we try to take your
> > reports as they are.
> >
> > But that final advertisement line isn't appropriate for our site.  (And I
> > would guess that we probably aren't alone in this.)  Having to chop it out
> > means a lot of potentially unnecessary maintenance effort as new versions
> > of MS go in and their potentially changed reports have to be checked and
> > reconciled.
> >
> > I can understand that you (as MS author) want to give recognition to one
> > of your sponsors where reasonably possible.  Fair enough; fine.
> >
> > So could I suggest that you introduce a new variable, such as %sponsor%,
> > and use that in your reports.  Your default value of %sponsor% could still
> > be something about "transtec" (i.e. an untweaked install of MS would
> > produce the same result as above).
> >
> > Supplementary: You might also introduce another variable, say %site-msg%,
> > default value empty, which would allow a site to insert its own tag line
> > (mission statement etc.) if it so chose.
> >
> > Hope that helps.  (I'd be happy to try to beta-test this for you.)
>
> I understand your problem, and have the same view of it here.  However I
> think that this could just be left to the users themselves to sort out
> rather than adding yet another option.  The work involved in fixing it
> yourself is negligible - just run a one-line script in the report
> directory such as:
>
> perl -pi -e 's/For all your IT requirements visit.*//' *
> or
> perl -pi -e 's/For all your IT requirements visit.*/Our Mission Statement . . ./' *
>
> and if you want to avoid dealing with all the rpmnew report files
> that would appear after an upgrade, just run this before the above in the
> same directory:
>
> for file in *rpmnew; do mv -f $file `echo $file|sed s/.rpmnew//`; done
> [...]

Possible.  But it still seems unnecessarily awkward.

Julian tries (I understand) to make things "as reasonably easy as possible
as reasonably often as possible for as reasonably many as possible".

My suggestion that the inbuilt text:
   MailScanner thanks transtec Computers for their support

becomes a %sponsor-msg%" or similar seems to fall into that category.


Whether there is a separate "%site-msg%", is, in one sense a different
issue.  The main issue is about improved, but easy to drive, flexibility
in the report signatures; about taking further the functionality already
begun with the current "%org-long-name%" and "%web-site%".

(Some folks might have asked for a highly tailorable ruleset here!  I'm
merely suggesting a settable "%...%" entity.)

Julian: Any chance, please, of replacing the fixed text with a
"%sponsor-msg"?  I'd be happy to beta-test it in the current round and
report back.

Many thanks.



-- 

:  David Lee                                I.T. Service          :
:  Senior Systems Programmer                Computer Centre       :
:                                           Durham University     :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham DH1 3LE        :
:  Phone: +44 191 334 2752                  U.K.                  :


More information about the MailScanner mailing list