I have created a Procmail Module based on pm-janetmind.rc in which I
want to save certain HTML URLs only the first time I encounter them.
Unfortunately, whether the $GREP succeeds or fails, the module
succeeds! I have tried saving to `save-html' both within the module
and without. When an unknown URL is found, it is saved, but when the
$GREP fails, if I do not have an external `save-html' reference, then
it will save as the following `:0:' file.
Is this clear enough?
By the way, this will only capture the first URL in an e-mail, right?
Any suggestions are appreciated,
--Ralph
Dr. Ralph P. Sobek Disclaimer: The above ruminations are my own.
Ralph(_dot_)Sobek(_at_)irit(_dot_)fr Addresses are
ordered by importance.
sobek(_at_)irit(_dot_)fr If all else
fails, try:
newsmaster(_at_)irit(_dot_)fr, postmaster(_at_)irit(_dot_)fr
sobek(_at_)diva(_dot_)eecs(_dot_)berkeley(_dot_)edu
Ph:(+33)[0]561558618 FAX:(+33)[0]561556258 http://www.irit.fr/SSI/~Ralph.Sobek/
===============================================================================
The truth about the Past is really all we have to guide us in the Present
-- Mary Benson (1964)
I call it as:
INCLUDERC = $PMSRC/pm-html.rc
:0 B html save-html
# .................................................... &initialising
# ...
dummy = "init: pm-html.rc Reading variable definitions if needed"
GREP = "$HOME/bin/sparc/gnugrep"
# ........................................................... &do-it
# ...
:0 B ()\/http://.* !Go to: http://www.rootsweb.com
* !http://www.k2nesoft.com/~fred$ !from Juno at http://www.juno.com {
html = $MATCH
}
:0 Ahb *$ ! ? $GREP -s "$html" $MAILDIR/save-html {
LOG = "Web match = $MATCH ========================="
:0: save-html
}
:0 E {
dummy = "pm-html.rc HTML already known"
}
dummy = "subroutine: pm-html.rc end."
# end of file pm-html.rc