[Exim] Exim_help script

Top Page
Delete this message
Reply to this message
Author: Hugh Sasse Staff Elec Eng
Date:  
To: EXIM users list
Subject: [Exim] Exim_help script
I recently modified my exim_help script, which is in the contribs
directory, to improve its output. The new form has not made it to the
directory yet.

To remind you, the script is a context based "grep" of the Exim Spec, FAQ
and Filter spec documents, so that it returns paragraphs rather than lines
that match your query. It can produce results in HTML with the matches in
bold, and can sort them in order of best matches first, if necessary.

The problem with it is that a paragraph is defined to be a block of text
between 2 blank lines, so that something like:


accept_timeout

    Type:    time
    Default: 0s


    This sets the timeout for accepting a non-SMTP message, that is, the
    maximum time that Exim waits when reading a message on the standard
input.
    If the value is zero, it will wait for ever. This setting is
overridden by
    the -or command option. The timeout for incoming SMTP messages is
    controlled by smtp_receive_timeout.



would be counted as three paragraphs. Thus a search for "wait" would
only turn up the 3rd paragraph, and not let you know what the variable
name was.

My workaround for this annoyance is to count the the number or words
(actually, whitespace delimited regions) in each paragraph. If the
paragraph 2 paragraphs back from a matching paragraph contains only one
word, then all three get printed, provided none of the first two has
been matched already.

This works fine most of the time, but there are a few "false alarms", such
as the fragment:


     then


       Sam.Reman, spqr@???


     in spqr's forward file fails on an incoming message addressed to
     Sam.Reman, because the aliasfile director does not process Sam.Reman
the
     second time round, having previously done so. The forward file should
     really contain





My questions are:

Is this good enough -- by which I mean is the side effect insignificant
compared to the advantage of knowing which variables are under discussion?

Should I check to be sure the one-word only contains characters within a
variable and that it is left justified (which is more compute intensive)?
I could also check that there are only two lines in the second paragraph,
come to that.

Also, the setup time for the program is rather long (because of delimiting
paragraphs, counting words and such. I could cache the data, but this
means leaving more data on people's disks, (which I would rebuild if
exim_help or the documents are newer). Does the slow startup merit
such an approach?

Are people finding exim_help worth this bother anyway, or would they
if this were pursued?

I am not sure that I can make these changes soon, but I would like to
know if there is sufficient interest to make these changes worth the
effort, or if more simple, elegant solutions exist.

    Thank you,
    Hugh
    hgs@???