Bob, Sorry I was a little distracted the first time I read this message. I have addressed some of what you bring up.
Bob Proulx wrote: > > Bryan Hoover wrote: > > HEADERTAG=From > > ADDRESSFILE=/usr/home/bhoover/listreply > > Use $MAILDIR here? > > ADDRESSFILE=$MAILDIR/listreply Whatever you like. My "maildir" is sort of scattered about. > > :0i > > HEADERTAGVAL=|$FORMAIL -zx$HEADERTAG | tr -d "\n" | tr -s " " > > > > * ? grep -i $HEADERTAGVAL $ADDRESSFILE > > I like it! Much more efficient than listing all of the addresses > out. Right, if you're just matching on From:, then no problem. But for say, the To: macro, you'll potentially get more than one address. So you'd need a way to feed to grep one at a time. The recipe I have in use turns things around, looks for each address in $ADDRESSFILE as a substring in $HEADERTAGVAL. > But there is some room for false hits. Wouldn't the -x option to grep > be appropriate there? And it probably should be quiet too. And > probably you don't want to use regular expressions (but maybe you do). Using the substring matching as mentioned, I've not seen any false hits in the 1.5 years I've been doing it that way. About the quite parameter -- maybe Procmail ignores failed match output. I use the match output -- and I test with ! ^^^^ which is procmail for "", which is false for failed matches, so, mmm... > > * ? grep -F -q -x -i $HEADERTAGVAL $ADDRESSFILE > > Here is the key for the list: > > -F fgrep functionality, no REs so '.' matches a literal '.'. Yes -- assuming it'd work as I think it would. That is, I've not been using -F, but that I've had no problems could very well simply be by virtue of that it would be a long shot for such to cause a bad match -- the RE '.''s been matching the 'any character', '.' :), I suppose. > -q quiet, no output, just the return code As mentioned, not seen any problems not using it -- a good thing, because the match output, generally speaking, can be handy. > -x exact match on the entire line Depends -- obviously not if, as mentioned above, substring matching is desired. Otherwise, the objective might be then, to break up each address out of the given header, before greping -- which could make for some pretty "nasty" parsing. I'm pretty sure of this, because I googled up the following part of a thread from which can be downloaded Phillip Guenther's recipe files for doing it: http://info.ccone.at/INFO/Mail-Archives/procmail/Nov-2002/msg00140.html See the files prefaced with 822, starting with 822mailbox-list. Again, my quick and dirty was to simply grep each line -- extracting with sed -- from $ADDRESSFILE, and grep for its substring in the header field -- much, much easier, though not perfect. > -i ignore case Might as well. Bryan > > Bob > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click -- I depict hope so vividly that every hopeful individual will recognize himself in my portrayal; and yet it is a fake, for while I depict it I am thinking of recollection. - (Soren Kierkegaard - Either/Or) http://www.wecs.com/content.htm This signature file is generated by Pick-a-Tag ! Written by Jeroen van Vaarsel http://www.google.com/search?hl=en&ie=ISO-8859-1&q=pick-a-tag ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk