procmail
[Top] [All Lists]

Re: procmail as sendmail filter

2000-02-07 21:44:14
Bennett Todd <bet(_at_)rahul(_dot_)net> writes:
2000-02-07-19:38:39 Ruud H.G. van Tol:
Did you also mean to say that: 
--- 
:0
* B ?? 1^1 > 1
{ }
SIZE = $=
--- 
does exactly the same as:
--- 
 :0 B
 * 1^1 > 1 
 { SIZE = $= }
--- 
?

Yes, I suppose I did. Though what I probably should have said
instead (since I'm so deep over my head trying to decypher this
stuff, I haven't played disassembler for machine language in nearly
20 years) was more like "I don't know any reason why the second
version wouldn't do the exact same thing as the first version".

I'm afraid I'm going to have to provide one: backwards compatability.
Before version 3.11pre3, size conditions *always* worked on the size
of the entire message.  In version 3.11pre3 Stephen made the "variable
??" syntax affect the size conditions, but for backwards compatability the
'H' and 'B' flags continue to leave alone such conditions.  You'll notice
that the documentation of the 'H' and 'B' flags talks about egreping only.
Changing this is made more difficult by the fact that the default
actions (search the header but measure size of the entire message)
are not expressible with just flags.  If the 'H' and 'B' flags where to
affect size conditions, the 'H' flag by itself would no longer be a no-op!


...
The second version looks clearer to me. 

Me too --- although that's only because it's shorter, not because
it's actually any clearer:-).

Clearer, but incorrect.  :-(


P.S. I'd argue that the _right_ notation would be something more
like

      SIZE = length(body);

or something pretty close to that.

Well, yes.  Unfortunately, procmail's rcfile language was grown rather
than designed, and I know I have neither the time nor interest to do
a complete redesign and reimplementation, followed bt the evangelistic
work of convincing people to switch over...


Philip Guenther

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