procmail
[Top] [All Lists]

Re: Outbound mailing lists

1996-07-05 14:55:37
(I hope I don't trim too much but I'm not a fan of excessive quoting).
(And I hope I don't trim too little either  :)

David W. Tamkin wrote,

Stan Ryckman brought up a question he has had for a while:

| Just *why* have these macros been defined without requiring some
| sort of separator from what they follow?  This bizarre syntax
| makes the syntax highly confusing, perhaps even ambiguous.  What if
| you want something starting with "TOA"?

I can't answer the "why", but I can answer the "what if".

[stuff about my omitting caret deleted]

It was an error of mine not to use ^TO in my writing.  My apologies.
Please make a global substitution of "^TO" for "TO" in what I wrote.

While trimming all your nice examples, I'd like to point out that
my problem is with the syntactical (or lexical) structure of
the procmail language... yes, like it or not, it's a language.

"C" or various shells (or even FORTRAN -- but be careful!) have
notions of "tokens".  Thus, "ABC" might be a token, or "TODAY".

| but the magic of "TODAY" matching any "To: DAY" is bizzare IMHO.

TODAY doesn't match "To: DAY".  ^TODAY would, though.  You have to keep in
mind that there is no token expansion if there's no caret.

| And 'TO.*DAY' makes perfect sense to me.

Well, it matches in the sense I meant (which should have included the
"^" character :-)  Sorry about getting so many people to write about
that.... it had nothing to do with the point.

^TO.*DAY, however, is a bad idea,
because it eviscerates ^TO.  ^TODAY will not match "To: FARADAY", for
example, but ^TO.*DAY will, and you usually don't want it to.

No, I'd want ^TO.*DAY to match that, actually.  (But I can't conceive
of the use for such a match, which may be what you meant.)  But how
about ^TO.*tiac\.net for example?  Well, even that might be a stretch,
but what the heck...

BTW:  The man page is even more confusing if you read it closely...
     If the regular expression contains `^TO' it will be  substi-
     tuted by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope
     |Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)', which should
     catch all destination specifications.

This says that "xxx^TOyyy" is subject to such substitutions, but I
don't think that's supposed to be the case.  Or is it?  I have a
feeling that "starts with" rather than "contains" is the intent here.
Or is it more complicated?  What does:
        (xxx|^TOmyself)
do?

(and then I wrote)
| Just please do *something* that makes syntactic sense.  Knowing that a
| string "ABCDEFGHI" has an implicit token terminator after the "D" is
| syntactically bizarre (for example).

Stan, it's just not what you're used to.  "Bizarre" is a very strong judg-
ment when something merely is different from one's own tastes.

It was intended to be a strong judgment.  There are *lots* of things
in the computer world which "merely" differ from my tastes -- in fact,
I *detest* emacs but I don't consider it bizarre.

But that ^TNX and ^TOX and ^TPX have grossly different syntactical
or lexical (I'm not sure which) behavior is, IMHO, bizarre.  In two
(and only two) of those cases, the X is not the start of a token; in
the ^TOX case, it is.  I do not see a good reason for this being
the case.

See what I mean?

You can write
your procmailrc code with a separator there,

Sorry if I might have implied I have a specific problem with getting
something to work.  That is not the case at all.  It works great for
what I need it to do.  I was b*tching about the syntax or whatever,
and only on theoretical grounds, and only with the intent that
maybe syntax like ^TO and ^TO_ can be headed off at the pass so
that this doesn't spread to more "magic macros"

For those of you old enough, do you remember the "C" problem with:
        x=-2;
i.e., was it:
        x =- 2;
or:
        x = -2;
The solution was that to subtract 2 from x, use:
        x -= 2;
which has no other meaning.  *Really old* code which uses
"x=-2" to subtract two from x is now broken by the ANSI standard.

Stephen is the only (and very singular) author.

Ah, I think I'll need to reply to his post as well.  But I have to
practice my bowing and kneeling first  :)

One more comment... it may seem really strange to you all that I'm
even in this "debate" if I tell you that I have never had a use
for ^TO or ^TO_ at all.  But it's true.

Bye,
Stan.
-- 
Stan Ryckman  (stanr(_at_)tiac(_dot_)net)

<Prev in Thread] Current Thread [Next in Thread>